Set of key modifiers.
More...
#include <GREM/events/keyboard.hpp>
|
| constexpr | KeyModifiers () noexcept=default |
| | Construct an empty key modifier set.
|
| constexpr | KeyModifiers (KeyModifier keyModifier) noexcept |
| | Construct a key modifier set containing only one specific key modifier.
|
| constexpr bool | operator== (const KeyModifiers &other) const noexcept=default |
| | Compare this key modifier set to another for equality.
|
| constexpr bool | empty () const noexcept |
| | Check if the key modifier set is empty.
|
| constexpr bool | contains (KeyModifier keyModifier) const noexcept |
| | Check if the key modifier set contains the given key modifier.
|
| constexpr bool | containsAnyOf (KeyModifiers keyModifiers) const noexcept |
| | Check if the key modifier set contains at least one of the given key modifiers.
|
| constexpr bool | containsAllOf (KeyModifiers keyModifiers) const noexcept |
| | Check if the key modifier set contains all of the given key modifiers.
|
Set of key modifiers.
- See also
- KeyModifier
◆ KeyModifiers() [1/2]
| grem::events::KeyModifiers::KeyModifiers |
( |
| ) |
|
|
constexprdefaultnoexcept |
Construct an empty key modifier set.
◆ KeyModifiers() [2/2]
| grem::events::KeyModifiers::KeyModifiers |
( |
KeyModifier | keyModifier | ) |
|
|
inlineconstexprnoexcept |
Construct a key modifier set containing only one specific key modifier.
- Parameters
-
| keyModifier | key modifier identifier to include. |
- Note
- Key modifier sets can be combined using operator|(KeyModifiers, KeyModifiers).
◆ operator==()
| bool grem::events::KeyModifiers::operator== |
( |
const KeyModifiers & | other | ) |
const |
|
nodiscardconstexprdefaultnoexcept |
Compare this key modifier set to another for equality.
- Parameters
-
| other | the key modifier set to compare this one to. |
- Returns
- true if the key modifier sets are equal, false otherwise.
◆ empty()
| bool grem::events::KeyModifiers::empty |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Check if the key modifier set is empty.
- Returns
- true if the set contains no key modifiers, false otherwise.
◆ contains()
| bool grem::events::KeyModifiers::contains |
( |
KeyModifier | keyModifier | ) |
const |
|
inlinenodiscardconstexprnoexcept |
Check if the key modifier set contains the given key modifier.
- Parameters
-
| keyModifier | key modifier identifier to check for. |
- Returns
- true if the set contains the given key modifier, false otherwise.
◆ containsAnyOf()
| bool grem::events::KeyModifiers::containsAnyOf |
( |
KeyModifiers | keyModifiers | ) |
const |
|
inlinenodiscardconstexprnoexcept |
Check if the key modifier set contains at least one of the given key modifiers.
- Parameters
-
| keyModifiers | key modifier set to check for. |
- Returns
- true if the set contains at least one of the given key modifiers, false otherwise.
◆ containsAllOf()
| bool grem::events::KeyModifiers::containsAllOf |
( |
KeyModifiers | keyModifiers | ) |
const |
|
inlinenodiscardconstexprnoexcept |
Check if the key modifier set contains all of the given key modifiers.
- Parameters
-
| keyModifiers | key modifier set to check for. |
- Returns
- true if the set contains all of the given key modifiers, false otherwise.
◆ operator~
Get the complement of a key modifier set.
- Parameters
-
- Returns
- a set containing all possible key modifiers except those in the given set.
◆ operator&
Get the intersection of two key modifier sets.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a set containing all key modifiers contained in both a and b.
◆ operator|
Get the union of two key modifier sets.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a set containing all key modifiers contained in a or b or both.
◆ operator^
Get the symmetric difference of two key modifier sets.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a set containing all key modifiers contained in either a or b, but not both.
◆ operator&=
Assign the intersection of two key modifier sets to the first set.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a reference to the first set, which was assigned to.
◆ operator|=
Assign the union of two key modifier sets to the first set.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a reference to the first set, which was assigned to.
◆ operator^=
Assign the symmetric difference of two key modifier sets to the first set.
- Parameters
-
| a | first key modifier set. |
| b | second key modifier set. |
- Returns
- a reference to the first set, which was assigned to.
◆ ALL
Set containing all possible key modifiers.
◆ CONTROL
◆ SHIFT
◆ ALT
◆ GUI
The documentation for this class was generated from the following file: