nux-0.9.46

nux::StaticText Class Reference

#include <Nux/StaticText.h>

Inheritance diagram for nux::StaticText:
nux::View nux::InputArea nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable

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]

Implements nux::View.

void nux::StaticText::DrawContent ( GraphicsEngine gfxContext,
bool  forceDraw 
) [protected, virtual]

Reimplemented from nux::View.

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]

Reimplemented from nux::View.

long nux::StaticText::PostLayoutManagement ( long  layoutResult) [protected, virtual]

Reimplemented from nux::View.

void nux::StaticText::PreLayoutManagement ( ) [protected, virtual]

Reimplemented from nux::View.

long nux::StaticText::ProcessEvent ( IEvent event,
long  traverseInfo,
long  processEventInfo 
) [protected, virtual]

Implements nux::View.

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_textIf 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

int nux::StaticText::_clipping [protected]
char* nux::StaticText::_font_string [protected]

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