MeVisLab Toolbox Reference
SoInteractionOwner Class Referenceabstract

SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects. More...

#include <SoInteractionOwner.h>

Inheritance diagram for SoInteractionOwner:
SoInteractionProvider SoInteractionProviderNode SoView2D SoInteractionNode SoView2DExtension SoCSO3DVis SoCSODrawOnSurface SoMouseGrabber SoPicking SoView2DBorder SoView2DCSOEditor SoView2DCSOExtensibleEditor SoView2DCallback SoView2DCine SoView2DCurrentState SoView2DDeformationGridView SoView2DEnlargeOnClick SoView2DExtensionSampler SoView2DExtensionSeparator SoView2DGrid SoView2DInteractionExtension SoView2DLegend SoView2DMagnifyController SoView2DRuler SoView2DShaderDevicePosition SoView2DShaderOverlay SoView2DTouchControl SoView2DTransRot SoView2DVectorFieldView SoView2DVoxelView

Public Member Functions

 SoInteractionOwner ()
 Default constructor. More...
 
 ~SoInteractionOwner () override
 The destructor will destroy all interactions created with this object as owner. More...
 
virtual void objRef ()=0
 Memory management by reference counting; must be implemented in derived classes. More...
 
virtual void objUnref ()=0
 
virtual std::string getID () const
 Returns the id string for identifying the provider (and its actions). More...
 
std::list< SoInteraction * > getInteractions (SoState *state) override
 Returns the list of all interactions of this provider. More...
 
void pointerPosition (SoState *state, const SoPointerPosition &pos) override
 Same as below, with additional SoState argument. Be defaults simply calls the below version. More...
 
void pointerLeftWindow (SoState *state) override
 Same as below, with additional SoState argument. Be defaults simply calls the below version. More...
 
void addListener (SoInteractionOwnerListenerInterface *listener)
 Add a listener object that is notified of changes in the interaction list. More...
 
void removeListener (SoInteractionOwnerListenerInterface *listener)
 Remove a listener object that was notified of changes in the interaction list. More...
 
- Public Member Functions inherited from SoInteractionProvider
 SoInteractionProvider ()
 Default constructor. More...
 
virtual ~SoInteractionProvider ()
 
template<class T >
std::list< T * > getInteractionsOfType (SoState *state)
 Returns list of interactions of a specific type: More...
 
virtual std::list< SoCommandAction * > getCommandActions (SoState *state)
 
virtual std::list< SoPointingAction * > getPointingActions (SoState *state)
 
virtual std::list< SoOffsetAction * > getOffsetActions (SoState *state)
 

Protected Member Functions

virtual void pointerPosition (const SoPointerPosition &)
 Override this if you always need to be informed of the current mouse cursor position. More...
 
virtual void pointerLeftWindow ()
 This is called when the mouse cursor leaves the window. More...
 
bool hasInteractions () const
 Returns whether there are any actions defined by this owner. More...
 
template<class T >
bool hasInteractionsOfType () const
 Same as above, but asking for a specific type of interaction. More...
 
Deprecated, happens in constructor of SoInteraction now
void addPointingAction (SoPointingAction *)
 
void addCommandAction (SoCommandAction *)
 
void addOffsetAction (SoOffsetAction *)
 

Friends

class SoInteraction
 

Additional Inherited Members

- Public Types inherited from SoInteractionProvider
typedef SoInteractionProvider *(* GetProviderFunc) (SoNode *)
 
- Static Public Member Functions inherited from SoInteractionProvider
static void registerInteractionProviderNode (SoType type, GetProviderFunc func)
 Register a function to obtain a SoInteractionProvider from a SoNode. More...
 
static SoInteractionProvidergetInteractionProvider (SoNode *node)
 Get a SoInteractionProvider from a SoNode if registered, else NULL. More...
 

Detailed Description

SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects.

Definition at line 46 of file SoInteractionOwner.h.

Constructor & Destructor Documentation

◆ SoInteractionOwner()

SoInteractionOwner::SoInteractionOwner ( )

Default constructor.

◆ ~SoInteractionOwner()

