CButton Class Reference

An implementation of a "push" button. More...

#include <CButton.h>

Inheritance diagram for CButton:
CComponent

List of all members.

Public Member Functions

 CButton (const CHAR *text)
 Creates a button with text.
void SetText (const CHAR *text)
 Sets the text for this button to the specified text.
virtual void Paint (CGraphics *g)
 Paints the component.

Protected Member Functions

virtual void ProcessComponentKeyEvent (SKeyEvent *e)
 Processes events occurring on this component,.

Protected Attributes

CString m_text
 The text of this button.

Detailed Description

An implementation of a "push" button.


Constructor & Destructor Documentation

CButton::CButton ( const CHAR *  text  ) 

Creates a button with text.

Parameters:
text - the text of the button

Member Function Documentation

void CButton::Paint ( CGraphics g  )  [virtual]

Paints the component.

This forwards the paint to any components that are children of this component. If this method is reimplemented, Paint(g) of base class should be called so components are properly rendered.

Parameters:
g - the specified Graphics context
See also:
Redraw

Reimplemented from CComponent.

void CButton::ProcessComponentKeyEvent ( SKeyEvent *  e  )  [protected, virtual]

Processes events occurring on this component,.

Parameters:
e - the event
See also:
DispatchEvent

Reimplemented from CComponent.

void CButton::SetText ( const CHAR *  text  ) 

Sets the text for this button to the specified text.

Parameters:
text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "".

Member Data Documentation

CString CButton::m_text [protected]

The text of this button.

See also:
SetText

The documentation for this class was generated from the following files:
Generated on Tue Jun 29 18:34:05 2010 for guilib by  doxygen 1.6.3