MeVisLab Toolbox Reference
|
SoInteractionController is the controlling instance of managed interactions. More...
#include <SoInteractionController.h>
Public Member Functions | |
SoInteractionController () | |
Default constructor. | |
~SoInteractionController () override | |
Destructor. | |
void | handleEvent (SoHandleEventAction *action) override |
Handles the mouse and keyboard events and send them to interaction nodes. | |
bool | isDragThresholdExceeded () const override |
Return if the drag threshold was exceeded, that is, endPress will get a clickCount of 0. | |
Public Member Functions inherited from SoInteractionCoordinator | |
SoInteractionCoordinator () | |
virtual | ~SoInteractionCoordinator () |
size_t | getNumMappers () |
Return number of added mappers, to be used with truncateMappers. | |
void | addMapper (SoInteractionMapper *mapper) |
Add an instance to override pointing and command action mappings. | |
void | clearMappers () |
Clear list of mappers. | |
void | truncateMappers (size_t n=0) |
Truncate list of mappers to the given number, used for push/pop semantics. | |
SoPointingAction * | getCurrentPointingAction () const |
Get currently selected pointing action. | |
SoInteractionHandler * | getCurrentPointingActionHandler () const |
Get handler for currently selected pointing action. | |
bool | getCurrentPointingActionAllowed () const |
Get if the current pointing action may be applied at the current location. | |
void | affirmSelectedPointingAction () |
Affirm currently selected pointing action (this prevents other nodes from changing the action without doing anything else) | |
bool | isPointingActionSelected () const |
Find out whether the pointing action has been set during the current scene graph traversal. | |
bool | maySelectPointingAction () const |
Return whether one is even allowed to select a (new) pointing action. | |
virtual void | setLockedPointingAction (SoPointingAction *action, SoInteractionHandler *handler) |
Setting the locked pointing action with this method ensures that a callback is set to be informed of an external grab release. | |
SoPointingAction * | getLockedPointingAction () |
Get locked pointing action. | |
SoInteractionHandler * | getLockedPointingActionHandler () |
Get handler for locked pointing action. | |
void | grabReleasedByAction (SoPointingAction *action) |
This method is called from a PointingAction if a grab should be released. | |
virtual bool | isPointingActionActive (SoPointingAction *action, int currentMask) |
This method will be used to override the default action selection mechanism. | |
virtual int | getModeModifierMask (int numModes) |
Return a mask that covers all modifier flags that are needed for the given number of drag modes. | |
virtual int | getModeFromModifiers (int numModes, int modifierMask) |
Get mode number to set for a total number of modes and the current modifier mask. | |
virtual bool | startPress (const SoPointerPosition &position, int modifierMask) |
Start mouse button press for current action. | |
virtual void | endPress (int clickCount) |
Stop mouse button press for current action. | |
virtual bool | isDragging () |
Query flag indicating drag action. | |
bool | isCancelled () const |
This returns true if the current drag action has been cancelled. | |
void | cancelDrag () |
Cancel the current drag action (if this wasn't done already). | |
bool | wheelModifiersFitOffsetAction (SoOffsetAction *action, int modifiers, double &sensitivityX, double &sensitivityY, bool &swapAxes) |
Check if the current modifiers allow to execute a wheel action; also returns the sensitivity settings associated with the matching trigger. | |
void | setWheelActionExecuted () |
Prevent further wheel actions from being executed. | |
bool | mayExecuteWheelAction () const |
Check if it is allowed to execute wheel actions. | |
bool | keyFitsCommandAction (SoCommandAction *action, int modifiers, SoKeyboardEvent::Key nKey) |
Check if a keyboard event fits a certain command action. | |
bool | keyFitsOffsetAction (SoOffsetAction *action, int modifiers, SoKeyboardEvent::Key nKey, double &sensitivityX, double &sensitivityY, bool &swapAxes) |
Check if a keyboard event fits a certain offset action. | |
void | setKeyboardActionExecuted () |
Prevent further keyboard actions from being executed. | |
bool | mayExecuteKeyboardAction () const |
Check if it is allowed to execute keyboard actions. | |
SoPointingAction::TriggerList | getTriggers (SoPointingAction *action) |
get current triggers for a pointing action | |
SoCommandAction::ShortcutList | getShortcuts (SoCommandAction *action) |
get current shortcuts for a command action | |
SoOffsetAction::TriggerList | getTriggers (SoOffsetAction *action) |
get current triggers for an offset action | |
Static Public Member Functions | |
static void | initClass () |
Initialization of the inventor runtime type system. | |
Public Attributes | |
SoSFString | activePointingAction |
This field contains the id of the pointing action that would be activated on left mouse click or which is currently active (dragging). | |
SoSFString | activePointingActionProvider |
This field contains the id of the provider of the pointing action. | |
SoSFBool | inDrag |
This flag is true if an pointer action is active (dragging). | |
SoSFString | activePointingActionStatus |
Status string returned by the pointing action indicated by activePointerAction. | |
SoSFBool | enableMouseHandling |
If this flag is false, no pointing actions are enabled. | |
SoSFBool | enableKeyHandling |
If this flag is false, no command actions will be executed when a key is pressed. | |
SoSFBool | enableWheelHandling |
If this flag is false, no offset actions will be executed when the mouse wheel is rotated. | |
Protected Member Functions | |
void | setDragging (bool dragging=true) override |
Method inherited from SoInteractionCoordinator, overridden to update the inDrag field. | |
Protected Member Functions inherited from SoInteractionCoordinator | |
void | unsetPointingActionSelected () |
reset _pointingActionSelected flag (before traversing the scene) | |
Additional Inherited Members | |
Protected Attributes inherited from SoInteractionCoordinator | |
bool | _maySelectPointingAction |
bool | _mayExecuteKeyboardAction |
bool | _mayExecuteWheelAction |
SoInteractionController is the controlling instance of managed interactions.
It should be instantiated by the viewer and contain the remaining scene graph. SoInteractionController will pass itself as a SoInteractionCoordinator through the SoInteractionCoordinatorElement into the scene, where it can be queried e.g. by SoInteractionHandlers. SoInteractionController is the controlling instance of managed interactions. It should be instantiated by the viewer and contain the remaining scene graph. SoInteractionController will pass itself as a SoInteractionCoordinator through the SoInteractionCoordinatorElement into the scene, where it can be queried e.g. by SoInteractionHandlers.
Definition at line 46 of file SoInteractionController.h.
SoInteractionController::SoInteractionController | ( | ) |
Default constructor.
|
override |
Destructor.
|
override |
Handles the mouse and keyboard events and send them to interaction nodes.
Initialization of the inventor runtime type system.
|
inlineoverridevirtual |
Return if the drag threshold was exceeded, that is, endPress will get a clickCount of 0.
Reimplemented from SoInteractionCoordinator.
Definition at line 88 of file SoInteractionController.h.
Method inherited from SoInteractionCoordinator, overridden to update the inDrag field.
Reimplemented from SoInteractionCoordinator.
SoSFString SoInteractionController::activePointingAction |
This field contains the id of the pointing action that would be activated on left mouse click or which is currently active (dragging).
Definition at line 64 of file SoInteractionController.h.
SoSFString SoInteractionController::activePointingActionProvider |
This field contains the id of the provider of the pointing action.
Definition at line 67 of file SoInteractionController.h.
SoSFString SoInteractionController::activePointingActionStatus |
Status string returned by the pointing action indicated by activePointerAction.
Definition at line 73 of file SoInteractionController.h.
SoSFBool SoInteractionController::enableKeyHandling |
If this flag is false, no command actions will be executed when a key is pressed.
Definition at line 79 of file SoInteractionController.h.
SoSFBool SoInteractionController::enableMouseHandling |
If this flag is false, no pointing actions are enabled.
Definition at line 76 of file SoInteractionController.h.
SoSFBool SoInteractionController::enableWheelHandling |
If this flag is false, no offset actions will be executed when the mouse wheel is rotated.
Definition at line 82 of file SoInteractionController.h.
SoSFBool SoInteractionController::inDrag |
This flag is true if an pointer action is active (dragging).
Definition at line 70 of file SoInteractionController.h.