nux-1.14.0
nux::StaticText Class Reference
Inheritance diagram for nux::StaticText:
nux::View nux::InputArea nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable nux::Introspectable

List of all members.

Public Member Functions

 StaticText (const TCHAR *text, NUX_FILE_LINE_PROTO)
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)

Public Attributes

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

Detailed Description

Definition at line 8 of file StaticText.h.


Member Function Documentation

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.

Definition at line 97 of file StaticText.cpp.

  {
    _size_match_text = size_match_text;
  }

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends