#include <YRadioButtonGroup.h>
Inheritance diagram for YRadioButtonGroup:
Public Member Functions | |
YRadioButtonGroup (const YWidgetOpt &opt) | |
virtual | ~YRadioButtonGroup () |
virtual char * | widgetClass () |
bool | isRadioButtonGroup () const |
virtual void | addRadioButton (YRadioButton *button) |
virtual void | removeRadioButton (YRadioButton *button) |
YCPValue | changeWidget (const YCPSymbol &property, const YCPValue &newvalue) |
YCPValue | queryWidget (const YCPSymbol &property) |
void | uncheckOtherButtons (const YRadioButton *radiobutton) |
Protected Types | |
typedef vector< YRadioButton * > | buttonlist_type |
Protected Member Functions | |
YRadioButton * | currentButton () const |
bool | setCurrentButton (const YCPValue &id) |
Protected Attributes | |
buttonlist_type | buttonlist |
RadioButtonGroup
A RadioButtonGroup
is a container widget that has neither impact on the layout nor has it a graphical representation. It is just used to logically group RadioButtons together so the one-out-of-many selection strategy can be ensured.
Radio button groups may be nested. Looking bottom up we can say that a radio button belongs to the radio button group that is nearest to it. If you give the RadioButtonGroup
widget an id, you can use it to query and set which radio button is currently selected.
See the Layout HOWTO for details.
|
|
|
Creates a new and empty radio button group. |
|
Cleans up |
|
Adds a radio button to the button group. If you overload this function ui specific, call YRadioButtonGroup::addRadioButton() as well! |
|
Implements the ui command changeWidget. any CurrentButton The id of the currently selected radio button belonging to this group. If no button is selected, CurrentButton is nil. Reimplemented from YWidget. |
|
Find the currently selected button |
|
Returns true, since this is a radio button group Reimplemented from YWidget. |
|
Implements the ui command queryWidget Reimplemented from YWidget. |
|
Removes a radio button from the button group. If you overload this function ui specific, call YRadioButtonGroup::removeRadioButton() as well! Don't delete the removed radio button in this function! It's not ours. We just have a pointer to it. It's parent widget will deletes it when neccessary. |
|
Make another of the buttons currently selected |
|
Unchecks all radio buttons except one. This method can be used by an actual ui ( for example ncurses ) in the implementation of setValue() of the Radiobutton |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YContainerWidget. |
|
List of all RadioButtons contained in this group. The buttons do not _live_ here, so we don't delete them after use. |