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

A class that describes the layout direction and major axis of text. More...

#include <omGraphicsGUITextLayout.h>

Public Member Functions

 TextLayout ()
 Create a new font layout with the default font layout. More...
 
 TextLayout (const Axis &newAxis)
 Create a new font layout using the specified font layout type. More...
 
 TextLayout (const Axis &newAxis, const Vector2f &newDirection)
 Create a new font layout using the specified font layout type. More...
 
 operator const Axis & () const
 Convert this font layout to an axis enum value. More...
 
const AxisgetAxis () const
 Return the major axis of this font layout along which consecutive glyphs are arranged. More...
 
void setAxis (const Axis &newAxis)
 Set the major axis of this font layout along which consecutive glyphs are arranged. More...
 
Index getAxisIndex () const
 Return the axis index along which consecutive glyphs are arranged for this layout. More...
 
const Vector2fgetDirection () const
 Return the signed layout direction of this font along each axis. More...
 
void setDirection (const Vector2f &newDirection)
 Set the signed layout direction of this font along each axis. More...
 

Detailed Description

A class that describes the layout direction and major axis of text.

Text can be layed out either horizontally, in which case lines are horizontal and each successive line is vertically offset, or vertically, where lines are vertical and each successive line is horizontally offset.

The text direction along each axis is specified as a signed value. For horizontal layouts, the sign of the x component indicates whether the layout is left-to-right (+1) or right-to-left (-1). The y component indicates how consecutive lines of text are arranged, either top-to-bottom (-1) or bottom-to-top (+1).

For vertical layouts, the x component indicates how consecutive lines of text are arranged, and the y component indicates the vertical direction of the text.

Constructor & Destructor Documentation

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

Create a new font layout with the default font layout.

The default horizontal font layout direction is used, where text is written left-to-right and top-to-bottom.

om::graphics::gui::fonts::TextLayout::TextLayout ( const Axis newAxis)
inline

Create a new font layout using the specified font layout type.

The default font layout direction is used, where text is written left-to-right and top-to-bottom.

om::graphics::gui::fonts::TextLayout::TextLayout ( const Axis newAxis,
const Vector2f newDirection 
)
inline

Create a new font layout using the specified font layout type.

The default font layout direction is used, where text is written left-to-right and top-to-bottom.

Member Function Documentation

om::graphics::gui::fonts::TextLayout::operator const Axis & ( ) const
inline

Convert this font layout to an axis enum value.

const Axis& om::graphics::gui::fonts::TextLayout::getAxis ( ) const
inline

Return the major axis of this font layout along which consecutive glyphs are arranged.

void om::graphics::gui::fonts::TextLayout::setAxis ( const Axis newAxis)
inline

Set the major axis of this font layout along which consecutive glyphs are arranged.

Index om::graphics::gui::fonts::TextLayout::getAxisIndex ( ) const
inline

Return the axis index along which consecutive glyphs are arranged for this layout.

For horizontal layouts, the axis index is 0 for the X axis. For vertical layouts, the axis index is 1 for the Y axis.

const Vector2f& om::graphics::gui::fonts::TextLayout::getDirection ( ) const
inline

Return the signed layout direction of this font along each axis.

void om::graphics::gui::fonts::TextLayout::setDirection ( const Vector2f newDirection)
inline

Set the signed layout direction of this font along each axis.


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