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

List of all members.

Public Member Functions

 StaticTextBox (const TCHAR *Caption, NUX_FILE_LINE_PROTO)
virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
virtual void Draw (GraphicsEngine &GfxContext, bool force_draw)
virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw)
virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw)
void SetText (const TCHAR &Caption)
void SetText (const TCHAR *Caption)
void SetText (const tstring &Caption)
void SetText (const NString &Caption)
const TCHAR * GetText () const
t_u32 GetTextSize () const
void SetMinWidthMatchText (bool b)
 Change the widget minimum width whenever the text is set.
bool GetMinWidthMatchText () const
 Return true if the widget with changes to match the text width.
void SetTextColor (Color color)
Color GetTextColor () const
void SetTextBackgroundColor (const Color &color)
Color GetTextBackgroundColor () const
void SetTextAlignment (TextAlignment alignment)
TextAlignment GetTextAlignment ()
void SetDrawBackground (bool b)
void SetBackground (AbstractPaintLayer *bkg)
virtual void SetFont (ObjectPtr< FontTexture > Font)
virtual void SetGeometry (const Geometry &geo)
 Set Geometry.

Protected Member Functions

virtual bool AcceptKeyNavFocus ()
void AdjustMinWidthToMatchText ()

Protected Attributes

NString m_Text
Color m_TextColor
Color m_BackgroundColor
tstring m_temporary_caption
Validatorm_validator
TextAlignment m_TextAlignment
AbstractPaintLayerm_Background
bool m_bMinimumWidthMatchText
bool m_bDrawBackground
bool m_WriteAlpha
 If true, blend the characters alpha value with the destination and write the result to the destination buffer.

Detailed Description

Definition at line 31 of file StaticTextBox.h.


Member Function Documentation

void nux::StaticTextBox::SetMinWidthMatchText ( bool  b)

Change the widget minimum width whenever the text is set.

Change the widget minimum width whenever the text is set.

Parameters:
bIf true, the widget minimum width is set to match the size of the text

Definition at line 129 of file StaticTextBox.cpp.

  {
    m_bMinimumWidthMatchText = b;

    if (m_bMinimumWidthMatchText)
      AdjustMinWidthToMatchText();
  }

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