MeVisLab Toolbox Reference
SoView2DKeyboardAction Class Reference

#include <SoView2DInteraction.h>

Inheritance diagram for SoView2DKeyboardAction:
SoCommandAction SoInteraction

Public Member Functions

 SoView2DKeyboardAction (SoView2D *view, const std::string &id, SoKeyboardEvent::Key key, bool withShift=false)
 
 SoView2DKeyboardAction (SoView2D *view, const std::string &id, SoKeyboardEvent::Key key, SoKeyboardEvent::Key key2)
 
bool isNumberKey () const
 
void execute () override
 Execute the action. Must be overridden by user. More...
 
- Public Member Functions inherited from SoCommandAction
 SoCommandAction (SoInteractionOwner *owner, std::string id)
 Standard constructor: More...
 
bool setShortcut (const std::string &shortcut)
 Set the (only) default key shortcut (as string describing the shortcut, see ManagedKeyboardShortcut::fromString) More...
 
void setShortcut (const Shortcut &shortcut)
 Set the (only) default key shortcut. More...
 
void addShortcut (const Shortcut &shortcut)
 Add another default key shortcut. More...
 
void clearShortcuts ()
 Clear all currently set shortcuts. More...
 
ShortcutList getShortcuts () const
 Get the default key shortcuts. More...
 
TriggerList getTriggers () const
 Alternative name for getShortcuts() More...
 
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 possible modifiers. More...
 
- Public Member Functions inherited from SoInteraction
 SoInteraction (InteractionType type, SoInteractionOwner *owner, const std::string &id, bool registerWithOwner=true)
 Standard constructor. More...
 
virtual ~SoInteraction ()
 Virtual destructor. More...
 
SoInteractionOwnergetOwner () const
 
virtual bool isEnabled () const
 
virtual void setEnabled (bool enabled)
 Sets the enabled status of this interaction. More...
 
std::string getID () const
 
void setID (const std::string &id)
 Sets the id of this interaction. More...
 
std::string getFullID () const
 Returns the ID string consisting of the id of the provider and this action's id, separated by '. More...
 
InteractionType getInteractionType () const
 Get type of interaction object. More...
 
template<class T >
bool isOfType () const
 Convenience method for checking type. More...
 
int getMenuPriority () const
 
void setMenuPriority (int priority)
 Sets the priority value for ordered display in menus/tool boxes. More...
 
virtual std::string getUserName () const
 
virtual void setUserName (const std::string &name)
 Sets the user name of this interaction entry. More...
 
virtual std::string getIconFile () const
 
virtual void setIconFile (const std::string &file)
 Sets the filename of an icon used for this interaction entry. More...
 
virtual std::string getDescription () const
 
virtual void setDescription (const std::string &descr)
 Sets the description for user help. More...
 
virtual void ref ()
 
virtual void unref ()
 
int getStateVersion () const
 
void touch ()
 Increments the version number of attribute state to mark attribute changes. More...
 

Protected Member Functions

SoView2DgetView () const
 

Protected Attributes

bool _numberKey
 

Additional Inherited Members

- Public Types inherited from SoCommandAction
enum  { TypeId = TypeCommandAction }
 
typedef ManagedKeyboardShortcut Shortcut
 Class Shortcut encapsulates the combination of modifier keys and another key that activates a command. More...
 
typedef std::list< ShortcutShortcutList
 A list of shortcuts. More...
 
typedef ManagedKeyboardShortcut Trigger
 Also define Trigger as synonym for Shortcut, since that name is used by the other interactions. More...
 
typedef std::list< ShortcutTriggerList
 Define TriggerList as synonym for ShortcutList. More...
 
- Public Types inherited from SoInteraction
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...
 

Detailed Description

Definition at line 95 of file SoView2DInteraction.h.

Constructor & Destructor Documentation

◆ SoView2DKeyboardAction() [1/2]

SoView2DKeyboardAction::SoView2DKeyboardAction ( SoView2D view,
const std::string &  id,
SoKeyboardEvent::Key  key,
bool  withShift = false 
)

◆ SoView2DKeyboardAction() [2/2]

SoView2DKeyboardAction::SoView2DKeyboardAction ( SoView2D view,
const std::string &  id,
SoKeyboardEvent::Key  key,
SoKeyboardEvent::Key  key2 
)

Member Function Documentation

◆ execute()

void SoView2DKeyboardAction::execute ( )
overridevirtual

Execute the action. Must be overridden by user.

Implements SoCommandAction.

◆ getView()

SoView2D* SoView2DKeyboardAction::getView ( ) const
protected

◆ isNumberKey()

bool SoView2DKeyboardAction::isNumberKey ( ) const
inline

Definition at line 101 of file SoView2DInteraction.h.

References _numberKey.

Member Data Documentation

◆ _numberKey

bool SoView2DKeyboardAction::_numberKey
protected

Definition at line 107 of file SoView2DInteraction.h.

Referenced by isNumberKey().


The documentation for this class was generated from the following file: