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 coordinating interface to the SoInteractionHandlers in the scene.
bool isCancelled() const
This returns true if the current drag action has been cancelled.
void addMapper(SoInteractionMapper *mapper)
Add an instance to override pointing and command action mappings.
bool _maySelectPointingAction
void cancelDrag()
Cancel the current drag action (if this wasn't done already).
SoCommandAction::ShortcutList getShortcuts(SoCommandAction *action)
get current shortcuts for a command action
virtual int getModeFromModifiers(int numModes, int modifierMask)
Get 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)
get current triggers for a pointing action
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...
SoOffsetAction::TriggerList getTriggers(SoOffsetAction *action)
get current triggers for an offset action
void affirmSelectedPointingAction()
Affirm currently selected pointing action (this prevents other nodes from changing the action without...
virtual bool startPress(const SoPointerPosition &position, int modifierMask)
Start mouse button press for current action.
void setKeyboardActionExecuted()
Prevent further keyboard actions from being executed.
SoInteractionHandler * getCurrentPointingActionHandler() const
Get handler for currently selected pointing action.
bool mayExecuteKeyboardAction() const
Check if it is allowed to execute keyboard actions.
bool keyFitsCommandAction(SoCommandAction *action, int modifiers, SoKeyboardEvent::Key nKey)
Check if a keyboard event fits a certain command action.
void clearMappers()
Clear list of mappers.
bool getCurrentPointingActionAllowed() const
Get if the current pointing action may be applied at the current location.
virtual bool isDragging()
Query flag indicating drag action.
void setWheelActionExecuted()
Prevent further wheel actions from being executed.
SoPointingAction * getCurrentPointingAction() const
Get currently selected pointing action.
size_t getNumMappers()
Return 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
SoInteractionHandler * getLockedPointingActionHandler()
Get handler for locked pointing action.
virtual void endPress(int clickCount)
Stop mouse button press for current 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.
virtual int getModeModifierMask(int numModes)
Return a mask that covers all modifier flags that are needed for the given number of drag modes.
void truncateMappers(size_t n=0)
Truncate list of mappers to the given number, used for push/pop semantics.
bool maySelectPointingAction() const
Return whether one is even allowed to select a (new) pointing action.
SoPointingAction * getLockedPointingAction()
Get locked pointing action.
bool mayExecuteWheelAction() const
Check if 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)
Set flag indicating drag action.
void unsetPointingActionSelected()
reset _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.
virtual bool isDragThresholdExceeded() const
Must be overridden to implement click detection.
bool isPointingActionSelected() const
Find 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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.