Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

CarnegieMellonGraphics2
Class KeyModifiers

   in CarnegieMellonGraphics.h

class KeyModifiers

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_ALT 
or
  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

ALL_MODIFIERS

public static const KeyModifiers ALL_MODIFIERS;
Matches when all modifiers are active

ALT

public static const KeyModifiers ALT;
Matches the "alt" key

ALT_AND_CONTROL

public static const KeyModifiers ALT_AND_CONTROL;
Matches if both "control" and "alt" are active

ALT_AND_SHIFT

public static const KeyModifiers ALT_AND_SHIFT;
Matches if both "shift" and "alt" are active

ANY_MODIFIERS

public static const KeyModifiers ANY_MODIFIERS;
Matches any set of modifiers

CONTROL

public static const KeyModifiers CONTROL;
Matches "control" key

CONTROL_AND_ALT

public static const KeyModifiers CONTROL_AND_ALT;
Matches if both "control" and "alt" are active

CONTROL_AND_SHIFT

public static const KeyModifiers CONTROL_AND_SHIFT;
Matches if both "control" and "shift" are active

NO_MODIFIERS

public static const KeyModifiers NO_MODIFIERS;
Matches if there are no active modifiers

SHIFT

public static const KeyModifiers SHIFT;
Matches the "shift" key

SHIFT_AND_ALT

public static const KeyModifiers SHIFT_AND_ALT;
Matches if both "shift" and "alt" are active

SHIFT_AND_CONTROL

public static const KeyModifiers SHIFT_AND_CONTROL;
Matches if both "control" and "shift" are active


Constructor Detail

KeyModifiers

public KeyModifiers();

KeyModifiers

private KeyModifiers( int v );


Method Detail

operator!=

public bool operator!=( const KeyModifiers& rhs ) const;
!= Inequality tests on KeyModifiers

operator&=

public KeyModifiers& operator&=( const KeyModifiers& rhs );
&= Intersection-Assignment operator on KeyModifiers

operator==

public bool operator==( const KeyModifiers& rhs ) const;
== Equality tests on KeyModifiers

operator|=

public KeyModifiers& operator|=( const KeyModifiers& rhs );
|= Union-Assignment operator on KeyModifiers

operator~

public KeyModifiers& operator ~();
~ Compliment operator on KeyModifiers

 Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD