OpenGUI::TextAlignment Class Reference
[Types]

#include <OpenGUI_Types.h>

List of all members.


Detailed Description

This type is used throughout OpenGUI to represent horizontal and vertical text alignment.

Text alignment is combined into a single object to represent both vertical and horizontal alignments.


Public Types

 ALIGN_LEFT = 0
 Aligns text to left of widget.
 ALIGN_TOP = 0
 Aligns text to top of widget.
 ALIGN_RIGHT = 1
 Aligns text to right of widget.
 ALIGN_BOTTOM = 1
 Aligns text to bottom of widget.
 ALIGN_CENTER = 2
 Aligns text to the center of the widget. (This is valid for both horizontal and vertical alignments.).
 ALIGN_JUSTIFIED = 3
 Evenly distributes text spacing to completely fill widget in the direction used. (This is valid for both horizontal and vertical alignments.) TextLabel applies a minimum span that must be met before this is applied to a line of text. This prevents short lines of text from being spaced unreasonable distances.
enum  Alignment {
  ALIGN_LEFT = 0,
  ALIGN_TOP = 0,
  ALIGN_RIGHT = 1,
  ALIGN_BOTTOM = 1,
  ALIGN_CENTER = 2,
  ALIGN_JUSTIFIED = 3
}
 Enum definition for representing alignment style. More...

Public Member Functions

 TextAlignment ()
 Default constructor initializes with Left and Top alignments.
 TextAlignment (Alignment both)
 The single argument constructor sets both axis to the same alignment.
 TextAlignment (Alignment horizontal_alignment, Alignment vertical_alignment)
 The double argument constructor sets each alignment axis individually.
Alignment getHorizontal () const
 returns the horizontal alignment component
Alignment getVertical () const
 returns the vertical alignment component
TextAlignmentoperator= (const TextAlignment &rhs)
 Assignment operator, copies both axis from the right hand side TextAlignment object.
bool operator== (const TextAlignment &rhs) const
 TextAlignment objects are equal if both axis have equal values.


Member Enumeration Documentation

enum OpenGUI::TextAlignment::Alignment

Enum definition for representing alignment style.

Enumerator:
ALIGN_LEFT  Aligns text to left of widget.
ALIGN_TOP  Aligns text to top of widget.
ALIGN_RIGHT  Aligns text to right of widget.
ALIGN_BOTTOM  Aligns text to bottom of widget.
ALIGN_CENTER  Aligns text to the center of the widget. (This is valid for both horizontal and vertical alignments.).
ALIGN_JUSTIFIED  Evenly distributes text spacing to completely fill widget in the direction used. (This is valid for both horizontal and vertical alignments.) TextLabel applies a minimum span that must be met before this is applied to a line of text. This prevents short lines of text from being spaced unreasonable distances.


Constructor & Destructor Documentation

OpenGUI::TextAlignment::TextAlignment (  )  [inline]

Default constructor initializes with Left and Top alignments.

OpenGUI::TextAlignment::TextAlignment ( Alignment  both  )  [inline]

The single argument constructor sets both axis to the same alignment.

OpenGUI::TextAlignment::TextAlignment ( Alignment  horizontal_alignment,
Alignment  vertical_alignment 
) [inline]

The double argument constructor sets each alignment axis individually.


Member Function Documentation

Alignment OpenGUI::TextAlignment::getHorizontal (  )  const [inline]

returns the horizontal alignment component

Alignment OpenGUI::TextAlignment::getVertical (  )  const [inline]

returns the vertical alignment component

TextAlignment& OpenGUI::TextAlignment::operator= ( const TextAlignment rhs  )  [inline]

Assignment operator, copies both axis from the right hand side TextAlignment object.

bool OpenGUI::TextAlignment::operator== ( const TextAlignment rhs  )  const [inline]

TextAlignment objects are equal if both axis have equal values.


The documentation for this class was generated from the following file:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Fri Jan 5 23:05:26 2007