|
CarnegieMellonGraphics | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The KeyModifiers objects act as a "set" whose domain is that of the modifier keys that are available on a given system (usually control, shift, and alt).
Users can only work with the named sets provided, and only operate on them through the overloaded operators : | = Union, & = Intersection, and ~ = Compliment. Equality and stream output support are also provided.
So for example, the set of modifers associated with holding down the control key would simply be KeyModifiers::CONTROL. If you were to hold down both the shift and alt keys, the modifier set would be equal to
KeyModifiers::SHIFT | KeyModifiers::ALT
(union of the two singletons) or
KeyModifiers::SHIFT_AND_ALTor
KeyModifiers::ALT_AND_SHIFT
Predefined names have been provided for all subsets (the powerset!) of the entire domain, since it is a small set this is reasonable.
Field Summary | |
static const KeyModifiers |
ALL_MODIFIERS
Matches when all modifiers are active |
static const KeyModifiers |
ALT
Matches the "alt" key |
static const KeyModifiers |
ALT_AND_CONTROL
Matches if both "control" and "alt" are active |
static const KeyModifiers |
ALT_AND_SHIFT
Matches if both "shift" and "alt" are active |
static const KeyModifiers |
ANY_MODIFIERS
Matches any set of modifiers |
static const KeyModifiers |
CONTROL
Matches "control" key |
static const KeyModifiers |
CONTROL_AND_ALT
Matches if both "control" and "alt" are active |
static const KeyModifiers |
CONTROL_AND_SHIFT
Matches if both "control" and "shift" are active |
static const KeyModifiers |
NO_MODIFIERS
Matches if there are no active modifiers |
static const KeyModifiers |
SHIFT
Matches the "shift" key |
static const KeyModifiers |
SHIFT_AND_ALT
Matches if both "shift" and "alt" are active |
static const KeyModifiers |
SHIFT_AND_CONTROL
Matches if both "control" and "shift" are active |
Constructor Summary | |
|
KeyModifiers()
|
private |
KeyModifiers( int v )
|
Method Summary | |
bool |
operator!=( const KeyModifiers& rhs ) const
!= Inequality tests on KeyModifiers |
KeyModifiers& |
operator&=( const KeyModifiers& rhs )
&= Intersection-Assignment operator on KeyModifiers |
bool |
operator==( const KeyModifiers& rhs ) const
== Equality tests on KeyModifiers |
KeyModifiers& |
operator|=( const KeyModifiers& rhs )
|= Union-Assignment operator on KeyModifiers |
KeyModifiers& |
operator ~()
~ Compliment operator on KeyModifiers |
Field Detail |
public static const KeyModifiers ALL_MODIFIERS;
public static const KeyModifiers ALT;
public static const KeyModifiers ALT_AND_CONTROL;
public static const KeyModifiers ALT_AND_SHIFT;
public static const KeyModifiers ANY_MODIFIERS;
public static const KeyModifiers CONTROL;
public static const KeyModifiers CONTROL_AND_ALT;
public static const KeyModifiers CONTROL_AND_SHIFT;
public static const KeyModifiers NO_MODIFIERS;
public static const KeyModifiers SHIFT;
public static const KeyModifiers SHIFT_AND_ALT;
public static const KeyModifiers SHIFT_AND_CONTROL;
Constructor Detail |
public KeyModifiers();
private KeyModifiers( int v );
Method Detail |
public bool operator!=( const KeyModifiers& rhs ) const;
public KeyModifiers& operator&=( const KeyModifiers& rhs );
public bool operator==( const KeyModifiers& rhs ) const;
public KeyModifiers& operator|=( const KeyModifiers& rhs );
public KeyModifiers& operator ~();
|
CarnegieMellonGraphics | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |