- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UTextLayout Class Reference

Lays out one block of text which has one unique font and color. More...

#include <utextlayout.hpp>

Inheritance diagram for ufo::UTextLayout:

ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

void setFont (const UFont &font)
UFont getFont () const
void setText (const char *text, unsigned int length)
const char * getText ()
unsigned int getLength ()
void setMaximumSize (const UDimension &dim)
UDimension getPreferredSize (const UDimension &maxSize)
void render (UGraphics *g, const URectangle &rect, const UPoint &offset=UPoint())
URectangle modelToView (int offset)
int viewToModel (const UPoint &pos)
void layout ()
int getLineCount ()
UTextLine getLine (int i)
UTextLine getLineForTextPosition (int i)

Protected Member Functions

void invalidate ()

Detailed Description

Lays out one block of text which has one unique font and color.

Author:
Johannes Schmidt


Member Function Documentation

const char* ufo::UTextLayout::getText  ) 
 

Returns:
A pointer to the text array.

URectangle ufo::UTextLayout::modelToView int  offset  ) 
 

Returns:
The rectangle of the letter at the given offset in the coordinate system of the rendered text.

void ufo::UTextLayout::setText const char *  text,
unsigned int  length
 

Sets a pointer to the char array of the text.

int ufo::UTextLayout::viewToModel const UPoint pos  ) 
 

Returns:
The offset of the letter at the given position in the coordinate system of the rendered text.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt