Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::graphics::gui::objects::GUIObjectFlags Class Reference

A class that encapsulates the different boolean flags that a GUI object can have. More...

#include <omGraphicsGUIObjectFlags.h>

Public Types

enum  Flag {
  VISIBLE = (1 << 0), CLIPPING = (1 << 1), SHADOW = (1 << 2), FILL_PARENT_X = (1 << 3),
  FILL_PARENT_Y = (1 << 4), FILL_PARENT_Z = (1 << 5), FILL_PARENT = FILL_PARENT_X | FILL_PARENT_Y | FILL_PARENT_Z, FOCUS = (1 << 6),
  HAS_FOCUS = (1 << 31), DEFAULT = VISIBLE | FOCUS, UNDEFINED = 0
}
 An enum that specifies the different GUI object flags. More...
 

Public Member Functions

 GUIObjectFlags ()
 Create a new GUI object flags object with no flags set. More...
 
 GUIObjectFlags (Flag flag)
 Create a new GUI object flags object with the specified flag value initially set. More...
 
 GUIObjectFlags (UInt32 newFlags)
 Create a new GUI object flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this GUI object flags object to an integer value. More...
 
Bool isSet (Flag flag) const
 Return whether or not the specified flag value is set for this flags object. More...
 
Bool isSetAny (Flag 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...
 

Detailed Description

A class that encapsulates the different boolean flags that a GUI object can have.

These flags provide boolean information about a certain GUI object. 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
VISIBLE 

A flag indicating that an object should be drawn.

CLIPPING 

A flag indicating whether or not the object should clip child rendering to its bounds.

SHADOW 

A flag indicating that an object should be drawn with a shadow.

FILL_PARENT_X 

A flag indicating whether or not an object should fill its parent's content area along the X axis.

FILL_PARENT_Y 

A flag indicating whether or not an object should fill its parent's content area along the Y axis.

FILL_PARENT_Z 

A flag indicating whether or not an object should fill its parent's content area along the Z axis.

FILL_PARENT 

A flag indicating whether or not an object should fill its parent's content area along all of its axis.

If the flag is set, the parent object of the object resizes and repositions the child in order to completely fill the parent's content area.

FOCUS 

A flag indicating whether or not an object can accept the keyboard focus.

The focus is set either by clicking on the desired object with the mouse or by using traditional keyboard navigation via the tab key.

HAS_FOCUS 

A flag indicating whether or not an object currently has keyboard focus at its level in the GUI hierarchy.

The focus is set either by clicking on the desired object with the mouse or by using traditional keyboard navigation via the tab key.

This flag is usually set by the parent of an object to indicate that it has focus so that the object can potentially be drawn or behave differently.

DEFAULT 

The default flags to use for a GUI object.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::graphics::gui::objects::GUIObjectFlags::GUIObjectFlags ( )
inline

Create a new GUI object flags object with no flags set.

om::graphics::gui::objects::GUIObjectFlags::GUIObjectFlags ( Flag  flag)
inline

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

om::graphics::gui::objects::GUIObjectFlags::GUIObjectFlags ( UInt32  newFlags)
inline

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

Member Function Documentation

om::graphics::gui::objects::GUIObjectFlags::operator UInt32 ( ) const
inline

Convert this GUI object flags object to an integer value.

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

Bool om::graphics::gui::objects::GUIObjectFlags::isSet ( Flag  flag) const
inline

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

Bool om::graphics::gui::objects::GUIObjectFlags::isSetAny ( Flag  flag) const
inline

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

void om::graphics::gui::objects::GUIObjectFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

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


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