MeVisLab Toolbox Reference
ManagedMouseWheelTrigger Class Reference

Class ManagedMouseWheelTrigger encapsulates the combination of required and ignored modifier keys that must be pressed while the mouse wheel is rotated. More...

#include <ManagedMouseWheelTrigger.h>

Inheritance diagram for ManagedMouseWheelTrigger:
ManagedMouseButtonTrigger ManagedActionTrigger

Public Member Functions

 ManagedMouseWheelTrigger (int triggerMask=0, int ignoreMask=0)
 Creates a wheel trigger with a trigger mask and an ignore mask. More...
 
bool matches (int mask) const
 
std::string toString () const
 
- Public Member Functions inherited from ManagedMouseButtonTrigger
 ManagedMouseButtonTrigger (int triggerMask=0, int ignoreMask=0)
 Creates a mouse trigger with a trigger mask and an ignore mask. More...
 
bool isValid () const
 
bool matches (int mask) const
 
std::string toString () const
 

Static Public Member Functions

static ManagedMouseWheelTrigger fromString (const std::string &s)
 Create a trigger from a string. More...
 
- Static Public Member Functions inherited from ManagedMouseButtonTrigger
static ManagedMouseButtonTrigger fromString (const std::string &s)
 Create a trigger from a string. More...
 
- Static Public Member Functions inherited from ManagedActionTrigger
static std::list< std::string > splitString (const std::string &s, char c, bool doNotSplitAtLastChar=false)
 
static std::string strip (const std::string &s)
 Strips whitespaces away. More...
 
template<typename T >
static std::string join (const std::list< T > &l, const std::string &s)
 Joins a list of objects having a .toString() method, using a separator string s. More...
 

Additional Inherited Members

- Public Types inherited from ManagedActionTrigger
enum  {
  NoModifier = 0 , ShiftModifier = 0x10 , ControlModifier = 0x20 , AltModifier = 0x40 ,
  AllModifiersMask = 0x70
}
 Constants to use where keyboard modifiers must be specified. More...
 
enum  { Button1Mask = 1 , Button2Mask = 2 , Button3Mask = 4 , AllButtonsMask = 0x07 }
 Same for mouse buttons: More...
 

Detailed Description

Class ManagedMouseWheelTrigger encapsulates the combination of required and ignored modifier keys that must be pressed while the mouse wheel is rotated.

Definition at line 21 of file ManagedMouseWheelTrigger.h.

Constructor & Destructor Documentation

◆ ManagedMouseWheelTrigger()

ManagedMouseWheelTrigger::ManagedMouseWheelTrigger ( int  triggerMask = 0,
int  ignoreMask = 0 
)
inline

Creates a wheel trigger with a trigger mask and an ignore mask.

The masks can be any combination of keyboard modifiers; see SoInteraction for possible modifiers.

Definition at line 26 of file ManagedMouseWheelTrigger.h.

Member Function Documentation

◆ fromString()

static ManagedMouseWheelTrigger ManagedMouseWheelTrigger::fromString ( const std::string &  s)
static

Create a trigger from a string.

The string will contain a character for every modifier:

  • 's' - Shift modifier key,
  • 'c' - Control modifier key,
  • 'a' - Alt modifier key, If such a character is followed by a '?', the key modifier/mouse button is ignored instead of required when matching, otherwise the key modifier/mouse button must be pressed (or not pressed, when the character doesn't occur at all).

◆ matches()

bool ManagedMouseWheelTrigger::matches ( int  mask) const
Returns
whether this trigger matches the given modifier combination.

◆ toString()

std::string ManagedMouseWheelTrigger::toString ( ) const
Returns
a string representation of this trigger (see fromString()).

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