< Home

< Table of Contents

REFERENCE MANUAL

ModifierKeys Class Reference

#include <hps.h>

Public Member Functions

bool Alt () const
 
void Alt (bool in_state)
 
bool Control () const
 
void Control (bool in_state)
 
bool Equals (ModifierKeys const &in_that) const
 
bool HasAll (ModifierKeys const &in_keys) const
 
bool HasAny (ModifierKeys const &in_keys) const
 
bool Meta () const
 
void Meta (bool in_state)
 
 ModifierKeys ()
 
bool None () const
 
bool operator!= (ModifierKeys const &in_that) const
 
ModifierKeys operator+ (ModifierKeys const &in_modifiers_to_merge)
 
ModifierKeysoperator+= (ModifierKeys const &in_modifiers_to_merge)
 
ModifierKeys operator- (ModifierKeys const &in_modifiers_to_remove)
 
ModifierKeysoperator-= (ModifierKeys const &in_modifiers_to_remove)
 
bool operator== (ModifierKeys const &in_that) const
 
bool Shift () const
 
void Shift (bool in_state)
 

Static Public Member Functions

static ModifierKeys KeyAlt ()
 
static ModifierKeys KeyControl ()
 
static ModifierKeys KeyMeta ()
 
static ModifierKeys KeyShift ()
 

Protected Types

enum  Modifiers {
  _key_none = 0x0000, _key_shift = 0x0001, _key_control = 0x0002, _key_alt = 0x0004,
  _key_meta = 0x0008
}
 

Protected Attributes

int modifiers
 

Detailed Description

Various modifier keys that could be active for an InputEvent.

Member Enumeration Documentation

enum ModifierKeys::Modifiers
protected

Modifier key bitfield constants.

Constructor & Destructor Documentation

ModifierKeys::ModifierKeys ( )
inline

The default constructor creates a ModifierKeys object with no modifiers active.

Member Function Documentation

bool ModifierKeys::Alt ( ) const
inline

Indicates whether whether the alt key is active.

Returns
true if the alt key is active, false otherwise.

Referenced by KeyAlt().

void ModifierKeys::Alt ( bool  in_state)
inline

Sets the state of the alt key modifier

Parameters
in_statetrue if the alt key is active, false otherwise.
bool ModifierKeys::Control ( ) const
inline

Indicates whether whether the control key is active.

Returns
true if the control key is active, false otherwise.

Referenced by KeyControl().

void ModifierKeys::Control ( bool  in_state)
inline

Sets the state of the control key modifier

Parameters
in_statetrue if the control key is active, false otherwise.
bool ModifierKeys::Equals ( ModifierKeys const &  in_that) const
inline

Check if the source object is equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
bool ModifierKeys::HasAll ( ModifierKeys const &  in_keys) const
inline

Indicates whether all modifiers of the input parameter are present in this object.

Parameters
in_keysA collection of modifiers to check against this object.
Returns
true if all of the input modifiers are active, false otherwise.

Referenced by Operator::IsMouseTriggered().

bool ModifierKeys::HasAny ( ModifierKeys const &  in_keys) const
inline

Indicates whether any modifiers of the input parameter are present in this object.

Parameters
in_keysA collection of modifiers to check against this object.
Returns
true if any of the modifiers are active, false otherwise.
static ModifierKeys ModifierKeys::KeyAlt ( )
inlinestatic

Creates a new ModifierKeys object with the alt key active.

Returns
A new ModifierKeys object with the alt key active.

References Alt().

static ModifierKeys ModifierKeys::KeyControl ( )
inlinestatic

Creates a new ModifierKeys object with the control key active.

Returns
A new ModifierKeys object with the control key active.

References Control().

static ModifierKeys ModifierKeys::KeyMeta ( )
inlinestatic

Creates a new ModifierKeys object with the meta key active.

Returns
A new ModifierKeys object with the meta key active.

References Meta().

static ModifierKeys ModifierKeys::KeyShift ( )
inlinestatic

Creates a new ModifierKeys object with the shift key active.

Returns
A new ModifierKeys object with the shift key active.

References Shift().

bool ModifierKeys::Meta ( ) const
inline

Indicates whether whether the meta key is active.

Returns
true if the meta key is active, false otherwise.

Referenced by KeyMeta().

void ModifierKeys::Meta ( bool  in_state)
inline

Sets the state of the meta key modifier

Parameters
in_statetrue if the meta key is active, false otherwise.
bool ModifierKeys::None ( ) const
inline

Indicates whether no modifiers are active.

Returns
true if no modifier keys are active, false otherwise.
bool ModifierKeys::operator!= ( ModifierKeys const &  in_that) const
inline

Check if the source object is not equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.
ModifierKeys ModifierKeys::operator+ ( ModifierKeys const &  in_modifiers_to_merge)
inline

Merges the buttons from two ModifierKeys objects.

Parameters
in_modifiers_to_mergeA collection of modifiers to merge with the modifiers of this object.
Returns
A new ModifierKeys object.
ModifierKeys& ModifierKeys::operator+= ( ModifierKeys const &  in_modifiers_to_merge)
inline

Merges the modifiers from another ModifierKeys object into this one.

Parameters
in_modifiers_to_mergeA collection of modifiers to merge with the modifiers of this object.
Returns
A reference to this object.
ModifierKeys ModifierKeys::operator- ( ModifierKeys const &  in_modifiers_to_remove)
inline

Creates a new ModifierKeys object representing the removal of the modifiers of another ModifierKeys object from this object.

Parameters
in_modifiers_to_removeA collection of modifiers to remove from those of this object.
Returns
A new ModifierKeys object.
ModifierKeys& ModifierKeys::operator-= ( ModifierKeys const &  in_modifiers_to_remove)
inline

Removes the modifiers of another ModifierKeys object from this one.

Parameters
in_modifiers_to_removeA collection of modifiers to remove from those of this object.
Returns
A reference to this object.
bool ModifierKeys::operator== ( ModifierKeys const &  in_that) const
inline

Check if the source object is equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
bool ModifierKeys::Shift ( ) const
inline

Indicates whether whether the shift key is active.

Returns
true if the shift key is active, false otherwise.

Referenced by KeyShift().

void ModifierKeys::Shift ( bool  in_state)
inline

Sets the state of the shift key modifier

Parameters
in_statetrue if the shift key is active, false otherwise.

The documentation for this class was generated from the following file: