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

A class that encapsulates the different boolean flags that text can have. More...

#include <omGraphicsGUITextFlags.h>

Public Types

enum  Flag {
  WRAP = (1 << 0), WORD_WRAP = (1 << 1), BOLD = (1 << 2), ITALIC = (1 << 3),
  UNDERLINE = (1 << 4), OUTLINE = (1 << 5), SHADOW = (1 << 6), DEFAULT = WRAP | WORD_WRAP,
  UNDEFINED = 0
}
 An enum that specifies the different text flags. More...
 

Public Member Functions

 TextFlags ()
 Create a new text flags object with no flags set. More...
 
 TextFlags (Flag flag)
 Create a new text flags object with the specified flag value initially set. More...
 
 TextFlags (UInt32 newFlags)
 Create a new text flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this text 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...
 
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 String toString (Flag flag)
 Convert the specified flag to human-readable string representation. More...
 

Detailed Description

A class that encapsulates the different boolean flags that text can have.

These flags provide boolean information about text. 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 text flags.

Enumerator
WRAP 

A flag indicating that text that goes outside the text area should be wrapped to a new line.

WORD_WRAP 

A flag indicating that text should be wrapped at whitespace boundaries, rather than per-character.

BOLD 

A flag indicating that the font should be drawn with a bold face.

ITALIC 

A flag indicating that the font should be drawn with an italic face.

UNDERLINE 

A flag indicating that the font should be drawn underlined.

OUTLINE 

A flag indicating that the font should be drawn with an outline.

SHADOW 

A flag indicating that the font should be drawn with a drop shadow.

DEFAULT 

The default flags to use for a text.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::graphics::gui::fonts::TextFlags::TextFlags ( )
inline

Create a new text flags object with no flags set.

om::graphics::gui::fonts::TextFlags::TextFlags ( Flag  flag)
inline

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

om::graphics::gui::fonts::TextFlags::TextFlags ( UInt32  newFlags)
inline

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

Member Function Documentation

om::graphics::gui::fonts::TextFlags::operator UInt32 ( ) const
inline

Convert this text flags object to an integer value.

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

Bool om::graphics::gui::fonts::TextFlags::isSet ( Flag  flag) const
inline

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

void om::graphics::gui::fonts::TextFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

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

static String om::graphics::gui::fonts::TextFlags::toString ( Flag  flag)
static

Convert the specified flag to human-readable string representation.


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