vdr  1.7.31
Public Member Functions | Private Attributes | List of all members
cTextWrapper Class Reference

#include <font.h>

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)
int Lines (void)
const char * GetLine (int Line)
 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)
int Lines (void)
const char * GetLine (int Line)

Private Attributes

char * text
char * eol
int lines
int lastLine

Detailed Description

Definition at line 96 of file font.h.

Constructor & Destructor Documentation

cTextWrapper::cTextWrapper ( void  )

Definition at line 539 of file font.c.

References eol, lastLine, lines, and text.

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

Definition at line 546 of file font.c.

References Set(), and text.

cTextWrapper::~cTextWrapper ( )

Definition at line 552 of file font.c.

References text.

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

Member Function Documentation

const char * cTextWrapper::GetLine ( int  Line)

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

Definition at line 630 of file font.c.

References eol, lastLine, lines, and text.

Referenced by cTextScroller::DrawText().

const char* cTextWrapper::GetLine ( int  Line)

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

int cTextWrapper::Lines ( void  )
inline

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

Definition at line 113 of file font.h.

References lines.

Referenced by cTextScroller::Total().

int cTextWrapper::Lines ( void  )
inline

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

Definition at line 113 of file include/vdr/font.h.

References lines.

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.

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 557 of file font.c.

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

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

const char* cTextWrapper::Text ( void  )

Returns the full wrapped text.

const char * cTextWrapper::Text ( void  )

Returns the full wrapped text.

Definition at line 621 of file font.c.

References eol, and text.

Member Data Documentation

char * cTextWrapper::eol
private

Definition at line 99 of file font.h.

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

int cTextWrapper::lastLine
private

Definition at line 101 of file font.h.

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

int cTextWrapper::lines
private

Definition at line 100 of file font.h.

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

char * cTextWrapper::text
private

Definition at line 98 of file font.h.

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


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