Return to Index
Toggle
Parent class: Widget
The Toggle widget provides a boolean input control. The
widget can display different text for the on and off states,
and the current state is reflected by a yellow indicator light.
Object Events:
Toggled | An event generated when the toggle changes state. |
Toggle::Toggle |
Toggle::Toggle();
Constructs a new toggle widget. |
void Toggle::setOnLabel |
void Toggle::setOnLabel(const String& pText);
Changes the text displayed when the toggle is on. |
Parameters: |
const String& | pText | The text label. |
|
void Toggle::setOffLabel |
void Toggle::setOffLabel(const String& pText);
Changes the text displayed when the toggle is off. |
Parameters: |
const String& | pText | The text label. |
|
String Toggle::getOnLabel |
String Toggle::getOnLabel();
Returns the text displayed when the toggle is on. |
String Toggle::getOffLabel |
String Toggle::getOffLabel();
Returns the text displayed when the toggle is off. |
void Toggle::setState |
void Toggle::setState(bool pState);
Changes the state of the toggle. Note that this does not generate a Toggle event. |
Parameters: |
bool | pState | The new state. |
|
bool Toggle::getState |
bool Toggle::getState();
Returns the current state of the toggle. |
void Toggle::toggle |
void Toggle::toggle();
Changes to the opposite state. This generates a Toggled event. |
Generated automatically by docgen 0.0.1
© 2003 Aron Dobos