#include <OpenGUI_Types.h>
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 | |
| TextAlignment & | operator= (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. | |
Enum definition for representing alignment style.
| 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.
| 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.