Wt::WAbstractToggleButton Class Reference

Abstract base class for Radio button and Check boxes. More...

Inherits Wt::WFormWidget.

Inherited by Wt::WCheckBox, and Wt::WRadioButton.

Inheritance diagram for Wt::WAbstractToggleButton:

Inheritance graph
[legend]
List of all members.

Public Slots

void setChecked (bool)
 Change the state of the button.
virtual void setChecked ()
 Set the button checked.
virtual void setUnChecked ()
 Set the button unChecked.

Public Member Functions

void setText (const WString &text)
 Change the text of the label.
bool isChecked () const
 Returns the state of the button.

Public Attributes

EventSignal< void > checked
 Signal emitted when the button gets checked.
EventSignal< void > unChecked
 Signal emitted when the button gets unChecked.

Protected Member Functions

 WAbstractToggleButton (WContainerWidget *parent=0)
 Create an unchecked toggle button with empty label and optional parent.
 WAbstractToggleButton (const WString &text, WContainerWidget *parent=0)
 Create an unchecked toggle button with given text and optional parent.

Detailed Description

Abstract base class for Radio button and Check boxes.

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 is available through the isChecked() method.

FIXME: add image functionality for the label.


Member Function Documentation

void Wt::WAbstractToggleButton::setChecked (  )  [virtual, slot]

Set the button checked.

This is a stateless slot!

See also:
setChecked(bool)

void Wt::WAbstractToggleButton::setUnChecked (  )  [virtual, slot]

Set the button unChecked.

This is a stateless slot!

See also:
setChecked(bool)


The documentation for this class was generated from the following files:
Generated on Sun Jul 1 19:37:18 2007 for Wt by doxygen 1.4.7