13#ifndef SO_INTERACTION_OWNER_H
14#define SO_INTERACTION_OWNER_H
21#include <ThirdPartyWarningsDisable.h>
23#include <ThirdPartyWarningsRestore.h>
65 virtual std::string
getID()
const;
94 bool hasInteractionsOfType()
const;
111 std::list<SoInteraction*> _interactions;
114 std::list<SoInteractionOwnerListenerInterface*> _listeners;
123 std::list<SoInteraction*>::const_iterator
it = _interactions.begin();
124 for(;
it!=_interactions.end();
it++) {
125 if ((*it)->isOfType<
T>()) {
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
SoCommandAction is the base class for instantaneous actions.
Interface for getting notified about changes in the interaction list of an owner.
virtual void interactionAdded(SoInteractionOwner *, SoInteraction *)
This gets called when an interaction is added to the owner.
virtual ~SoInteractionOwnerListenerInterface()=default
virtual void interactionRemoved(SoInteractionOwner *, SoInteraction *)
This gets called when an interaction is removed from the owner (this is not called when the owner is ...
virtual void ownerDeleted(SoInteractionOwner *)
This gets called when the owner is deleted.
SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects.
virtual void objRef()=0
Memory management by reference counting; must be implemented in derived classes.
virtual void pointerPosition(const SoPointerPosition &)
Override this if you always need to be informed of the current mouse cursor position.
void pointerPosition(SoState *state, const SoPointerPosition &pos) override
Same as below, with additional SoState argument. Be defaults simply calls the below version.
void pointerLeftWindow(SoState *state) override
Same as below, with additional SoState argument. Be defaults simply calls the below version.
void addCommandAction(SoCommandAction *)
~SoInteractionOwner() override
The destructor will destroy all interactions created with this object as owner.
std::list< SoInteraction * > getInteractions(SoState *state) override
Returns the list of all interactions of this provider.
bool hasInteractionsOfType() const
Same as above, but asking for a specific type of interaction.
virtual std::string getID() const
Returns the id string for identifying the provider (and its actions).
void addPointingAction(SoPointingAction *)
void addOffsetAction(SoOffsetAction *)
bool hasInteractions() const
Returns whether there are any actions defined by this owner.
void addListener(SoInteractionOwnerListenerInterface *listener)
Add a listener object that is notified of changes in the interaction list.
void removeListener(SoInteractionOwnerListenerInterface *listener)
Remove a listener object that was notified of changes in the interaction list.
virtual void pointerLeftWindow()
This is called when the mouse cursor leaves the window.
SoInteractionOwner()
Default constructor.
virtual void objUnref()=0
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...
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.