Lugre::cOgreFontHelper::cTextIterator Class Reference

iterates over text and manages positioning (alignment and newlines) More...

#include <lugre_ogrefonthelper.h>

Collaboration diagram for Lugre::cOgreFontHelper::cTextIterator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cTextIterator (cOgreFontHelper &mFontHelper, const Ogre::UTFString &sText)
 current plotter position, start = (0,0)
 cTextIterator (cOgreFontHelper &mFontHelper, itor mCur, itor mEnd)
bool HasNext ()
unicode_char Next ()
 call this BEFORE processing each char
void StartLine ()
void LineFeed ()

Public Attributes

float x
float y

Private Attributes

cOgreFontHelpermFontHelper
itor mCur
itor mEnd
bool mbFirstChar
bool mbLineFeed
float mfLineStartX
unicode_char c


Detailed Description

iterates over text and manages positioning (alignment and newlines)

Definition at line 194 of file lugre_ogrefonthelper.h.


Constructor & Destructor Documentation

Lugre::cOgreFontHelper::cTextIterator::cTextIterator ( cOgreFontHelper mFontHelper,
const Ogre::UTFString &  sText 
) [inline]

current plotter position, start = (0,0)

Definition at line 197 of file lugre_ogrefonthelper.h.

References StartLine().

Lugre::cOgreFontHelper::cTextIterator::cTextIterator ( cOgreFontHelper mFontHelper,
itor  mCur,
itor  mEnd 
) [inline]

Definition at line 203 of file lugre_ogrefonthelper.h.

References StartLine().


Member Function Documentation

bool Lugre::cOgreFontHelper::cTextIterator::HasNext (  )  [inline]

unicode_char Lugre::cOgreFontHelper::cTextIterator::Next (  )  [inline]

void Lugre::cOgreFontHelper::cTextIterator::StartLine (  )  [inline]

reset the write position to the beginning of the line if this is called after encountering a newline, mCur should point to the first char AFTER the newline if this is called after encountering a CRLF, mCur should point to the first char AFTER both CR and LF

Definition at line 241 of file lugre_ogrefonthelper.h.

References Lugre::cOgreFontHelper::Align_Center, Lugre::cOgreFontHelper::Align_Left, Lugre::cOgreFontHelper::Align_Right, Lugre::cOgreFontHelper::CalcLineLen(), Lugre::cOgreFontHelper::mAlign, mCur, mEnd, mfLineStartX, mFontHelper, and x.

Referenced by cTextIterator(), and LineFeed().

void Lugre::cOgreFontHelper::cTextIterator::LineFeed (  )  [inline]

Definition at line 251 of file lugre_ogrefonthelper.h.

References Lugre::cOgreFontHelper::mfLineHeight, mFontHelper, StartLine(), and y.

Referenced by Next().


Member Data Documentation

Definition at line 258 of file lugre_ogrefonthelper.h.

Referenced by LineFeed(), Next(), and StartLine().

Definition at line 259 of file lugre_ogrefonthelper.h.

Referenced by HasNext(), Next(), and StartLine().

Definition at line 260 of file lugre_ogrefonthelper.h.

Referenced by HasNext(), Next(), and StartLine().

Definition at line 261 of file lugre_ogrefonthelper.h.

Referenced by Next().

Definition at line 262 of file lugre_ogrefonthelper.h.

Referenced by Next().

Definition at line 263 of file lugre_ogrefonthelper.h.

Referenced by Next(), and StartLine().

Definition at line 264 of file lugre_ogrefonthelper.h.

Referenced by Next().


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

Generated on Tue May 22 06:00:42 2012 for cpp by  doxygen 1.5.6