MeVisLab Toolbox Reference
|
SoInteraction is the base class for SoCommandAction, SoPointingAction, and SoOffsetAction. More...
#include <SoInteraction.h>
Public Types | |
enum | { NoModifier = ManagedActionTrigger::NoModifier , ShiftModifier = ManagedActionTrigger::ShiftModifier , ControlModifier = ManagedActionTrigger::ControlModifier , AltModifier = ManagedActionTrigger::AltModifier , AllModifiersMask = ManagedActionTrigger::AllModifiersMask , ShiftMask = ShiftModifier , CtrlMask = ControlModifier , AltMask = AltModifier } |
Constants to use where keyboard modifiers must be specified. More... | |
enum | InteractionType { TypePointingAction , TypeCommandAction , TypeOffsetAction } |
Enum identifying sub-types of this class. More... | |
Public Member Functions | |
SoInteraction (InteractionType type, SoInteractionOwner *owner, const std::string &id, bool registerWithOwner=true) | |
Standard constructor. | |
virtual | ~SoInteraction () |
Virtual destructor. | |
SoInteractionOwner * | getOwner () const |
virtual bool | isEnabled () const |
virtual void | setEnabled (bool enabled) |
Sets the enabled status of this interaction. | |
std::string | getID () 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 '. | |
InteractionType | getInteractionType () const |
Get type of interaction object. | |
template<class T > | |
bool | isOfType () const |
Convenience method for checking type. | |
Additional information about this interaction | |
Returns the priority value for ordered display in menus/tool boxes - lower values come first in the menu. | |
int | getMenuPriority () const |
void | setMenuPriority (int priority) |
Sets the priority value for ordered display in menus/tool boxes. | |
virtual std::string | getUserName () const |
virtual void | setUserName (const std::string &name) |
Sets the user name of this interaction entry. | |
virtual std::string | getIconFile () const |
virtual void | setIconFile (const std::string &file) |
Sets the filename of an icon used for this interaction entry. | |
virtual std::string | getDescription () const |
virtual void | setDescription (const std::string &descr) |
Sets the description for user help. | |
Memory management by reference counting. | |
virtual void | ref () |
virtual void | unref () |
Change management | |
This might be used by controllers that build a menu of all interactions and tells them when to re-create this menu. | |
int | getStateVersion () const |
void | touch () |
Increments the version number of attribute state to mark attribute changes. | |
SoInteraction is the base class for SoCommandAction, SoPointingAction, and SoOffsetAction.
The import method of this class is setEnabled(), which can be used to disable and enable an interaction. Well, and perhaps getOwner(), because that is the object that an interaction has to talk to anyways.
The other properties of this class are useful for the integration of the offered interactions in menus, tool bars, etc.
Definition at line 35 of file SoInteraction.h.
Constants to use where keyboard modifiers must be specified.
Modifiers usually can be combined with the bit-wise-or operator (|).
Enumerator | |
---|---|
NoModifier | |
ShiftModifier | |
ControlModifier | |
AltModifier | |
AllModifiersMask | |
ShiftMask | |
CtrlMask | |
AltMask |
Definition at line 40 of file SoInteraction.h.
Enum identifying sub-types of this class.
Enumerator | |
---|---|
TypePointingAction | |
TypeCommandAction | |
TypeOffsetAction |
Definition at line 53 of file SoInteraction.h.
SoInteraction::SoInteraction | ( | InteractionType | type, |
SoInteractionOwner * | owner, | ||
const std::string & | id, | ||
bool | registerWithOwner = true ) |
Standard constructor.
Besides the type of the interaction this requires the owner of the interaction and an id which will be used to discover and override this interaction. The interaction will automatically be added to the owner object.
|
virtual |
Virtual destructor.
You shouldn't usually destroy the interaction yourself, but in some cases this can be used to dynamically remove interactions, where simply disabling the interaction isn't adequate.
|
inlinevirtual |
Definition at line 112 of file SoInteraction.h.
std::string SoInteraction::getFullID | ( | ) | const |
Returns the ID string consisting of the id of the provider and this action's id, separated by '.
'.
|
inlinevirtual |
Definition at line 107 of file SoInteraction.h.
|
inline |
Definition at line 84 of file SoInteraction.h.
|
inline |
Get type of interaction object.
Definition at line 118 of file SoInteraction.h.
|
inline |
Definition at line 96 of file SoInteraction.h.
|
inline |
Definition at line 72 of file SoInteraction.h.
Referenced by SoCSODrawOnSurfaceDrawAction::dragMoveTo(), SoCSODrawOnSurfaceDrawAction::endPress(), SoCSODrawOnSurfaceCancelCommandAction::execute(), SoCSODrawOnSurfaceUndoCommandAction::execute(), SoCSODrawOnSurfaceRedoCommandAction::execute(), SoCSODrawOnSurfaceDrawAction::getCurrentCursor(), SoCSODrawOnSurfaceDrawAction::isSensitiveAt(), and SoCSODrawOnSurfaceDrawAction::startPressAt().
|
inline |
Definition at line 136 of file SoInteraction.h.
|
inlinevirtual |
Definition at line 102 of file SoInteraction.h.
Reimplemented in SoOffsetPointingAction.
Definition at line 77 of file SoInteraction.h.
Convenience method for checking type.
Definition at line 122 of file SoInteraction.h.
Sets the description for user help.
Definition at line 114 of file SoInteraction.h.
References mlrange_cast().
Sets the enabled status of this interaction.
Reimplemented in SoOffsetPointingAction.
Definition at line 79 of file SoInteraction.h.
Referenced by SoCSODrawOnSurfaceCancelCommandAction::SoCSODrawOnSurfaceCancelCommandAction(), SoCSODrawOnSurfaceRedoCommandAction::SoCSODrawOnSurfaceRedoCommandAction(), and SoCSODrawOnSurfaceUndoCommandAction::SoCSODrawOnSurfaceUndoCommandAction().
Sets the filename of an icon used for this interaction entry.
Definition at line 109 of file SoInteraction.h.
Sets the id of this interaction.
Definition at line 86 of file SoInteraction.h.
Sets the priority value for ordered display in menus/tool boxes.
Definition at line 98 of file SoInteraction.h.
References mlrange_cast().
Sets the user name of this interaction entry.
Definition at line 104 of file SoInteraction.h.
void SoInteraction::touch | ( | ) |
Increments the version number of attribute state to mark attribute changes.