MeVisLab Toolbox Reference
View2DInteractionHandler Class Reference

View2DInteractionHandler is derived from SoInteractionHandler mainly to provide additional SoView2D information to the SoPointerPosition passed to many SoPointingAction methods. More...

#include <SoView2DInteraction.h>

Inheritance diagram for View2DInteractionHandler:
SoInteractionHandler

Public Member Functions

 View2DInteractionHandler (SoView2D *viewer, SoInteractionProvider *provider)
 
- Public Member Functions inherited from SoInteractionHandler
 SoInteractionHandler (SoInteractionProvider *provider)
 
virtual ~SoInteractionHandler ()
 
virtual void handleEventForInteraction (SoHandleEventAction *action)
 Handles the mouse and keyboard events and send them to interaction nodes. More...
 

Protected Member Functions

bool augmentLocation (SoPointerPosition &position, bool dragging) override
 Set SoView2D information in position. More...
 
bool isEnabled (SoPointingAction *action, int currentMask) override
 Only enable actions if the image in the SoView2D is valid. More...
 
bool isValidStartingLocation (const SoPointerPosition &location) override
 Only start pointing actions on a valid starting location (to allow cooperation between multiple SoView2Ds) More...
 
- Protected Member Functions inherited from SoInteractionHandler
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) them. More...
 
void buttonMaskChanged (SoState *state, const SoPointerPosition &location, int buttonMask)
 Called if the button mask changed since the last input event. More...
 
void modifierMaskChanged (SoState *state, const SoPointerPosition &location, int modifierMask)
 Called if the modifier mask changed since the last input event. More...
 
void locationChanged (SoState *state, const SoPointerPosition &location, bool force=false, bool renderRefresh=false)
 Called if the pointer location changed since the last input event. More...
 
bool wheelRotated (SoState *state, const SoPointerPosition &location, int modifierMask, SoMouseWheelEvent::Orientation orientation, short rotation)
 Called when the mouse wheel is rotated. More...
 
void handlePointerLeftWindow (SoState *state)
 Called if the pointer left the scene widget. More...
 
SoInteractionCoordinatorgetCoordinator ()
 Access method, returns the interaction coordinator during event handling. More...
 
SoPointingActiongetLocalCurrentPointingAction ()
 
bool canSelectPointingAction ()
 
void selectTargetPointingAction (SoState *state, const SoPointerPosition &location, int mask)
 
bool trySwitchGlobalPointingAction (SoState *state, const SoPointerPosition &location, int buttonMask, int modifierMask)
 Tries to switch from one global pointing action to another during a drag. More...
 
int getCurrentButtonMask ()
 
int getCurrentModifierMask ()
 Returns the currently active button modifier. More...
 
SoPointerPosition getCurrentPointerLocation ()
 Returns the current position of the mouse cursor. More...
 
bool isCurrentPointerLocationValid ()
 Returns whether the current mouse cursor position is valid. More...
 

Protected Attributes

MutableView2DPosition _view2DPosition
 We always use the same View2DPosition object - we can only get one event at a time, so this is adequate... More...
 
SoView2D_viewer
 Back-reference to the SoView2D object. More...
 
bool _dragging
 While dragging convert positions relative to the start slice. More...
 

Detailed Description

View2DInteractionHandler is derived from SoInteractionHandler mainly to provide additional SoView2D information to the SoPointerPosition passed to many SoPointingAction methods.

Definition at line 39 of file SoView2DInteraction.h.

Constructor & Destructor Documentation

◆ View2DInteractionHandler()

View2DInteractionHandler::View2DInteractionHandler ( SoView2D viewer,
SoInteractionProvider provider 
)

Member Function Documentation

◆ augmentLocation()

bool View2DInteractionHandler::augmentLocation ( SoPointerPosition position,
bool  dragging 
)
overrideprotectedvirtual

Set SoView2D information in position.

Reimplemented from SoInteractionHandler.

◆ isEnabled()

bool View2DInteractionHandler::isEnabled ( SoPointingAction action,
int  currentMask 
)
overrideprotectedvirtual

Only enable actions if the image in the SoView2D is valid.

Reimplemented from SoInteractionHandler.

◆ isValidStartingLocation()

bool View2DInteractionHandler::isValidStartingLocation ( const SoPointerPosition location)
overrideprotectedvirtual

Only start pointing actions on a valid starting location (to allow cooperation between multiple SoView2Ds)

Reimplemented from SoInteractionHandler.

Member Data Documentation

◆ _dragging

bool View2DInteractionHandler::_dragging
protected

While dragging convert positions relative to the start slice.

Definition at line 63 of file SoView2DInteraction.h.

◆ _view2DPosition

MutableView2DPosition View2DInteractionHandler::_view2DPosition
protected

We always use the same View2DPosition object - we can only get one event at a time, so this is adequate...

Definition at line 57 of file SoView2DInteraction.h.

◆ _viewer

SoView2D* View2DInteractionHandler::_viewer
protected

Back-reference to the SoView2D object.

Definition at line 60 of file SoView2DInteraction.h.


The documentation for this class was generated from the following file: