Motoko::ITextControl Class Reference

Class that represents a generic text control interface. More...

#include <ITextControl.h>

Inheritance diagram for Motoko::ITextControl:

Motoko::Button Motoko::CheckButton Motoko::ComboBox Motoko::Dialog Motoko::LabelBox Motoko::ListBox Motoko::TextBox List of all members.

Public Member Functions

 ITextControl ()
 ITextControl (const char *text, CRM32Pro_CFont *font, AlignmentStyle alignment=Left)
 ITextControl (const ITextControl &obj)
virtual ITextControloperator= (const ITextControl &obj)
 ~ITextControl ()
virtual ITextControlCopyFrom (const ITextControl &obj)
 This function copies obj in the actual object.
void UpdateWidth (void)
 This function update the width of the text.
AlignmentStyle GetAlignment (void)
 Get the alignment of the control.
const char * GetText (void)
 Get the text of the control.
CRM32Pro_CFont * GetFont (void)
 Get the font of the control.
int GetFontHeight (void)
 Get the height of the font.
int GetMaxWidth (void)
 Get the max width of the text in a multiline context.
int GetWidthLastLine (void)
 Get the width of the last line of the text.
int GetMinNumLines (int sepy=DEFAULT_SEPARATIONY)
 Get the min number of lines of the text in a multiline context.
int GetMaxNumLines (SDL_Rect *rect, int sepy=DEFAULT_SEPARATIONY)
 Get the max number of lines of the text in a multiline context.
virtual void SetAlignment (AlignmentStyle val)
 Set the alignment of the control.
virtual void SetText (const char *val)
 Set the text of the control.
virtual void AddText (const char *val)
 Add text to the control.
virtual void SetText (char val)
 Set the text of the control.
virtual void AddText (char val)
 Add text to the control.
virtual void SetFont (CRM32Pro_CFont *val)
 Set the font of the control.

Protected Member Functions

void DrawText (SDL_Surface *buffer, int y, SDL_Rect *rect, int sepy=DEFAULT_SEPARATIONY, int sepx=DEFAULT_SEPARATIONX)
 This function draw the text.
void DrawText2 (SDL_Surface *buffer, int y, SDL_Rect *rect, int sepy=DEFAULT_SEPARATIONY, int sepx=DEFAULT_SEPARATIONX)
 This function draw the text for a TextBox.
void DrawTextMultiline (SDL_Surface *buffer, int y, SDL_Rect *rect, int sepy=DEFAULT_SEPARATIONY, int sepx=DEFAULT_SEPARATIONX)
 This function draw the text.
void DrawTextMultiline2 (SDL_Surface *buffer, int x, int y, SDL_Rect *rect, int sepy=DEFAULT_SEPARATIONY, int sepx=DEFAULT_SEPARATIONX)
 This function draw the text for TextBox.
void DrawTextCenter (SDL_Surface *buffer, SDL_Rect *rect)
 This function draw the text.

Detailed Description

Class that represents a generic text control interface.


Constructor & Destructor Documentation

Motoko::ITextControl::ITextControl (  ) 

ITextControl constructor.

Motoko::ITextControl::ITextControl ( const char *  text,
CRM32Pro_CFont *  font,
AlignmentStyle  alignment = Left 
)

ITextControl constructor.

Motoko::ITextControl::ITextControl ( const ITextControl obj  ) 

ITextControl copy constructor.

Motoko::ITextControl::~ITextControl (  ) 

ITextControl destructor.


Member Function Documentation

ITextControl & Motoko::ITextControl::CopyFrom ( const ITextControl obj  )  [virtual]

This function copies obj in the actual object.

Parameters:
obj Object to copy.
Returns:
A reference to the actual object.

ITextControl & Motoko::ITextControl::operator= ( const ITextControl obj  )  [virtual]

ITextControl operator =.


The documentation for this class was generated from the following files:
Generated on Mon Jul 17 18:33:50 2006 for Motoko by  doxygen 1.4.7