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. | |
Protected Member Functions | |
bool | handleKeyPress (SoState *state, const SoPointerPosition &location, int modifiers, SoKeyboardEvent::Key nKey) |
Handles key press by checking for commands actions with matching key shortcuts and executing (one of) them. | |
virtual bool | augmentLocation (SoPointerPosition &, bool) |
This method can be overridden to provide further position information to SoPointingActions - e.g. | |
void | buttonMaskChanged (SoState *state, const SoPointerPosition &location, int buttonMask) |
Called if the button mask changed since the last input event. | |
void | modifierMaskChanged (SoState *state, const SoPointerPosition &location, int modifierMask) |
Called if the modifier mask changed since the last input event. | |
void | locationChanged (SoState *state, const SoPointerPosition &location, bool force=false, bool renderRefresh=false) |
Called if the pointer location changed since the last input event. | |
bool | wheelRotated (SoState *state, const SoPointerPosition &location, int modifierMask, SoMouseWheelEvent::Orientation orientation, short rotation) |
Called when the mouse wheel is rotated. | |
void | handlePointerLeftWindow (SoState *state) |
Called if the pointer left the scene widget. | |
SoInteractionCoordinator * | getCoordinator () |
Access method, returns the interaction coordinator during event handling. | |
SoPointingAction * | getLocalCurrentPointingAction () |
virtual bool | isEnabled (SoPointingAction *action, int currentMask) |
This method returns true if the pointing action should be enabled for the given modifier/button mask. | |
virtual bool | isValidStartingLocation (const SoPointerPosition &location) |
This method returns whether the current location is valid for starting a pointing action. | |
bool | canSelectPointingAction () |
void | selectTargetPointingAction (SoState *state, const SoPointerPosition &location, int mask) |
bool | trySwitchGlobalPointingAction (SoState *state, const SoPointerPosition &location, int buttonMask, int modifierMask) |
Tries to switch from one global pointing action to another during a drag. | |
Access methods for the current pointer state. | |
Returns the currently active button mask. | |
int | getCurrentButtonMask () |
int | getCurrentModifierMask () |
Returns the currently active button modifier. | |
SoPointerPosition | getCurrentPointerLocation () |
Returns the current position of the mouse cursor. | |
bool | isCurrentPointerLocationValid () |
Returns whether the current mouse cursor position is valid. | |
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 if any mouse button is pressed before this fact is really evaluated!
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 key press by checking for commands actions with matching key shortcuts and executing (one of) them.
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 true if 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 hasn't changed. If renderRefresh is also true this is no real location change but only an refresh that happens directly before rendering.
|
protected |
Called if the modifier mask changed since the last input event.
|
protected |
|
protected |
Tries 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.