Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HLabel Class Reference
[Graphical User Interface]

#include <HLabel.h>

Inheritance diagram for HLabel:

HPane HWindow< HPane > HWidget HColorable HObjNoCopy HObj HObj

Detailed Description

The HLabel class is a sub-class of the HPane class that also draws a text string.

Definition at line 145 of file HLabel.h.

Public Member Functions

 HLabel (HPane::Style style=STYLE_PLAIN, StringPtr pstr=NULL)
virtual ErrCode Create (HANDLE hParent, StringPtr pstrText=NULL, HRect const *prFrame=NULL, uint32 uStyle=0)
 Create the window based on caller-provided parameters.
ErrCode Draw (HRect &rDirty)
 Draws the client area of the window.
StringPtr GetText (void) const
 Gets the label's text string.
ErrCode SetFont (StringPtr pstrFont)
 Set the font face.
ErrCode SetText (StringPtr pstrNew)
 Sets the label's text.

Protected Attributes

HFont m_font
HString m_strText


Member Function Documentation

virtual ErrCode HLabel::Create HANDLE  hParent,
StringPtr  pstrText = NULL,
HRect const *  prFrame = NULL,
uint32  uStyle = 0
[virtual]
 

Subclasses MUST call this function to determine the window class, title, and screen location.

Returns:
NO_ERROR on success, error code otherwise
Parameters:
hParent Handle to parent window of the window being created
pstrText [optional] Text to display in window
prFrame [optional] Ptr to frame rectangle in parent coordinates
uStyle [optional] Window style flags (WF_* constants)

Reimplemented from HWindow< HPane >.

Definition at line 185 of file HLabel.h.

ErrCode HLabel::Draw HRect rDirty  )  [virtual]
 

Draws the text in the window using the cached Context (m_gc) and the background color (m_clrBG).

Returns:
NO_ERROR on success, error code otherwise
Parameters:
rDirty Area of the client to be redrawn

Reimplemented from HPane.

Definition at line 207 of file HLabel.h.

StringPtr HLabel::GetText void   )  const
 

Returns:
Current text

Definition at line 230 of file HLabel.h.

ErrCode HLabel::SetFont StringPtr  pstrFont  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pstrFont Font file

Definition at line 237 of file HLabel.h.

ErrCode HLabel::SetText StringPtr  pstrNew  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pstrNew Ptr to new text

Definition at line 244 of file HLabel.h.


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

2006.01.09-16:37