libyui
2.42.5
|
#include <YRadioButton.h>
Public Member Functions | |
virtual | ~YRadioButton () |
virtual const char * | widgetClass () const |
virtual bool | value ()=0 |
virtual void | setValue (bool checked)=0 |
std::string | label () const |
virtual void | setLabel (const std::string &label) |
bool | useBoldFont () const |
virtual void | setUseBoldFont (bool bold=true) |
YRadioButtonGroup * | buttonGroup () |
virtual bool | setProperty (const std::string &propertyName, const YPropertyValue &val) |
virtual YPropertyValue | getProperty (const std::string &propertyName) |
virtual const YPropertySet & | propertySet () |
virtual std::string | shortcutString () const |
virtual void | setShortcutString (const std::string &str) |
const char * | userInputProperty () |
![]() | |
virtual | ~YWidget () |
virtual std::string | debugLabel () const |
std::string | helpText () const |
void | setHelpText (const std::string &helpText) |
bool | hasChildren () const |
YWidget * | firstChild () const |
YWidget * | lastChild () const |
YWidgetListConstIterator | childrenBegin () const |
YWidgetListConstIterator | childrenEnd () const |
int | childrenCount () const |
bool | contains (YWidget *child) const |
virtual void | addChild (YWidget *child) |
virtual void | removeChild (YWidget *child) |
void | deleteChildren () |
YWidget * | parent () const |
bool | hasParent () const |
void | setParent (YWidget *newParent) |
YDialog * | findDialog () |
YWidget * | findWidget (YWidgetID *id, bool doThrow=true) const |
virtual int | preferredWidth ()=0 |
virtual int | preferredHeight ()=0 |
virtual int | preferredSize (YUIDimension dim) |
virtual void | setSize (int newWidth, int newHeight)=0 |
bool | isValid () const |
bool | beingDestroyed () const |
void * | widgetRep () const |
void | setWidgetRep (void *toolkitWidgetRep) |
bool | hasId () const |
YWidgetID * | id () const |
void | setId (YWidgetID *newId_disown) |
virtual void | setEnabled (bool enabled=true) |
void | setDisabled () |
virtual bool | isEnabled () const |
virtual bool | stretchable (YUIDimension dim) const |
void | setStretchable (YUIDimension dim, bool newStretch) |
void | setDefaultStretchable (YUIDimension dim, bool newStretch) |
virtual int | weight (YUIDimension dim) |
bool | hasWeight (YUIDimension dim) |
void | setWeight (YUIDimension dim, int weight) |
void | setNotify (bool notify=true) |
bool | notify () const |
void | setNotifyContextMenu (bool notifyContextMenu=true) |
bool | notifyContextMenu () const |
bool | sendKeyEvents () const |
void | setSendKeyEvents (bool doSend) |
bool | autoShortcut () const |
void | setAutoShortcut (bool _newAutoShortcut) |
int | functionKey () const |
bool | hasFunctionKey () const |
virtual void | setFunctionKey (int fkey_no) |
virtual bool | setKeyboardFocus () |
void | dumpWidgetTree (int indentationLevel=0) |
void | dumpDialogWidgetTree () |
void | setChildrenEnabled (bool enabled) |
void * | operator new (size_t size) |
virtual void | startMultipleChanges () |
virtual void | doneMultipleChanges () |
Protected Member Functions | |
YRadioButton (YWidget *parent, const std::string &label) | |
YRadioButtonGroup * | findRadioButtonGroup () const |
virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
![]() | |
YWidget (YWidget *parent) | |
YWidgetChildrenManager * | childrenManager () const |
void | setChildrenManager (YWidgetChildrenManager *manager) |
void | setBeingDestroyed () |
void | dumpWidget (YWidget *w, int indentationLevel) |
RadioButton: Widget for one-out-of-many selection.
Only one RadioButton in a RadioBox (in a RadioButtonGroup) can be set to "on" at the same time. Setting any RadioButton of a RadioButtonGroup to "on" automatically sets all others in the same RadioButtonGroup to "off".
RadioButtons customarily have a distinct visual appearance from CheckBoxes:
( ) RadioButton 1 (*) RadioButton 2 ( ) RadioButton 3 [ ] CheckBox 1 [*] CheckBox 2 [*] CheckBox 3
Definition at line 51 of file YRadioButton.h.
|
protected |
Constructor.
Creates a new RadioButton with user-visible text 'label'. 'label' can and should contain a keyboard shortcut (designated with '&').
The caller has to take care to add this RadioButton to its RadioButtonGroup:
if ( radioButton->buttonGroup() ) radioButton->buttonGroup()->addRadioButton( radioButton );
This can't be done in the constructor because it would involve calling a virtual function, which doesn't work yet within the constructor.
Definition at line 60 of file YRadioButton.cc.
|
virtual |
Destructor: Removes the button from the radio button group.
Definition at line 77 of file YRadioButton.cc.
YRadioButtonGroup * YRadioButton::buttonGroup | ( | ) |
Get a pointer to the radio button group this button belongs to.
Definition at line 163 of file YRadioButton.cc.
|
protected |
Traverse the widget hierarchy upwards to find the corresponding YRadioButtonGroup, i.e. the class that controls the radio box behaviour (i.e. that makes sure that no more than one RadioButton is set to "on" at the same time).
Definition at line 175 of file YRadioButton.cc.
|
virtual |
Get a property. Reimplemented from YWidget.
This method may throw exceptions, for example
Reimplemented from YWidget.
Definition at line 149 of file YRadioButton.cc.
std::string YRadioButton::label | ( | ) | const |
Get the label (the text on the RadioButton).
Definition at line 93 of file YRadioButton.cc.
|
virtual |
Return this class's property set. This also initializes the property set upon the first call.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 112 of file YRadioButton.cc.
|
protectedvirtual |
Save the widget's user input to a macro recorder.
Reimplemented from YWidget because only radio buttons that are on (no more than one per radio box) are recorded.
Reimplemented from YWidget.
Definition at line 194 of file YRadioButton.cc.
|
virtual |
Set the label (the text on the RadioButton).
Derived classes are free to reimplement this, but they should call this base class method at the end of the overloaded function.
Definition at line 87 of file YRadioButton.cc.
|
virtual |
Set a property. Reimplemented from YWidget.
This method may throw exceptions, for example
This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).
Reimplemented from YWidget.
Definition at line 133 of file YRadioButton.cc.
|
inlinevirtual |
Set the string of this widget that holds the keyboard shortcut.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 177 of file YRadioButton.h.
|
virtual |
Indicate whether or not a bold font should be used.
Derived classes are free to reimplement this, but they should call this base class method at the end of the overloaded function.
Definition at line 105 of file YRadioButton.cc.
|
pure virtual |
Set the radio button value (on/off).
Derived classes are required to implement this.
|
inlinevirtual |
Get the string of this widget that holds the keyboard shortcut.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 170 of file YRadioButton.h.
bool YRadioButton::useBoldFont | ( | ) | const |
Returns 'true' if a bold font should be used.
Definition at line 99 of file YRadioButton.cc.
|
inlinevirtual |
The name of the widget property that will return user input. Inherited from YWidget.
Reimplemented from YWidget.
Definition at line 184 of file YRadioButton.h.
|
pure virtual |
Get the current on/off value: 'true' if checked, 'false' if unchecked.
Derived classes are required to implement this.
|
inlinevirtual |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 84 of file YRadioButton.h.