nux-0.9.46

nux::StaticTextBox Class Reference

#include <Nux/StaticTextBox.h>

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

Public Member Functions

 StaticTextBox (const TCHAR *Caption, NUX_FILE_LINE_PROTO)
 ~StaticTextBox ()
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 TCHARGetText () 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

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.

Constructor & Destructor Documentation

nux::StaticTextBox::StaticTextBox ( const TCHAR Caption,
NUX_FILE_LINE_PROTO   
)
nux::StaticTextBox::~StaticTextBox ( )

Member Function Documentation

void nux::StaticTextBox::AdjustMinWidthToMatchText ( ) [protected]
virtual void nux::StaticTextBox::Draw ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Implements nux::View.

virtual void nux::StaticTextBox::DrawContent ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Reimplemented from nux::View.

bool nux::StaticTextBox::GetMinWidthMatchText ( ) const

Return true if the widget with changes to match the text width.

const TCHAR* nux::StaticTextBox::GetText ( ) const
TextAlignment nux::StaticTextBox::GetTextAlignment ( ) [inline]

References m_TextAlignment.

Color nux::StaticTextBox::GetTextBackgroundColor ( ) const [inline]

References m_BackgroundColor.

Color nux::StaticTextBox::GetTextColor ( ) const [inline]

References m_TextColor.

t_u32 nux::StaticTextBox::GetTextSize ( ) const [inline]

References nux::NString::Length(), and m_Text.

virtual void nux::StaticTextBox::PostDraw ( GraphicsEngine GfxContext,
bool  force_draw 
) [virtual]

Reimplemented from nux::View.

virtual long nux::StaticTextBox::ProcessEvent ( IEvent ievent,
long  TraverseInfo,
long  ProcessEventInfo 
) [virtual]

Implements nux::View.

void nux::StaticTextBox::SetBackground ( AbstractPaintLayer bkg)
void nux::StaticTextBox::SetDrawBackground ( bool  b) [inline]

References m_bDrawBackground.

virtual void nux::StaticTextBox::SetFont ( ObjectPtr< FontTexture Font) [virtual]

Reimplemented from nux::View.

virtual void nux::StaticTextBox::SetGeometry ( const Geometry geo) [inline, virtual]

Set Geometry.

Reimplemented from nux::View.

References nux::View::ComputeChildLayout().

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
void nux::StaticTextBox::SetText ( const TCHAR Caption)
void nux::StaticTextBox::SetText ( const NString Caption)
void nux::StaticTextBox::SetText ( const TCHAR Caption)
void nux::StaticTextBox::SetText ( const tstring &  Caption)
void nux::StaticTextBox::SetTextAlignment ( TextAlignment  alignment) [inline]

References m_TextAlignment.

void nux::StaticTextBox::SetTextBackgroundColor ( const Color color) [inline]

References m_BackgroundColor.

void nux::StaticTextBox::SetTextColor ( Color  color) [inline]

References m_TextColor.


Field Documentation

Referenced by GetTextSize().

Reimplemented from nux::View.

Referenced by GetTextColor(), and SetTextColor().

If true, blend the characters alpha value with the destination and write the result to the destination buffer.


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