#include <SoFocus.h>
Public Member Functions | |
| SoFocus () | |
| Constructor. | |
| virtual void | handleEvent (SoHandleEventAction *action) |
| handle event is reimplemented to handle the mouse events. | |
| void | setFocusState (FocusState state, bool updateField=true) |
| Set focus state for this module. | |
Static Public Member Functions | |
| static void | initClass () |
| Initializes this class (called on dll initialization). | |
Public Attributes | |
| SoSFBool | active |
| Should this module change the focus state? | |
| SoSFBool | hasFocus |
| Current state (has focus or has no focus). | |
| SoSFBool | supportWheelEvents |
| Should this module support mouse wheel events? | |
| SoSFVec2f | normClickCoords |
| Display the normalized coordinates of the click event that caused the focus state. | |
Protected Member Functions | |
| virtual | ~SoFocus () |
| Protected destructor. | |
| void | nodeChanged (SoNodeSensor *sensor) |
Called by the static function _nodeChangedCB to notify node changes. | |
| virtual void | GLRender (SoGLRenderAction *action) |
| React to render action -> pass focus to state. | |
Static Protected Member Functions | |
| static void | nodeChangedCB (void *data, SoSensor *sens) |
Called by _nodeSensor when any field in node changes. | |
Protected Attributes | |
| SoNodeSensor * | _nodeSensor |
| Sensor to detect changes in node's fields. | |
The information, if a sub graph has the focus, is passed to the inventor state.
Definition at line 36 of file SoFocus.h.
| SoFocus::SoFocus | ( | ) |
Constructor.
| virtual SoFocus::~SoFocus | ( | ) | [protected, virtual] |
Protected destructor.
| virtual void SoFocus::GLRender | ( | SoGLRenderAction * | action | ) | [protected, virtual] |
React to render action -> pass focus to state.
| virtual void SoFocus::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
handle event is reimplemented to handle the mouse events.
The events are not consumed, so that following modules in the scene graph can handle them.
| static void SoFocus::initClass | ( | ) | [static] |
Initializes this class (called on dll initialization).
| void SoFocus::nodeChanged | ( | SoNodeSensor * | sensor | ) | [protected] |
Called by the static function _nodeChangedCB to notify node changes.
| static void SoFocus::nodeChangedCB | ( | void * | data, | |
| SoSensor * | sens | |||
| ) | [static, protected] |
Called by _nodeSensor when any field in node changes.
Only redirects the call of this static function to the class method nodeChanged.
| void SoFocus::setFocusState | ( | FocusState | state, | |
| bool | updateField = true | |||
| ) |
Set focus state for this module.
If updateField is true, the field "hasFocus" is updated.
SoNodeSensor* SoFocus::_nodeSensor [protected] |
| SoSFBool SoFocus::active |
| SoSFBool SoFocus::hasFocus |
| SoSFVec2f SoFocus::normClickCoords |
Display the normalized coordinates of the click event that caused the focus state.
This is useful if one Viewer has several regions that should be activated separately. For example, if a SoView2d has more than 1 slice, SoView2DBorder is drawn several times. normClickCoords can be used to determine which border should be highlighted.
| SoSFBool SoFocus::supportWheelEvents |
1.5.8