#include <Nux/StaticText.h>
Public Member Functions |
| | StaticText (const TCHAR *text, NUX_FILE_LINE_PROTO) |
| | ~StaticText () |
| void | SetSizeMatchText (bool size_match_text) |
| | Set size of widget according to the text extent.
|
| bool | GetSizeMatchText () const |
| | Return true if the widget with changes to match the text width.
|
| void | SetText (NString text) |
| void | SetTextColor (Color textColor) |
| void | SetFontName (const char *font_name) |
| void | GetTextSize (int &width, int &height, int clipping=0) |
| void | SetClipping (int clipping) |
| int | GetClipping () const |
Static Public Member Functions |
| static void | GetTextSize (const TCHAR *font, const TCHAR *char_str, int &width, int &height, int clipping=0) |
Data Fields |
| sigc::signal< void, StaticText * > | sigTextChanged |
| sigc::signal< void, StaticText * > | sigTextColorChanged |
Protected Member Functions |
| void | PreLayoutManagement () |
| long | PostLayoutManagement (long layoutResult) |
| long | ProcessEvent (IEvent &event, long traverseInfo, long processEventInfo) |
| void | Draw (GraphicsEngine &gfxContext, bool forceDraw) |
| void | DrawContent (GraphicsEngine &gfxContext, bool forceDraw) |
| void | PostDraw (GraphicsEngine &gfxContext, bool forceDraw) |
| void | DrawText (void *cairo_context, int width, int height, Color color) |
| void | UpdateTextRendering () |
Protected Attributes |
| NString | _text |
| Color | _textColor |
| CairoGraphics * | _cairoGraphics |
| BaseTexture * | _texture2D |
| int | _pre_layout_width |
| int | _pre_layout_height |
| bool | _size_match_text |
| char * | _font_string |
| int | _clipping |
Constructor & Destructor Documentation
| nux::StaticText::StaticText |
( |
const TCHAR * |
text, |
|
|
NUX_FILE_LINE_PROTO |
|
|
) |
| |
| nux::StaticText::~StaticText |
( |
| ) |
|
Member Function Documentation
| void nux::StaticText::Draw |
( |
GraphicsEngine & |
gfxContext, |
|
|
bool |
forceDraw |
|
) |
| [protected, virtual] |
| void nux::StaticText::DrawContent |
( |
GraphicsEngine & |
gfxContext, |
|
|
bool |
forceDraw |
|
) |
| [protected, virtual] |
| void nux::StaticText::DrawText |
( |
void * |
cairo_context, |
|
|
int |
width, |
|
|
int |
height, |
|
|
Color |
color |
|
) |
| [protected] |
| int nux::StaticText::GetClipping |
( |
| ) |
const |
| bool nux::StaticText::GetSizeMatchText |
( |
| ) |
const |
Return true if the widget with changes to match the text width.
| void nux::StaticText::GetTextSize |
( |
int & |
width, |
|
|
int & |
height, |
|
|
int |
clipping = 0 |
|
) |
| |
| static void nux::StaticText::GetTextSize |
( |
const TCHAR * |
font, |
|
|
const TCHAR * |
char_str, |
|
|
int & |
width, |
|
|
int & |
height, |
|
|
int |
clipping = 0 |
|
) |
| [static] |
| void nux::StaticText::PostDraw |
( |
GraphicsEngine & |
gfxContext, |
|
|
bool |
forceDraw |
|
) |
| [protected, virtual] |
| long nux::StaticText::PostLayoutManagement |
( |
long |
layoutResult | ) |
[protected, virtual] |
| void nux::StaticText::PreLayoutManagement |
( |
| ) |
[protected, virtual] |
| long nux::StaticText::ProcessEvent |
( |
IEvent & |
event, |
|
|
long |
traverseInfo, |
|
|
long |
processEventInfo |
|
) |
| [protected, virtual] |
| void nux::StaticText::SetClipping |
( |
int |
clipping | ) |
|
| void nux::StaticText::SetFontName |
( |
const char * |
font_name | ) |
|
| void nux::StaticText::SetSizeMatchText |
( |
bool |
size_match_text | ) |
|
Set size of widget according to the text extent.
- Parameters:
-
| size_match_text | If true, the widget size is set to match the size of the text on the screen. |
| void nux::StaticText::SetText |
( |
NString |
text | ) |
|
| void nux::StaticText::SetTextColor |
( |
Color |
textColor | ) |
|
| void nux::StaticText::UpdateTextRendering |
( |
| ) |
[protected] |
Field Documentation
The documentation for this class was generated from the following file: