Various modifier keys that could be active for an InputEvent. More...
#include <hps.h>
Public Member Functions | |
ModifierKeys () | |
The default constructor creates a ModifierKeys object with no modifiers active. More... | |
bool | Equals (ModifierKeys const &in_that) const |
Check if the source object is equivalent to this object. More... | |
bool | operator== (ModifierKeys const &in_that) const |
Check if the source object is equivalent to this object. More... | |
bool | operator!= (ModifierKeys const &in_that) const |
Check if the source object is not equivalent to this object. More... | |
bool | None () const |
Indicates whether no modifiers are active. More... | |
bool | Shift () const |
Indicates whether any shift key (right or left) is active. More... | |
bool | Control () const |
Indicates whether any control key (right or left) is active. More... | |
bool | Alt () const |
Indicates whether any alt key (right or left) is active. More... | |
bool | Meta () const |
Indicates whether any meta key (right or left) is active. More... | |
bool | CapsLock () const |
Indicates whether the caps lock button is active. More... | |
bool | NumLock () const |
Indicates whether the num lock button is active. More... | |
bool | ScrollLock () const |
Indicates whether the scroll lock button is active. More... | |
bool | RightShift () const |
Indicates whether the right shift button is active. More... | |
bool | LeftShift () const |
Indicates whether the left shift button is active. More... | |
bool | RightControl () const |
Indicates whether the right control button is active. More... | |
bool | LeftControl () const |
Indicates whether the left control button is active. More... | |
bool | RightAlt () const |
Indicates whether the right alt button is active. More... | |
bool | LeftAlt () const |
Indicates whether the left alt button is active. More... | |
bool | RightMeta () const |
Indicates whether the right meta button is active. More... | |
bool | LeftMeta () const |
Indicates whether the left meta button is active. More... | |
bool | HasAll (ModifierKeys const &in_keys) const |
Indicates whether all modifiers of the input parameter are present in this object. More... | |
bool | HasAny (ModifierKeys const &in_keys) const |
Indicates whether any modifiers of the input parameter are present in this object. More... | |
void | Shift (bool in_state) |
Sets the state of the shift key modifier. More... | |
void | Control (bool in_state) |
Sets the state of the control key modifier. More... | |
void | Alt (bool in_state) |
Sets the state of the alt key modifier. More... | |
void | Meta (bool in_state) |
Sets the state of the meta key modifier. More... | |
void | CapsLock (bool in_state) |
Sets the state of the caps lock key modifier. More... | |
void | NumLock (bool in_state) |
Sets the state of the num lock key modifier. More... | |
void | ScrollLock (bool in_state) |
Sets the state of the scroll lock key modifier. More... | |
void | RightShift (bool in_state) |
Sets the state of the right shift key modifier. More... | |
void | LeftShift (bool in_state) |
Sets the state of the left shift key modifier. More... | |
void | RightControl (bool in_state) |
Sets the state of the right control key modifier. More... | |
void | LeftControl (bool in_state) |
Sets the state of the left control key modifier. More... | |
void | RightAlt (bool in_state) |
Sets the state of the right alt key modifier. More... | |
void | LeftAlt (bool in_state) |
Sets the state of the left alt key modifier. More... | |
void | RightMeta (bool in_state) |
Sets the state of the right meta key modifier. More... | |
void | LeftMeta (bool in_state) |
Sets the state of the left meta key modifier. More... | |
ModifierKeys | operator+ (ModifierKeys const &in_modifiers_to_merge) |
Merges the buttons from two ModifierKeys objects. More... | |
ModifierKeys | operator- (ModifierKeys const &in_modifiers_to_remove) |
Creates a new ModifierKeys object representing the removal of the modifiers of another ModifierKeys object from this object. More... | |
ModifierKeys & | operator+= (ModifierKeys const &in_modifiers_to_merge) |
Merges the modifiers from another ModifierKeys object into this one. More... | |
ModifierKeys & | operator-= (ModifierKeys const &in_modifiers_to_remove) |
Removes the modifiers of another ModifierKeys object from this one. More... | |
Static Public Member Functions | |
static ModifierKeys | KeyShift () |
Creates a new ModifierKeys object with the shift key active. More... | |
static ModifierKeys | KeyControl () |
Creates a new ModifierKeys object with the control key active. More... | |
static ModifierKeys | KeyAlt () |
Creates a new ModifierKeys object with the alt key active. More... | |
static ModifierKeys | KeyMeta () |
Creates a new ModifierKeys object with the meta key active. More... | |
static ModifierKeys | KeyCapsLock () |
Creates a new ModifierKeys object with the caps lock key active. More... | |
static ModifierKeys | KeyNumLock () |
Creates a new ModifierKeys object with the num lock key active. More... | |
static ModifierKeys | KeyScrollLock () |
Creates a new ModifierKeys object with the scroll lock key active. More... | |
static ModifierKeys | KeyRightShift () |
Creates a new ModifierKeys object with the right shift key active. More... | |
static ModifierKeys | KeyLeftShift () |
Creates a new ModifierKeys object with the left shift key active. More... | |
static ModifierKeys | KeyRightControl () |
Creates a new ModifierKeys object with the right control key active. More... | |
static ModifierKeys | KeyLeftControl () |
Creates a new ModifierKeys object with the left control key active. More... | |
static ModifierKeys | KeyRightAlt () |
Creates a new ModifierKeys object with the right alt key active. More... | |
static ModifierKeys | KeyLeftAlt () |
Creates a new ModifierKeys object with the left alt key active. More... | |
static ModifierKeys | KeyRightMeta () |
Creates a new ModifierKeys object with the right meta key active. More... | |
static ModifierKeys | KeyLeftMeta () |
Creates a new ModifierKeys object with the left meta key active. More... | |
Protected Types | |
enum | Modifiers { _key_none = 0x0000, _key_caps_lock = 0x0001, _key_num_lock = 0x0002, _key_scroll_lock = 0x0004, _key_right_shift = 0x0008, _key_left_shift = 0x0010, _key_right_control = 0x0020, _key_left_control = 0x0040, _key_right_alt = 0x0080, _key_left_alt = 0x0100, _key_right_meta = 0x0200, _key_left_meta = 0x0400, _key_shift = _key_left_shift | _key_right_shift, _key_control = _key_left_control | _key_right_control, _key_alt = _key_left_alt | _key_right_alt, _key_meta = _key_left_meta | _key_right_meta } |
Modifier key bitfield constants. More... | |
Protected Attributes | |
int | modifiers |
Various modifier keys that could be active for an InputEvent.
|
protected |
|
inline |
The default constructor creates a ModifierKeys object with no modifiers active.
|
inline |
Indicates whether any alt key (right or left) is active.
|
inline |
Sets the state of the alt key modifier.
in_state | true if at least one alt key (right or left) is active, false otherwise. |
|
inline |
Indicates whether the caps lock button is active.
|
inline |
Sets the state of the caps lock key modifier.
in_state | true if the caps lock key is active, false otherwise. |
|
inline |
Indicates whether any control key (right or left) is active.
|
inline |
Sets the state of the control key modifier.
in_state | true if at least one control key (right or left) is active, false otherwise. |
|
inline |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
|
inline |
Indicates whether all modifiers of the input parameter are present in this object.
in_keys | A collection of modifiers to check against this object. |
|
inline |
Indicates whether any modifiers of the input parameter are present in this object.
in_keys | A collection of modifiers to check against this object. |
|
inlinestatic |
Creates a new ModifierKeys object with the alt key active.
Use this function if your application does not need to differentiate between left and right alt buttons
|
inlinestatic |
Creates a new ModifierKeys object with the caps lock key active.
|
inlinestatic |
Creates a new ModifierKeys object with the control key active.
Use this function if your application does not need to differentiate between left and right control buttons
|
inlinestatic |
Creates a new ModifierKeys object with the left alt key active.
|
inlinestatic |
Creates a new ModifierKeys object with the left control key active.
|
inlinestatic |
Creates a new ModifierKeys object with the left meta key active.
|
inlinestatic |
Creates a new ModifierKeys object with the left shift key active.
|
inlinestatic |
Creates a new ModifierKeys object with the meta key active.
Use this function if your application does not need to differentiate between left and right meta buttons
|
inlinestatic |
Creates a new ModifierKeys object with the num lock key active.
|
inlinestatic |
Creates a new ModifierKeys object with the right alt key active.
|
inlinestatic |
Creates a new ModifierKeys object with the right control key active.
|
inlinestatic |
Creates a new ModifierKeys object with the right meta key active.
|
inlinestatic |
Creates a new ModifierKeys object with the right shift key active.
|
inlinestatic |
Creates a new ModifierKeys object with the scroll lock key active.
|
inlinestatic |
Creates a new ModifierKeys object with the shift key active.
Use this function if your application does not need to differentiate between left and right shift buttons
|
inline |
Indicates whether the left alt button is active.
|
inline |
Sets the state of the left alt key modifier.
in_state | true if the left alt key is active, false otherwise. |
|
inline |
Indicates whether the left control button is active.
|
inline |
Sets the state of the left control key modifier.
in_state | true if the left control key is active, false otherwise. |
|
inline |
Indicates whether the left meta button is active.
|
inline |
Sets the state of the left meta key modifier.
in_state | true if the left meta key is active, false otherwise. |
|
inline |
Indicates whether the left shift button is active.
|
inline |
Sets the state of the left shift key modifier.
in_state | true if the left shift key is active, false otherwise. |
|
inline |
Indicates whether any meta key (right or left) is active.
|
inline |
Sets the state of the meta key modifier.
in_state | true if at least one meta key (right or left) is active, false otherwise. |
|
inline |
Indicates whether no modifiers are active.
|
inline |
Indicates whether the num lock button is active.
|
inline |
Sets the state of the num lock key modifier.
in_state | true if the num lock key is active, false otherwise. |
|
inline |
Check if the source object is not equivalent to this object.
in_that | The source object to compare to this object. |
|
inline |
Merges the buttons from two ModifierKeys objects.
in_modifiers_to_merge | A collection of modifiers to merge with the modifiers of this object. |
|
inline |
Merges the modifiers from another ModifierKeys object into this one.
in_modifiers_to_merge | A collection of modifiers to merge with the modifiers of this object. |
|
inline |
Creates a new ModifierKeys object representing the removal of the modifiers of another ModifierKeys object from this object.
in_modifiers_to_remove | A collection of modifiers to remove from those of this object. |
|
inline |
Removes the modifiers of another ModifierKeys object from this one.
in_modifiers_to_remove | A collection of modifiers to remove from those of this object. |
|
inline |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
|
inline |
Indicates whether the right alt button is active.
|
inline |
Sets the state of the right alt key modifier.
in_state | true if the right alt key is active, false otherwise. |
|
inline |
Indicates whether the right control button is active.
|
inline |
Sets the state of the right control key modifier.
in_state | true if the right control key is active, false otherwise. |
|
inline |
Indicates whether the right meta button is active.
|
inline |
Sets the state of the right meta key modifier.
in_state | true if the right meta key is active, false otherwise. |
|
inline |
Indicates whether the right shift button is active.
|
inline |
Sets the state of the right shift key modifier.
in_state | true if the right shift key is active, false otherwise. |
|
inline |
Indicates whether the scroll lock button is active.
|
inline |
Sets the state of the scroll lock key modifier.
in_state | true if the scroll lock key is active, false otherwise. |
|
inline |
Indicates whether any shift key (right or left) is active.
|
inline |
Sets the state of the shift key modifier.
in_state | true if at least one shift key (right or left) is active, false otherwise. |
|
protected |