#include <SoInteractionHandler.h>
|
| bool | handleKeyPress (SoState *state, const SoPointerPosition &location, int modifiers, SoKeyboardEvent::Key nKey, bool positionValid) |
| virtual bool | augmentLocation (SoPointerPosition &, bool) |
| void | buttonMaskChanged (SoState *state, const SoPointerPosition &location, int buttonMask) |
| | Called if the button mask changed since the last input event.
|
| void | modifierMaskChanged (SoState *state, const SoPointerPosition &location, int modifierMask) |
| | Called if the modifier mask changed since the last input event.
|
| void | locationChanged (SoState *state, const SoPointerPosition &location, bool force=false, bool renderRefresh=false) |
| bool | wheelRotated (SoState *state, const SoPointerPosition &location, int modifierMask, SoMouseWheelEvent::Orientation orientation, short rotation) |
| void | handlePointerLeftWindow (SoState *state) |
| | Called if the pointer left the scene widget.
|
| SoInteractionCoordinator * | getCoordinator () |
| | Access method, returns the interaction coordinator during event handling.
|
| SoPointingAction * | getLocalCurrentPointingAction () |
| virtual bool | isEnabled (SoPointingAction *action, int currentMask) |
| virtual bool | isValidStartingLocation (const SoPointerPosition &location) |
| bool | canSelectPointingAction () |
| void | selectTargetPointingAction (SoState *state, const SoPointerPosition &location, int mask) |
| bool | trySwitchGlobalPointingAction (SoState *state, const SoPointerPosition &location, int buttonMask, int modifierMask) |
| int | getCurrentButtonMask () |
| int | getCurrentModifierMask () |
| | Returns the currently active button modifier.
|
| SoPointerPosition | getCurrentPointerLocation () |
| | Returns the current position of the mouse cursor.
|
| bool | isCurrentPointerLocationValid () |
| | Returns whether the current mouse cursor position is valid.
|
SoInteractionHandler is a mix-in class for instances of SoNode to handle the interactions it provides in the handleEvent method.
Definition at line 35 of file SoInteractionHandler.h.
◆ SoInteractionHandler()
◆ ~SoInteractionHandler()
| virtual SoInteractionHandler::~SoInteractionHandler |
( |
| ) |
|
|
virtual |
◆ augmentLocation()
This method can be overridden to provide further position information to SoPointingActions,e.g., slice information for SoView2DExtensions. The dragging argument tells us whether any mouse button is pressed before this fact is really evaluated!
- Returns
false if augmenting was not possible and actions should not be executed for this node.
Reimplemented in View2DInteractionHandler.
Definition at line 56 of file SoInteractionHandler.h.
◆ buttonMaskChanged()
| void SoInteractionHandler::buttonMaskChanged |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | buttonMask ) |
|
protected |
Called if the button mask changed since the last input event.
◆ canSelectPointingAction()
| bool SoInteractionHandler::canSelectPointingAction |
( |
| ) |
|
|
protected |
◆ getCoordinator()
Access method, returns the interaction coordinator during event handling.
Definition at line 91 of file SoInteractionHandler.h.
◆ getCurrentButtonMask()
| int SoInteractionHandler::getCurrentButtonMask |
( |
| ) |
|
|
inlineprotected |
◆ getCurrentModifierMask()
| int SoInteractionHandler::getCurrentModifierMask |
( |
| ) |
|
|
inlineprotected |
◆ getCurrentPointerLocation()
◆ getLocalCurrentPointingAction()
◆ handleEventForInteraction()
| virtual void SoInteractionHandler::handleEventForInteraction |
( |
SoHandleEventAction * | action | ) |
|
|
virtual |
Handles the mouse and keyboard events and send them to interaction nodes.
◆ handleKeyPress()
| bool SoInteractionHandler::handleKeyPress |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | modifiers, |
|
|
SoKeyboardEvent::Key | nKey, |
|
|
bool | positionValid ) |
|
protected |
Handles a key press by checking for commands actions with matching key shortcuts and executing (one of) them.
◆ handlePointerLeftWindow()
| void SoInteractionHandler::handlePointerLeftWindow |
( |
SoState * | state | ) |
|
|
protected |
Called if the pointer left the scene widget.
◆ isCurrentPointerLocationValid()
| bool SoInteractionHandler::isCurrentPointerLocationValid |
( |
| ) |
|
|
inlineprotected |
◆ isEnabled()
| virtual bool SoInteractionHandler::isEnabled |
( |
SoPointingAction * | action, |
|
|
int | currentMask ) |
|
protectedvirtual |
This method returns whether the pointing action should be enabled for the given modifier/button mask. Override this if you want to impose further constraints.
Reimplemented in View2DInteractionHandler.
◆ isValidStartingLocation()
| virtual bool SoInteractionHandler::isValidStartingLocation |
( |
const SoPointerPosition & | location | ) |
|
|
protectedvirtual |
This method returns whether the current location is valid for starting a pointing action. This is mainly used for SoView2D, where several SoView2Ds may provide the same actions, only at different device positions (and with different voxel/world transformations). This method always returns true by default.
Reimplemented in View2DInteractionHandler.
◆ locationChanged()
| void SoInteractionHandler::locationChanged |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
bool | force = false, |
|
|
bool | renderRefresh = false ) |
|
protected |
Called if the pointer location changed since the last input event. If force is true, the handling is forced even if the position has not changed. If renderRefresh is also true, this is not a real location change but only a refresh that happens directly before rendering.
◆ modifierMaskChanged()
| void SoInteractionHandler::modifierMaskChanged |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | modifierMask ) |
|
protected |
Called if the modifier mask changed since the last input event.
◆ selectTargetPointingAction()
| void SoInteractionHandler::selectTargetPointingAction |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | mask ) |
|
protected |
◆ trySwitchGlobalPointingAction()
| bool SoInteractionHandler::trySwitchGlobalPointingAction |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | buttonMask, |
|
|
int | modifierMask ) |
|
protected |
Attemps to switch from one global pointing action to another during a drag. This is only allowed for global pointing actions since position specific interactions probably should not be aborted in mid-drag.
◆ wheelRotated()
| bool SoInteractionHandler::wheelRotated |
( |
SoState * | state, |
|
|
const SoPointerPosition & | location, |
|
|
int | modifierMask, |
|
|
SoMouseWheelEvent::Orientation | orientation, |
|
|
short | rotation ) |
|
protected |
Called when the mouse wheel is rotated. The location is only given to provide the augmented location to the offset action.
The documentation for this class was generated from the following file: