An implementation of a "push" button. More...
#include <CButton.h>
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. |
An implementation of a "push" button.
CButton::CButton | ( | const CHAR * | text | ) |
Creates a button with text.
text | - the text of the button |
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.
g | - the specified Graphics context |
Reimplemented from CComponent.
void CButton::ProcessComponentKeyEvent | ( | SKeyEvent * | e | ) | [protected, virtual] |
Processes events occurring on this component,.
e | - the event |
Reimplemented from CComponent.
void CButton::SetText | ( | const CHAR * | text | ) |
Sets the text for this button to the specified text.
text | - the text that this label displays. If text is null , it is treated for display purposes like an empty string "" . |
CString CButton::m_text [protected] |
The text of this button.