vdr  2.2.0
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)
 

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

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

Definition at line 547 of file font.c.

cTextWrapper::~cTextWrapper ( )

Definition at line 553 of file font.c.

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.

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.

Referenced by cTextScroller::Total().

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

References MALLOC, stripspace(), Utf8CharGet(), SI::Utf8CharLen(), and cFont::Width().

const char * cTextWrapper::Text ( void  )

Returns the full wrapped text.

Definition at line 621 of file font.c.

Member Data Documentation

char* cTextWrapper::eol
private

Definition at line 99 of file font.h.

int cTextWrapper::lastLine
private

Definition at line 101 of file font.h.

int cTextWrapper::lines
private

Definition at line 100 of file font.h.

char* cTextWrapper::text
private

Definition at line 98 of file font.h.


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