Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
om::gui::input::Modifiers Class Reference

A class that stores the different boolean modifier flags that a GUI event can have. More...

#include <omGUIInputModifiers.h>

Public Types

enum  Flag {
  SHIFT = (1 << 0), CONTROL = (1 << 1), ALT = (1 << 2), GUI = (1 << 3),
  CAPS_LOCK = (1 << 4), NUM_LOCK = (1 << 5), SCROLL_LOCK = (1 << 6), FUNCTION = (1 << 7),
  UNDEFINED = 0
}
 An enum that specifies the different GUI object flags. More...
 

Public Member Functions

 Modifiers ()
 Create a new modifier flags object with no flags set. More...
 
 Modifiers (Flag flag)
 Create a new modifier flags object with the specified flag value initially set. More...
 
 Modifiers (UInt32 newFlags)
 Create a new modifier flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this modifier flags object to an integer value. More...
 
Bool isSet (UInt32 flag) const
 Return whether or not the specified combined flags value is set for this flags object. More...
 
Bool isSetAny (UInt32 flag) const
 Return whether or not the any of the specified flag's bits are set for this flags object. More...
 
void set (Flag flag, Bool newIsSet)
 Set whether or not the specified flag value is set for this flags object. More...
 

Static Public Member Functions

static Modifiers getCurrent ()
 Return the current modifiers that are set on the current system due to key state, etc. More...
 

Detailed Description

A class that stores the different boolean modifier flags that a GUI event can have.

These flags provide boolean information about the modifiers for a GUI event. Flags are indicated by setting a single bit of a 32-bit unsigned integer to 1.

Enum values for the different flags are defined as members of the class. Typically, the user would bitwise-OR the flag enum values together to produce a final set of set flags.

Member Enumeration Documentation

An enum that specifies the different GUI object flags.

Enumerator
SHIFT 

A flag that is set when the shift modifier key(s) are currently pressed.

CONTROL 

A flag that is set when the control modifier key(s) are currently pressed.

ALT 

A flag that is set when the alt modifier key(s) are currently pressed.

GUI 

A flag that is set when the GUI modifier key(s) are currently pressed.

CAPS_LOCK 

A flag that is set when the caps lock modifier is currently on.

NUM_LOCK 

A flag that is set when the num lock modifier is currently on.

SCROLL_LOCK 

A flag that is set when the scroll lock modifier is currently on.

FUNCTION 

A flag that is set when the function modifier is currently on.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::gui::input::Modifiers::Modifiers ( )
inline

Create a new modifier flags object with no flags set.

om::gui::input::Modifiers::Modifiers ( Flag  flag)
inline

Create a new modifier flags object with the specified flag value initially set.

om::gui::input::Modifiers::Modifiers ( UInt32  newFlags)
inline

Create a new modifier flags object with the specified initial combined flags value.

Member Function Documentation

om::gui::input::Modifiers::operator UInt32 ( ) const
inline

Convert this modifier flags object to an integer value.

This operator is provided so that the flags object can be used as an integer value for bitwise logical operations.

Bool om::gui::input::Modifiers::isSet ( UInt32  flag) const
inline

Return whether or not the specified combined flags value is set for this flags object.

Bool om::gui::input::Modifiers::isSetAny ( UInt32  flag) const
inline

Return whether or not the any of the specified flag's bits are set for this flags object.

void om::gui::input::Modifiers::set ( Flag  flag,
Bool  newIsSet 
)
inline

Set whether or not the specified flag value is set for this flags object.

static Modifiers om::gui::input::Modifiers::getCurrent ( )
static

Return the current modifiers that are set on the current system due to key state, etc.


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