#include <GTextLabel.h>
Public Member Functions | |
GText (int id, int x, int y, int cx, int cy, const char *name) | |
Constructor. | |
const char * | GetClass () |
bool | Name (const char *n) |
Set the text. | |
bool | NameW (const char16 *n) |
Set the text with a wide string. | |
void | SetFont (GFont *Fnt, bool OwnIt=false) |
Sets the font used to render the text. | |
int64 | Value () |
Returns the numeric value of the text (atoi). | |
void | Value (int64 i) |
Sets the text to a number. | |
char * | Name () |
Gets the text. | |
char16 * | NameW () |
Gets the text as a wide string. | |
bool | GetWrap () |
Word wrap. | |
void | SetWrap (bool b) |
Sets the use of word wrap. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
void | OnPosChange () |
Called when the view position changes. |
GText::GText | ( | int | id, | |
int | x, | |||
int | y, | |||
int | cx, | |||
int | cy, | |||
const char * | name | |||
) |
Constructor.
id | The control's ID |
x | Left edge position |
y | Top edge position |
cx | The width |
cy | The height |
name | Utf-8 text for the label |
References Name(), GView::SetId(), and GView::SetPos().
const char* GText::GetClass | ( | ) | [inline] |
The class' name. Should be overriden in child classes to return the right class name. Mostly used for debugging, but in the win32 port it is also the default WIN32 class name passed to RegisterClass() in GView::CreateClass().
Reimplemented from GView.