SoInteractionOwner::~SoInteractionOwner ( )
override

The destructor will destroy all interactions created with this object as owner.

Member Function Documentation

◆ addCommandAction()

void SoInteractionOwner::addCommandAction ( SoCommandAction )
inlineprotected

Definition at line 99 of file SoInteractionOwner.h.

◆ addListener()

void SoInteractionOwner::addListener ( SoInteractionOwnerListenerInterface listener)

Add a listener object that is notified of changes in the interaction list.

◆ addOffsetAction()

void SoInteractionOwner::addOffsetAction ( SoOffsetAction )
inlineprotected

Definition at line 100 of file SoInteractionOwner.h.

◆ addPointingAction()

void SoInteractionOwner::addPointingAction ( SoPointingAction )
inlineprotected

Definition at line 98 of file SoInteractionOwner.h.

◆ getID()

virtual std::string SoInteractionOwner::getID ( ) const
virtual

Returns the id string for identifying the provider (and its actions).

Reimplemented in SoView2D, and SoInteractionProviderNode.

◆ getInteractions()

std::list<SoInteraction*> SoInteractionOwner::getInteractions ( SoState *  state)
overridevirtual

Returns the list of all interactions of this provider.

Implements SoInteractionProvider.

◆ hasInteractions()

bool SoInteractionOwner::hasInteractions ( ) const
inlineprotected

Returns whether there are any actions defined by this owner.

Definition at line 90 of file SoInteractionOwner.h.

◆ hasInteractionsOfType()

template<class T >
bool SoInteractionOwner::hasInteractionsOfType
protected

Same as above, but asking for a specific type of interaction.

Definition at line 121 of file SoInteractionOwner.h.

References T.

◆ objRef()

virtual void SoInteractionOwner::objRef ( )
pure virtual

Memory management by reference counting; must be implemented in derived classes.

(Name changed from Inventor methods to avoid confusion, though ref and unref will normally be called for SoInteractionOwners based on OpenInventor.)

Implemented in SoView2D, and SoInteractionProviderNode.

◆ objUnref()

virtual void SoInteractionOwner::objUnref ( )
pure virtual

Implemented in SoView2D, and SoInteractionProviderNode.

◆ pointerLeftWindow() [1/2]

virtual void SoInteractionOwner::pointerLeftWindow ( )
inlineprotectedvirtual

This is called when the mouse cursor leaves the window.

Reimplemented in SoView2DVoxelValue, SoView2DRigidRegistrationEditorBase, SoPicking, and SoView2DCSOExtensibleEditor.

Definition at line 87 of file SoInteractionOwner.h.

◆ pointerLeftWindow() [2/2]

void SoInteractionOwner::pointerLeftWindow ( SoState *  state)
overridevirtual

Same as below, with additional SoState argument. Be defaults simply calls the below version.

Implements SoInteractionProvider.

Reimplemented in SoView2DSliceZoom, SoView2DLabel, and SoView2DRectangle.

◆ pointerPosition() [1/2]

virtual void SoInteractionOwner::pointerPosition ( const SoPointerPosition )
inlineprotectedvirtual

Override this if you always need to be informed of the current mouse cursor position.

Reimplemented in SoView2DVoxelValue, SoView2DRigidRegistrationEditorBase, SoView2DPosition, SoPicking, and SoView2DCSOExtensibleEditor.

Definition at line 84 of file SoInteractionOwner.h.

◆ pointerPosition() [2/2]

void SoInteractionOwner::pointerPosition ( SoState *  state,
const SoPointerPosition pos 
)
overridevirtual

Same as below, with additional SoState argument. Be defaults simply calls the below version.

Implements SoInteractionProvider.

Reimplemented in SoView2DSliceZoom, SoView2DLabel, and SoView2DRectangle.

◆ removeListener()

void SoInteractionOwner::removeListener ( SoInteractionOwnerListenerInterface listener)

Remove a listener object that was notified of changes in the interaction list.

Friends And Related Function Documentation

◆ SoInteraction

friend class SoInteraction
friend

Definition at line 48 of file SoInteractionOwner.h.


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