| 1 |
NAME SoLocateHighlight SoLocHigh SO_LOC_ { |
| 2 |
special separator that performs locate highlighting |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE nodes/SoLocateHighlight.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
This is a subclass of \cSoSeparator\. that redraws itself in a different color |
| 9 |
when the cursor is over the contents of the separator. |
| 10 |
\p |
| 11 |
The redraw happens for that separator only and not the entire window (redraw along |
| 12 |
the handle event pick path) and in the front buffer, to efficiently |
| 13 |
track the mouse motion. The highlighted redraw overrides the emissive and/or diffuse |
| 14 |
color of the subgraph based on the field values in this node. |
| 15 |
\p |
| 16 |
NOTE: when using \kSoLightModel::BASE_COLOR\. (to turn lighting off) only the diffuse color |
| 17 |
will be used to render objects, so \kEMISSIVE_DIFFUSE\. must be used for |
| 18 |
this node to have any effect. |
| 19 |
} |
| 20 |
|
| 21 |
ENUM Modes { |
| 22 |
AUTO "highlight when mouse is over (default)", |
| 23 |
ON "always highlight", |
| 24 |
OFF "never highlight" |
| 25 |
} |
| 26 |
|
| 27 |
ENUM Styles { |
| 28 |
EMISSIVE "changes emissive color only (default)", |
| 29 |
EMISSIVE_DIFFUSE "changes emissive and diffuse colors" |
| 30 |
} |
| 31 |
|
| 32 |
FIELD color { highlighting color - default [.3, .3, .3] } |
| 33 |
FIELD style { highlighting draw style - default EMISSIVE } |
| 34 |
FIELD mode { Whether to highlight or not - default AUTO } |
| 35 |
|
| 36 |
|
| 37 |
METHOD "" SoLocateHighlight() { |
| 38 |
Creates a LocateHighlight node with default settings. |
| 39 |
} |
| 40 |
|
| 41 |
METHOD "" static SoType getClassTypeId() { |
| 42 |
Returns type identifier for this class. |
| 43 |
} |
| 44 |
|
| 45 |
ACTION SoHandleEventAction { |
| 46 |
Checks to see if the cursor moves onto or off of the contents of the separator, |
| 47 |
and redraws appropriately (if \vmode\. is \kAUTO\.), otherwise traverses |
| 48 |
as a normal separator. |
| 49 |
} |
| 50 |
|
| 51 |
ACTION SoGLRenderAction { |
| 52 |
Redraws either highlighted (if cursor is over the contents of the separator |
| 53 |
when \vmode\. == \kAUTO\. or always if \vmode\. == \kON\.), otherwise traverses |
| 54 |
as a normal separator. |
| 55 |
} |
| 56 |
|
| 57 |
ALSO { SoSeparator, SoSelection, SoMaterial } |