13#ifndef SO_INTERACTION_H
14#define SO_INTERACTION_H
17#include <ThirdPartyWarningsDisable.h>
20#include <ThirdPartyWarningsRestore.h>
47 ShiftMask = ShiftModifier,
48 CtrlMask = ControlModifier,
79 virtual void setEnabled(
bool enabled) { _enabled = enabled; touch(); }
84 std::string
getID()
const {
return _id; }
86 void setID(
const std::string&
id) { _id = id; touch(); }
104 virtual void setUserName(
const std::string& name) { _userName = name; touch(); }
109 virtual void setIconFile(
const std::string& file) { _iconFile = file; touch(); }
122 inline bool isOfType()
const {
return static_cast<int>(_interactionType) == T::TypeId; }
149 std::string _userName;
150 std::string _iconFile;
151 std::string _description;
SoInteraction SoInteractionEntry
provide deprecated old class name
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
@ NoModifier
No modifier key.
@ ShiftModifier
Shift modifier key.
@ AllModifiersMask
All modifier keys.
@ ControlModifier
Control modifier key.
@ AltModifier
Alt modifier key.
SoInteractionOwner is a mix-in class for instances of SoNode that should have interaction objects.
SoInteraction is the base class for SoCommandAction, SoPointingAction, and SoOffsetAction.
virtual std::string getUserName() const
virtual ~SoInteraction()
Virtual destructor.
bool isOfType() const
Convenience method for checking type.
virtual bool isEnabled() const
int getStateVersion() const
virtual void setEnabled(bool enabled)
Sets the enabled status of this interaction.
virtual std::string getIconFile() const
InteractionType
Enum identifying sub-types of this class.
SoInteraction(InteractionType type, SoInteractionOwner *owner, const std::string &id, bool registerWithOwner=true)
Standard constructor.
virtual void setUserName(const std::string &name)
Sets the user name of this interaction entry.
void setMenuPriority(int priority)
Sets the priority value for ordered display in menus/tool boxes.
virtual void setIconFile(const std::string &file)
Sets the filename of an icon used for this interaction entry.
void touch()
Increments the version number of attribute state to mark attribute changes.
InteractionType getInteractionType() const
Get type of interaction object.
int getMenuPriority() const
void setID(const std::string &id)
Sets the id of this interaction.
std::string getFullID() const
Returns the ID string consisting of the id of the provider and this action's id, separated by '.
std::string getID() const
virtual std::string getDescription() const
virtual void setDescription(const std::string &descr)
Sets the description for user help.
SoInteractionOwner * getOwner() const
Target mlrange_cast(Source arg)
Generic version of checked ML casts.