13#ifndef SO_POINTING_ACTION_H
14#define SO_POINTING_ACTION_H
109 enum { TypeId = TypePointingAction };
272 bool _positionSensitive;
276 TriggerList _triggers;
282 void* _grabReleaseData;
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
void(* grabReleaseFunc)(SoPointingAction *, void *)
@ Button3Mask
Right button.
@ Button1Mask
Left button.
@ AllButtonsMask
All buttons.
@ Button2Mask
Middle button.
Provides coordinating interface to the SoInteractionHandlers in the scene.
SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects.
SoInteractionProvider is an abstract interface class that provides interactions to the SoInteractionC...
SoInteraction is the base class for SoCommandAction, SoPointingAction, and SoOffsetAction.
SoOffsetAction is the base class for any interaction that only provides (numeric) offsets in one or t...
SoOffsetPointingAction is an internal proxy class that helps controlling SoOffsetActions through a So...
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
StopMode
Argument type for releaseGrab()
@ AbortAction
Current action should be aborted.
TriggerList getTriggers() const
Returns the list of default modifier/button mask combinations set for this action.
SoPointingAction(SoInteractionOwner *owner, std::string id, bool positionSensitive=true)
Standard constructor.
virtual SoOffsetAction * proxiedOffsetAction() const
virtual void dragCancelled()
This is called if the current drag operation is cancelled, e.g.
void addTrigger(const Trigger &trigger)
Adds another default modifier/button mask as trigger.
virtual void unsetHighlight()
Remove any highlighting if this method is called.
virtual std::string getCurrentStatusMessage() const
Returns a status message for display in status bar (make it short!), this will get called at same tim...
virtual SoPointingAction * endPress(int clickCount)=0
Ends the drag at last device position.
ManagedMouseButtonTrigger Trigger
Class Trigger encapsulates the combination of required and ignored button and modifier keys that acti...
virtual void setMode(int)
This gets called if the mode was changed and before startPressAt is called.
virtual int getCurrentCursor(SoViewerProxy *) const
Returns the cursor ID to display for this action, as defined in SoViewerProxy.h - this gets (at least...
virtual bool isPositionSensitive() const
Position sensitive actions can only start at positions where isSensitiveAt() return true.
virtual int getNumModes() const
Returns the number of different modes this action has - modes can be changed during drag and handle d...
virtual void startPressAt(const SoPointerPosition &pos)=0
Starts a drag at given device position.
virtual bool wantsImmediateDragUpdates()
Let this method return false if you don't want dragMoveTo to be called until it is clear that the int...
void clearTriggers()
remove all triggers
std::list< Trigger > TriggerList
List of triggers.
void setTrigger(const Trigger &trigger)
Same with Trigger object.
virtual void releaseGrab(StopMode)
This will be called by the controller if you should release the grab established by endPress.
void setTrigger(int triggerMask, int ignoreMask=0)
Sets the (only) default modifier/button mask for triggering this action.
virtual bool wantsMouseOverUpdates()
Override this to return true if this action should get location updates directly before rendering,...
virtual bool triggersAction(int mask)
Returns whether the given modifier/button combination activates this action according to the default ...
virtual void setHighlightAt(const SoPointerPosition &)
This method is called so that highlighting of objects under the mouse cursor can occur.
virtual void dragMoveTo(const SoPointerPosition &pos)=0
Continues the drag to given device position.
void grabReleased()
Call this to release an interaction grab that has been established by the return value of endPress(),...
virtual bool isSensitiveAt(const SoPointerPosition &pos)=0
Returns true if the gesture is startable at the given device position.
This class gives access to state of a viewer during scene graph traversal.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.