13#ifndef SO_INTERACTION_HANDLER_H
14#define SO_INTERACTION_HANDLER_H
22#include <ThirdPartyWarningsDisable.h>
23#include <Inventor/events/SoKeyboardEvent.h>
24#include <Inventor/events/SoMouseWheelEvent.h>
27#include <ThirdPartyWarningsRestore.h>
72 SoMouseWheelEvent::Orientation orientation,
short rotation);
124 std::list<SoPointingAction*> getPointingActions(
SoState* state);
136 int _currentButtonMask;
137 int _currentModifierMask;
139 bool _currentPointerLocationValid;
142 bool _pointingActionFound;
146 bool _hadPointerUpdate;
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
Provides coordinating interface to the SoInteractionHandlers in the scene.
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides...
bool handleKeyPress(SoState *state, const SoPointerPosition &location, int modifiers, SoKeyboardEvent::Key nKey)
Handles key press by checking for commands actions with matching key shortcuts and executing (one of)...
void handlePointerLeftWindow(SoState *state)
Called if the pointer left the scene widget.
virtual bool isValidStartingLocation(const SoPointerPosition &location)
This method returns whether the current location is valid for starting a pointing action.
SoPointerPosition getCurrentPointerLocation()
Returns the current position of the mouse cursor.
bool isCurrentPointerLocationValid()
Returns whether the current mouse cursor position is valid.
SoInteractionHandler(SoInteractionProvider *provider)
void selectTargetPointingAction(SoState *state, const SoPointerPosition &location, int mask)
void modifierMaskChanged(SoState *state, const SoPointerPosition &location, int modifierMask)
Called if the modifier mask changed since the last input event.
bool wheelRotated(SoState *state, const SoPointerPosition &location, int modifierMask, SoMouseWheelEvent::Orientation orientation, short rotation)
Called when the mouse wheel is rotated.
bool trySwitchGlobalPointingAction(SoState *state, const SoPointerPosition &location, int buttonMask, int modifierMask)
Tries to switch from one global pointing action to another during a drag.
int getCurrentButtonMask()
virtual ~SoInteractionHandler()
virtual void handleEventForInteraction(SoHandleEventAction *action)
Handles the mouse and keyboard events and send them to interaction nodes.
void buttonMaskChanged(SoState *state, const SoPointerPosition &location, int buttonMask)
Called if the button mask changed since the last input event.
SoPointingAction * getLocalCurrentPointingAction()
bool canSelectPointingAction()
virtual bool isEnabled(SoPointingAction *action, int currentMask)
This method returns true if the pointing action should be enabled for the given modifier/button mask.
int getCurrentModifierMask()
Returns the currently active button modifier.
void locationChanged(SoState *state, const SoPointerPosition &location, bool force=false, bool renderRefresh=false)
Called if the pointer location changed since the last input event.
virtual bool augmentLocation(SoPointerPosition &, bool)
This method can be overridden to provide further position information to SoPointingActions - e....
SoInteractionCoordinator * getCoordinator()
Access method, returns the interaction coordinator during event handling.
SoInteractionProvider is an abstract interface class that provides interactions to the SoInteractionC...
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.