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>
93 virtual bool isShortcut(
int modifiers, SoKeyboardEvent::Key keyCode)
const;
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
ManagedKeyboardShortcut Shortcut
SoCommandAction(SoInteractionOwner *owner, std::string id)
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
bool setShortcut(const std::string &shortcut)
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().
SoInteraction(InteractionType type, SoInteractionOwner *owner, const std::string &id, bool registerWithOwner=true)