MeVisLab Toolbox Reference
|
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides in the handleEvent method. More...
#include <SoInteractionHandler.h>
Public Member Functions | |
SoInteractionHandler (SoInteractionProvider *provider) | |
virtual | ~SoInteractionHandler () |
virtual void | handleEventForInteraction (SoHandleEventAction *action) |
Handles the mouse and keyboard events and send them to interaction nodes. More... | |
Protected Member Functions | |
bool | handleKeyPress (SoState *state, const SoPointerPosition &location, int modifiers, SoKeyboardEvent::Key nKey) |
Handles a key press by checking for commands actions with matching key shortcuts and executing (one of) them. More... | |
virtual bool | augmentLocation (SoPointerPosition &, bool) |
This method can be overridden to provide further position information to SoPointingActions,e.g., slice information for SoView2DExtensions. More... | |
void | buttonMaskChanged (SoState *state, const SoPointerPosition &location, int buttonMask) |
Called if the button mask changed since the last input event. More... | |
void | modifierMaskChanged (SoState *state, const SoPointerPosition &location, int modifierMask) |
Called if the modifier mask changed since the last input event. More... | |
void | locationChanged (SoState *state, const SoPointerPosition &location, bool force=false, bool renderRefresh=false) |
Called if the pointer location changed since the last input event. More... | |
bool | wheelRotated (SoState *state, const SoPointerPosition &location, int modifierMask, SoMouseWheelEvent::Orientation orientation, short rotation) |
Called when the mouse wheel is rotated. More... | |
void | handlePointerLeftWindow (SoState *state) |
Called if the pointer left the scene widget. More... | |
SoInteractionCoordinator * | getCoordinator () |
Access method, returns the interaction coordinator during event handling. More... | |
SoPointingAction * | getLocalCurrentPointingAction () |
virtual bool | isEnabled (SoPointingAction *action, int currentMask) |
This method returns whether the pointing action should be enabled for the given modifier/button mask. More... | |
virtual bool | isValidStartingLocation (const SoPointerPosition &location) |
This method returns whether the current location is valid for starting a pointing action. More... | |
bool | canSelectPointingAction () |
void | selectTargetPointingAction (SoState *state, const SoPointerPosition &location, int mask) |
bool | trySwitchGlobalPointingAction (SoState *state, const SoPointerPosition &location, int buttonMask, int modifierMask) |
Attemps to switch from one global pointing action to another during a drag. More... | |
Access methods for the current pointer state. | |
Returns the currently active button mask. | |
int | getCurrentButtonMask () |
int | getCurrentModifierMask () |
Returns the currently active button modifier. More... | |
SoPointerPosition | getCurrentPointerLocation () |
Returns the current position of the mouse cursor. More... | |
bool | isCurrentPointerLocationValid () |
Returns whether the current mouse cursor position is valid. More... | |
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides in the handleEvent method.
Definition at line 35 of file SoInteractionHandler.h.
SoInteractionHandler::SoInteractionHandler | ( | SoInteractionProvider * | provider | ) |
|
virtual |
|
inlineprotectedvirtual |
This method can be overridden to provide further position information to SoPointingActions,e.g., slice information for SoView2DExtensions.
The dragging argument tells us whether any mouse button is pressed before this fact is really evaluated!
false
if augmenting was not possible and actions should not be executed for this node. Reimplemented in View2DInteractionHandler.
Definition at line 55 of file SoInteractionHandler.h.
|
protected |
Called if the button mask changed since the last input event.
|
protected |
|
inlineprotected |
Access method, returns the interaction coordinator during event handling.
Definition at line 90 of file SoInteractionHandler.h.
|
inlineprotected |
Definition at line 80 of file SoInteractionHandler.h.
|
inlineprotected |
Returns the currently active button modifier.
Definition at line 82 of file SoInteractionHandler.h.
|
inlineprotected |
Returns the current position of the mouse cursor.
Definition at line 84 of file SoInteractionHandler.h.
|
protected |
|
virtual |
Handles the mouse and keyboard events and send them to interaction nodes.
|
protected |
Handles a key press by checking for commands actions with matching key shortcuts and executing (one of) them.
|
protected |
Called if the pointer left the scene widget.
|
inlineprotected |
Returns whether the current mouse cursor position is valid.
Definition at line 86 of file SoInteractionHandler.h.
|
protectedvirtual |
This method returns whether the pointing action should be enabled for the given modifier/button mask.
Override this if you want to impose further constraints.
Reimplemented in View2DInteractionHandler.
|
protectedvirtual |
This method returns whether the current location is valid for starting a pointing action.
This is mainly used for SoView2D, where several SoView2Ds may provide the same actions, only at different device positions (and with different voxel/world transformations). This method always returns true
by default.
Reimplemented in View2DInteractionHandler.
|
protected |
Called if the pointer location changed since the last input event.
If force
is true
, the handling is forced even if the position has not changed. If renderRefresh
is also true
, this is not a real location change but only a refresh that happens directly before rendering.
|
protected |
Called if the modifier mask changed since the last input event.
|
protected |
|
protected |
Attemps to switch from one global pointing action to another during a drag.
This is only allowed for global pointing actions since position specific interactions probably should not be aborted in mid-drag.
|
protected |
Called when the mouse wheel is rotated.
The location is only given to provide the augmented location to the offset action.