Public Member Functions | |
virtual | ~WAbstractToggleButton () |
Destructor. | |
void | setText (const WString &text) |
Change the text of the label. | |
const WString | text () const |
Get the text of the label. | |
bool | isChecked () const |
Returns the state of the button. | |
void | setChecked (bool) |
Change the state of the button. | |
virtual void | setChecked () |
Set the button checked. | |
virtual void | setUnChecked () |
Set the button unChecked. | |
EventSignal & | checked () |
Signal emitted when the button gets checked. | |
EventSignal & | unChecked () |
Signal emitted when the button gets unChecked. | |
Protected Member Functions | |
WAbstractToggleButton (WContainerWidget *parent=0) | |
Create an unchecked toggle button without label. | |
WAbstractToggleButton (const WString &text, WContainerWidget *parent=0) | |
Create an unchecked toggle button with given text label. |
A toggle button provides a button with a boolean state (checked or unchecked), and a text label.
To act on a change of the state, either connect a slot to the changed() signal, or connect a slot to the checked() or unChecked() signals.
The current state (checked or unchecked) may be inspected using the isChecked() method.
void Wt::WAbstractToggleButton::setChecked | ( | bool | how | ) |
Change the state of the button.
Does not emit one of the checked() or unChecked() signals.
void Wt::WAbstractToggleButton::setChecked | ( | ) | [virtual] |
void Wt::WAbstractToggleButton::setUnChecked | ( | ) | [virtual] |