MeVisLab Toolbox Reference
|
SoFocus is a general facility to detect focus changes. More...
#include <SoFocus.h>
Public Member Functions | |
SoFocus () | |
Constructor. | |
void | handleEvent (SoHandleEventAction *action) override |
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 |
! Fields | |
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 | |
~SoFocus () override | |
Protected destructor. | |
void | hasFocusChanged (SoField *) |
void | activeChanged (SoField *) |
void | GLRender (SoGLRenderAction *action) override |
React to render action -> pass focus to state. | |
SoFocus is a general facility to detect focus changes.
The information, if a sub graph has the focus, is passed to the inventor state. SoFocus is a general facility to detect focus changes. The information, if a sub graph has the focus, is passed to the inventor state.
SoFocus::SoFocus | ( | ) |
Constructor.
|
overrideprotected |
Protected destructor.
|
overrideprotected |
React to render action -> pass focus to state.
|
override |
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.
void SoFocus::setFocusState | ( | FocusState | state, |
bool | updateField = true ) |
Set focus state for this module.
If updateField is true, the field "hasFocus" is updated.
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 |