13 #ifndef SO_COMMAND_ACTION_H
14 #define SO_COMMAND_ACTION_H
18 #include <ThirdPartyWarningsDisable.h>
19 #include <Inventor/events/SoKeyboardEvent.h>
22 #include <ThirdPartyWarningsRestore.h>
49 enum { TypeId = TypeCommandAction };
93 virtual bool isShortcut(
int modifiers, SoKeyboardEvent::Key keyCode)
const;
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
Class ManagedKeyboardShortcut encapsulates the combination of modifier keys and another key that acti...
SoCommandAction is the base class for instantaneous actions.
ManagedKeyboardShortcut Shortcut
Class Shortcut encapsulates the combination of modifier keys and another key that activates a command...
SoCommandAction(SoInteractionOwner *owner, std::string id)
Standard constructor.
ManagedKeyboardShortcut Trigger
Also define Trigger as synonym for Shortcut, since that name is used by the other interactions.
void setShortcut(const Shortcut &shortcut)
Sets the (only) default key shortcut.
virtual bool isShortcut(int modifiers, SoKeyboardEvent::Key keyCode) const
Checks whether the given key with the given modifiers is a shortcut for this action; see SoInteractio...
bool setShortcut(const std::string &shortcut)
Sets the (only) default key shortcut (as string describing the shortcut, see ManagedKeyboardShortcut:...
virtual void execute()=0
Executes the action. Must be overridden by user.
void addShortcut(const Shortcut &shortcut)
Adds another default key shortcut.
void clearShortcuts()
Clears all currently set shortcuts.
ShortcutList getShortcuts() const
Returns the default key shortcuts.
std::list< Shortcut > TriggerList
Defines TriggerList as synonym for ShortcutList.
std::list< Shortcut > ShortcutList
A list of shortcuts.
TriggerList getTriggers() const
Alternative name for getShortcuts()
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.