cTextWrapper Class Reference

#include <font.h>

List of all members.

Public Member Functions

 cTextWrapper (void)
 cTextWrapper (const char *Text, const cFont *Font, int Width)
 ~cTextWrapper ()
void Set (const char *Text, const cFont *Font, int Width)
const char * Text (void)
 Returns the full wrapped text.
int Lines (void)
 Returns the actual number of lines needed to display the full wrapped text.
const char * GetLine (int Line)
 Returns the given Line. The first line is numbered 0.

Private Attributes

char * text
char * eol
int lines
int lastLine


Detailed Description

Definition at line 79 of file font.h.


Constructor & Destructor Documentation

cTextWrapper::cTextWrapper ( void   ) 

Definition at line 441 of file font.c.

References eol, lastLine, lines, and text.

cTextWrapper::cTextWrapper ( const char *  Text,
const cFont Font,
int  Width 
)

Definition at line 448 of file font.c.

References Set(), and text.

Here is the call graph for this function:

cTextWrapper::~cTextWrapper (  ) 

Definition at line 454 of file font.c.

References text.


Member Function Documentation

void cTextWrapper::Set ( const char *  Text,
const cFont Font,
int  Width 
)

Wraps the Text to make it fit into the area defined by the given Width when displayed with the given Font. Wrapping is done by inserting the necessary number of newline characters into the string.

Definition at line 459 of file font.c.

References eol, lastLine, lines, MALLOC, stripspace(), text, Utf8CharGet(), Utf8CharLen(), and cFont::Width().

Referenced by cTextWrapper(), and cTextScroller::Set().

Here is the call graph for this function:

const char * cTextWrapper::Text ( void   ) 

Returns the full wrapped text.

Definition at line 523 of file font.c.

References eol, and text.

int cTextWrapper::Lines ( void   )  [inline]

Returns the actual number of lines needed to display the full wrapped text.

Definition at line 96 of file font.h.

References lines.

Referenced by cTextScroller::Total().

const char * cTextWrapper::GetLine ( int  Line  ) 

Returns the given Line. The first line is numbered 0.

Definition at line 532 of file font.c.

References eol, lastLine, lines, and text.

Referenced by cTextScroller::DrawText().


Member Data Documentation

char* cTextWrapper::text [private]

Definition at line 81 of file font.h.

Referenced by cTextWrapper(), GetLine(), Set(), Text(), and ~cTextWrapper().

char* cTextWrapper::eol [private]

Definition at line 82 of file font.h.

Referenced by cTextWrapper(), GetLine(), Set(), and Text().

int cTextWrapper::lines [private]

Definition at line 83 of file font.h.

Referenced by cTextWrapper(), GetLine(), Lines(), and Set().

int cTextWrapper::lastLine [private]

Definition at line 84 of file font.h.

Referenced by cTextWrapper(), GetLine(), and Set().


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

Generated on Tue Jan 13 14:33:01 2009 for VDR by  doxygen 1.5.6