13#ifndef MANAGED_OFFSET_TRIGGER_H
14#define MANAGED_OFFSET_TRIGGER_H
74 bool swapAxes =
false);
76 double sensitivity,
bool swapAxes =
false);
78 double sensitivityX,
double sensitivityY,
bool swapAxes =
false);
145 double _sensitivityX;
146 double _sensitivityY;
149 std::string _getDisplayFragment(
int mask,
const char*
displayString)
const;
150 void _setMaskFromString(
const std::string&
triggerString,
int mask,
char c);
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
ManagedActionTrigger is a base class for all triggers of managed interactions.
Class ManagedKeyboardShortcut encapsulates the combination of modifier keys and another key that acti...
Class ManagedMouseWheelTrigger encapsulates the combination of required and ignored modifier keys tha...
Class ManagedOffsetTrigger may contain a ManagedMouseButtonTrigger, a ManagedMouseWheelTrigger,...
ManagedKeyboardShortcut * shortcut1
ManagedOffsetTrigger(const ManagedMouseButtonTrigger &trigger, bool swapAxes=false)
ManagedMouseButtonTrigger * _mouseButtonTrigger
std::string toString() const
Returns a string representation of this trigger (see fromString()).
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut, double sensitivityX, double sensitivityY, bool swapAxes=false)
const ManagedKeyboardShortcut * getKeyboardShortcut1() const
Returns the pointer to the first keyboard shortcut if the trigger type is Keyboard,...
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut, double sensitivity, bool swapAxes=false)
ManagedOffsetTrigger(const ManagedMouseButtonTrigger &trigger, double sensitivity, bool swapAxes=false)
ManagedMouseWheelTrigger * _mouseWheelTrigger
double sensitivityY() const
Returns the sensitivity for the y-axis.
bool isValid() const
Returns whether this is a valid trigger.
TriggerType
The type of trigger contained in this class.
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut1, const ManagedKeyboardShortcut &shortcut2, bool swapAxes=false)
const ManagedMouseButtonTrigger * getMouseButtonTrigger() const
Returns the pointer to the mouse button trigger if the trigger type is MouseButton,...
ManagedOffsetTrigger(const ManagedMouseWheelTrigger &trigger, double sensitivity, bool swapAxes=false)
static ManagedOffsetTrigger fromString(const std::string &s)
Creates a trigger from a string.
double sensitivityX() const
Returns the sensitivity for the x-axis.
ManagedKeyboardShortcut * shortcut2
ManagedOffsetTrigger(const ManagedMouseButtonTrigger &trigger, double sensitivityX, double sensitivityY, bool swapAxes=false)
ManagedOffsetTrigger(const ManagedMouseWheelTrigger &trigger, bool swapAxes=false)
ManagedOffsetTrigger(const ManagedMouseWheelTrigger &trigger, double sensitivityX, double sensitivityY, bool swapAxes=false)
const ManagedKeyboardShortcut * getKeyboardShortcut2() const
Returns the pointer to a possible second keyboard shortcut if the trigger type is Keyboard,...
ManagedOffsetTrigger(const ManagedOffsetTrigger &trigger)
Copy constructor.
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut, bool swapAxes=false)
bool swapAxes() const
Returns whether the axes should be swapped for this trigger.
ManagedOffsetTrigger()
Default constructor (creates an invalid mouse button trigger).
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut1, const ManagedKeyboardShortcut &shortcut2, double sensitivity, bool swapAxes=false)
const ManagedMouseWheelTrigger * getMouseWheelTrigger() const
Returns the pointer to the mouse wheel trigger if the trigger type is MouseWheel, else NULL.
TriggerType getTriggerType() const
Returns the type of this trigger.
ManagedOffsetTrigger(const ManagedKeyboardShortcut &shortcut1, const ManagedKeyboardShortcut &shortcut2, double sensitivityX, double sensitivityY, bool swapAxes=false)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.