MeVisLab Toolbox Reference
|
Provides coordinating interface to the SoInteractionHandlers in the scene. More...
#include <SoInteractionCoordinator.h>
Public Member Functions | |
SoInteractionCoordinator () | |
virtual | ~SoInteractionCoordinator () |
size_t | getNumMappers () |
Return number of added mappers, to be used with truncateMappers. More... | |
void | addMapper (SoInteractionMapper *mapper) |
Add an instance to override pointing and command action mappings. More... | |
void | clearMappers () |
Clear list of mappers. More... | |
void | truncateMappers (size_t n=0) |
Truncate list of mappers to the given number, used for push/pop semantics. More... | |
virtual void | setSelectedPointingAction (SoPointingAction *action, SoInteractionHandler *handler, const SoPointerPosition &location, bool allowed=true) |
This method sets the new selected pointing action. More... | |
SoPointingAction * | getCurrentPointingAction () const |
Get currently selected pointing action. More... | |
SoInteractionHandler * | getCurrentPointingActionHandler () const |
Get handler for currently selected pointing action. More... | |
bool | getCurrentPointingActionAllowed () const |
Get if the current pointing action may be applied at the current location. More... | |
void | affirmSelectedPointingAction () |
Affirm currently selected pointing action (this prevents other nodes from changing the action without doing anything else) More... | |
bool | isPointingActionSelected () const |
Find out whether the pointing action has been set during the current scene graph traversal. More... | |
bool | maySelectPointingAction () const |
Return whether one is even allowed to select a (new) pointing action. More... | |
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. More... | |
SoPointingAction * | getLockedPointingAction () |
Get locked pointing action. More... | |
SoInteractionHandler * | getLockedPointingActionHandler () |
Get handler for locked pointing action. More... | |
void | grabReleasedByAction (SoPointingAction *action) |
This method is called from a PointingAction if a grab should be released. More... | |
virtual bool | isPointingActionActive (SoPointingAction *action, int currentMask) |
This method will be used to override the default action selection mechanism. More... | |
virtual int | getModeModifierMask (int numModes) |
Return a mask that covers all modifier flags that are needed for the given number of drag modes. More... | |
virtual int | getModeFromModifiers (int numModes, int modifierMask) |
Get mode number to set for a total number of modes and the current modifier mask. More... | |
virtual bool | startPress (const SoPointerPosition &position, int modifierMask) |
Start mouse button press for current action. More... | |
virtual void | endPress (int clickCount) |
Stop mouse button press for current action. More... | |
virtual bool | isDragging () |
Query flag indicating drag action. More... | |
bool | isCancelled () const |
This returns true if the current drag action has been cancelled. More... | |
void | cancelDrag () |
Cancel the current drag action (if this wasn't done already). More... | |
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. More... | |
void | setWheelActionExecuted () |
Prevent further wheel actions from being executed. More... | |
bool | mayExecuteWheelAction () const |
Check if it is allowed to execute wheel actions. More... | |
bool | keyFitsCommandAction (SoCommandAction *action, int modifiers, SoKeyboardEvent::Key nKey) |
Check if a keyboard event fits a certain command action. More... | |
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. More... | |
void | setKeyboardActionExecuted () |
Prevent further keyboard actions from being executed. More... | |
bool | mayExecuteKeyboardAction () const |
Check if it is allowed to execute keyboard actions. More... | |
virtual bool | isDragThresholdExceeded () const |
Must be overridden to implement click detection. More... | |
SoPointingAction::TriggerList | getTriggers (SoPointingAction *action) |
get current triggers for a pointing action More... | |
SoCommandAction::ShortcutList | getShortcuts (SoCommandAction *action) |
get current shortcuts for a command action More... | |
SoOffsetAction::TriggerList | getTriggers (SoOffsetAction *action) |
get current triggers for an offset action More... | |
Protected Member Functions | |
virtual void | setDragging (bool dragging) |
Set flag indicating drag action. More... | |
void | unsetPointingActionSelected () |
reset _pointingActionSelected flag (before traversing the scene) More... | |
Protected Attributes | |
bool | _maySelectPointingAction |
bool | _mayExecuteKeyboardAction |
bool | _mayExecuteWheelAction |
Provides coordinating interface to the SoInteractionHandlers in the scene.
Definition at line 34 of file SoInteractionCoordinator.h.
SoInteractionCoordinator::SoInteractionCoordinator | ( | ) |
|
virtual |
void SoInteractionCoordinator::addMapper | ( | SoInteractionMapper * | mapper | ) |
Add an instance to override pointing and command action mappings.
Earlier mappings will override later mappings. The mappers will still be owned by the caller.
|
inline |
Affirm currently selected pointing action (this prevents other nodes from changing the action without doing anything else)
Definition at line 74 of file SoInteractionCoordinator.h.
void SoInteractionCoordinator::cancelDrag | ( | ) |
Cancel the current drag action (if this wasn't done already).
This will be reset when all mouse buttons are relased.
void SoInteractionCoordinator::clearMappers | ( | ) |
Clear list of mappers.
|
virtual |
Stop mouse button press for current action.
|
inline |
Get currently selected pointing action.
Definition at line 64 of file SoInteractionCoordinator.h.
|
inline |
Get if the current pointing action may be applied at the current location.
Definition at line 70 of file SoInteractionCoordinator.h.
|
inline |
Get handler for currently selected pointing action.
Definition at line 67 of file SoInteractionCoordinator.h.
|
inline |
Get locked pointing action.
Definition at line 88 of file SoInteractionCoordinator.h.
|
inline |
Get handler for locked pointing action.
Definition at line 91 of file SoInteractionCoordinator.h.
|
virtual |
Get mode number to set for a total number of modes and the current modifier mask.
Can be overridden to change the modifier handling.
|
virtual |
Return a mask that covers all modifier flags that are needed for the given number of drag modes.
Can be overridden to change the modifier handling.
size_t SoInteractionCoordinator::getNumMappers | ( | ) |
Return number of added mappers, to be used with truncateMappers.
SoCommandAction::ShortcutList SoInteractionCoordinator::getShortcuts | ( | SoCommandAction * | action | ) |
get current shortcuts for a command action
SoOffsetAction::TriggerList SoInteractionCoordinator::getTriggers | ( | SoOffsetAction * | action | ) |
get current triggers for an offset action
SoPointingAction::TriggerList SoInteractionCoordinator::getTriggers | ( | SoPointingAction * | action | ) |
get current triggers for a pointing action
void SoInteractionCoordinator::grabReleasedByAction | ( | SoPointingAction * | action | ) |
This method is called from a PointingAction if a grab should be released.
|
inline |
This returns true if the current drag action has been cancelled.
Definition at line 118 of file SoInteractionCoordinator.h.
|
inlinevirtual |
Query flag indicating drag action.
Definition at line 115 of file SoInteractionCoordinator.h.
|
inlinevirtual |
Must be overridden to implement click detection.
Reimplemented in SoInteractionController.
Definition at line 150 of file SoInteractionCoordinator.h.
|
virtual |
This method will be used to override the default action selection mechanism.
|
inline |
Find out whether the pointing action has been set during the current scene graph traversal.
Definition at line 78 of file SoInteractionCoordinator.h.
bool SoInteractionCoordinator::keyFitsCommandAction | ( | SoCommandAction * | action, |
int | modifiers, | ||
SoKeyboardEvent::Key | nKey | ||
) |
Check if a keyboard event fits a certain command action.
bool SoInteractionCoordinator::keyFitsOffsetAction | ( | SoOffsetAction * | action, |
int | modifiers, | ||
SoKeyboardEvent::Key | nKey, | ||
double & | sensitivityX, | ||
double & | sensitivityY, | ||
bool & | swapAxes | ||
) |
Check if a keyboard event fits a certain offset action.
|
inline |
Check if it is allowed to execute keyboard actions.
Definition at line 147 of file SoInteractionCoordinator.h.
|
inline |
Check if it is allowed to execute wheel actions.
Definition at line 133 of file SoInteractionCoordinator.h.
|
inline |
Return whether one is even allowed to select a (new) pointing action.
Definition at line 81 of file SoInteractionCoordinator.h.
|
protectedvirtual |
Set flag indicating drag action.
Reimplemented in SoInteractionController.
|
inline |
Prevent further keyboard actions from being executed.
Definition at line 144 of file SoInteractionCoordinator.h.
|
virtual |
Setting the locked pointing action with this method ensures that a callback is set to be informed of an external grab release.
|
virtual |
This method sets the new selected pointing action.
The location is given so that the action can update its highlighting.
|
inline |
Prevent further wheel actions from being executed.
Definition at line 130 of file SoInteractionCoordinator.h.
|
virtual |
Start mouse button press for current action.
void SoInteractionCoordinator::truncateMappers | ( | size_t | n = 0 | ) |
Truncate list of mappers to the given number, used for push/pop semantics.
The mappers are not freed!
|
inlineprotected |
reset _pointingActionSelected flag (before traversing the scene)
Definition at line 167 of file SoInteractionCoordinator.h.
bool SoInteractionCoordinator::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.
|
protected |
Definition at line 173 of file SoInteractionCoordinator.h.
|
protected |
Definition at line 176 of file SoInteractionCoordinator.h.
|
protected |
Definition at line 170 of file SoInteractionCoordinator.h.