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 };
#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)
Set the (only) default key shortcut.
virtual bool isShortcut(int modifiers, SoKeyboardEvent::Key keyCode) const
Check if the given key with the given modifiers is a shortcut for this action; see SoInteraction for ...
bool setShortcut(const std::string &shortcut)
Set the (only) default key shortcut (as string describing the shortcut, see ManagedKeyboardShortcut::...
virtual void execute()=0
Execute the action. Must be overridden by user.
void addShortcut(const Shortcut &shortcut)
Add another default key shortcut.
void clearShortcuts()
Clear all currently set shortcuts.
ShortcutList getShortcuts() const
Get the default key shortcuts.
std::list< Shortcut > TriggerList
Define 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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.