wGui::CLabel Class Reference

A static label that renders it's WindowText to the screen. More...

#include <wg_label.h>

Inheritance diagram for wGui::CLabel:

wGui::CWindow wGui::CMessageClient

Public Member Functions

Protected Attributes


Detailed Description

A static label that renders it's WindowText to the screen.

Definition at line 41 of file wg_label.h.


Constructor & Destructor Documentation

wGui::CLabel::CLabel ( const CRect WindowRect,
CWindow pParent,
std::wstring  sText = L"",
CRGBColor FontColor = DEFAULT_LINE_COLOR,
CFontEngine pFontEngine = 0 
)

Construct a new label

Parameters:
WindowRect A CRect that defines the outer limits of the control
pParent A pointer to the parent window
sText The label text, defaults to an empty string
FontColor The color of the label text, defaults to the DEFAULT_LINE_COLOR
pFontEngine A pointer to the font engine to use when drawing the control, defaults to 0 If this is left out (or set to 0) it will use the default font engine specified by the CApplication (which must be set before instantiating this object)

Definition at line 32 of file wg_label.cpp.

References Draw(), wGui::CApplication::GetDefaultBackgroundColor(), wGui::CApplication::GetDefaultFontEngine(), wGui::CRenderedString::HALIGN_LEFT, wGui::CApplication::Instance(), wGui::CWindow::m_BackgroundColor, m_pFontEngine, m_pRenderedString, wGui::CWindow::m_sWindowText, and wGui::CRenderedString::VALIGN_BOTTOM.


Member Function Documentation

virtual void wGui::CLabel::SetFontColor ( CRGBColor FontColor  )  [inline, virtual]

Sets the color of the font used to render the label

Parameters:
FontColor The color of the label text

Definition at line 59 of file wg_label.h.

References m_FontColor.

virtual CRGBColor wGui::CLabel::GetFontColor ( void   )  [inline, virtual]

Gets the font color for the label

Returns:
The color of the text in the label

Definition at line 63 of file wg_label.h.

References m_FontColor.

virtual CRenderedString* wGui::CLabel::GetRenderedString ( void   )  const [inline, virtual]

Return a pointer to the rendered string

Returns:
A CRenderedString pointer

Definition at line 67 of file wg_label.h.

References m_pRenderedString.

Referenced by wGui::CMessageBox::FitToText().

void wGui::CLabel::SetWindowText ( const std::wstring &  sWindowText  )  [virtual]

Set the WindowText of the label

Parameters:
sWindowText The text to assign to the window

Reimplemented from wGui::CWindow.

Definition at line 64 of file wg_label.cpp.

References wGui::CRenderedString::HALIGN_LEFT, m_pFontEngine, m_pRenderedString, wGui::CWindow::SetWindowText(), and wGui::CRenderedString::VALIGN_BOTTOM.


The documentation for this class was generated from the following files:
Generated on Wed May 16 23:11:27 2007 for wGui by  doxygen 1.5.1