13 #ifndef SO_INTERACTION_COORDINATOR_H
14 #define SO_INTERACTION_COORDINATOR_H
20 #include <ThirdPartyWarningsDisable.h>
23 #include <Inventor/events/SoKeyboardEvent.h>
24 #include <ThirdPartyWarningsRestore.h>
127 double& sensitivityX,
double& sensitivityY,
bool& swapAxes);
141 double& sensitivityX,
double& sensitivityY,
bool& swapAxes);
182 std::list<SoInteractionMapper*> _mappers;
196 bool _pointingActionSelected;
199 bool _currentPointingActionAllowed;
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
SoCommandAction is the base class for instantaneous actions.
std::list< Shortcut > ShortcutList
A list of shortcuts.
Provides a coordinating interface to the SoInteractionHandlers in the scene.
bool isCancelled() const
This returns true if the current drag action has been canceled.
void addMapper(SoInteractionMapper *mapper)
Adds an instance to override pointing and command action mappings.
bool _maySelectPointingAction
void cancelDrag()
Cancels the current drag action if this was not done already.
SoCommandAction::ShortcutList getShortcuts(SoCommandAction *action)
Returns the current shortcuts for a command action.
virtual int getModeFromModifiers(int numModes, int modifierMask)
Returns the mode number to set for a total number of modes and the current modifier mask.
SoInteractionCoordinator()
virtual void setSelectedPointingAction(SoPointingAction *action, SoInteractionHandler *handler, const SoPointerPosition &location, bool allowed=true)
This method sets the new selected pointing action.
SoPointingAction::TriggerList getTriggers(SoPointingAction *action)
Returns the current triggers for a pointing action.
bool wheelModifiersFitOffsetAction(SoOffsetAction *action, int modifiers, double &sensitivityX, double &sensitivityY, bool &swapAxes)
Checks whether the current modifiers allow to execute a wheel action; also returns the sensitivity se...
SoOffsetAction::TriggerList getTriggers(SoOffsetAction *action)
Returns current triggers for an offset action.
void affirmSelectedPointingAction()
Affirms currently selected pointing action.
virtual bool startPress(const SoPointerPosition &position, int modifierMask)
Starts a mouse button press for current action.
void setKeyboardActionExecuted()
Prevents further keyboard actions from being executed.
bool mayExecuteKeyboardAction() const
Checks whether it is allowed to execute keyboard actions.
bool keyFitsCommandAction(SoCommandAction *action, int modifiers, SoKeyboardEvent::Key nKey)
Checks whether a keyboard event fits a certain command action.
void clearMappers()
Clears the list of mappers.
bool getCurrentPointingActionAllowed() const
Returns whether the current pointing action may be applied at the current location.
virtual bool isDragging()
Queries the flag indicating drag action.
void setWheelActionExecuted()
Prevents further wheel actions from being executed.
size_t getNumMappers()
Returns the number of added mappers, to be used with truncateMappers.
virtual bool isPointingActionActive(SoPointingAction *action, int currentMask)
This method will be used to override the default action selection mechanism.
bool _mayExecuteWheelAction
SoPointingAction * getCurrentPointingAction() const
Returns the currently selected pointing action.
virtual void endPress(int clickCount)
Stops a mouse button press for current action.
SoInteractionHandler * getLockedPointingActionHandler()
Returns the handler for locked pointing action.
bool keyFitsOffsetAction(SoOffsetAction *action, int modifiers, SoKeyboardEvent::Key nKey, double &sensitivityX, double &sensitivityY, bool &swapAxes)
Checks whether a keyboard event fits a certain offset action.
SoInteractionHandler * getCurrentPointingActionHandler() const
Returns the handler for currently selected pointing action.
virtual int getModeModifierMask(int numModes)
Returns a mask that covers all modifier flags that are needed for the given number of drag modes.
void truncateMappers(size_t n=0)
Truncates the list of mappers to the given number, used for push/pop semantics.
bool maySelectPointingAction() const
Returns whether one is even allowed to select a (new) pointing action.
bool mayExecuteWheelAction() const
Checks whether it is allowed to execute wheel actions.
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 ...
virtual void setDragging(bool dragging)
Sets the flag indicating drag action.
void unsetPointingActionSelected()
Resets the _pointingActionSelected flag (before traversing the scene).
bool _mayExecuteKeyboardAction
void grabReleasedByAction(SoPointingAction *action)
This method is called from a PointingAction if a grab should be released.
SoPointingAction * getLockedPointingAction()
Returns the locked pointing action.
virtual bool isDragThresholdExceeded() const
Must be overridden to implement click detection.
bool isPointingActionSelected() const
Finds out whether the pointing action has been set during the current scene graph traversal.
virtual ~SoInteractionCoordinator()
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides...
SoInteractionMapper is the base class for instances that map SoPointingActions or SoCommandActions to...
SoOffsetAction is the base class for any interaction that only provides (numeric) offsets in one or t...
std::list< Trigger > TriggerList
List of triggers.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
std::list< Trigger > TriggerList
List of triggers.