#include <YCheckBoxFrame.h>

Public Member Functions | |
| YCheckBoxFrame (const YWidgetOpt &opt, const YCPString &label) | |
| virtual char * | widgetClass () |
| YCPValue | changeWidget (const YCPSymbol &property, const YCPValue &newvalue) |
| YCPValue | queryWidget (const YCPSymbol &property) |
| virtual void | setLabel (const YCPString &label) |
| YCPString | getLabel () |
| virtual void | setValue (bool checked)=0 |
| virtual bool | getValue ()=0 |
| const char * | shortcutProperty () |
| const char * | userInputProperty () |
| bool | autoEnable () const |
| bool | invertAutoEnable () const |
| void | handleChildrenEnablement (bool isChecked) |
Private Member Functions | |
| virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
Private Attributes | |
| YCPString | _label |
| bool | _value |
| bool | _autoEnable |
| bool | _invertAutoEnable |
Frame with clickable on/off toggle button.
CheckBoxFrame
This is a combination of the check box widget and the frame widget: A frame that has a check box where a simple frame would have its frame title.
By default, the frame content (the child widgets) get disabled if the check box is set to "off" (unchecked) and enabled if the check box is set to "on" (cheched).
`opt(`invertAutoEnable) inverts this behaviour: It makes YCheckBoxFrame disable its content (its child widgets) if it is set to "on" (checked) and enable its content if it is set to "off".
`opt(`noAutoEnable) switches off disabling and enabling the frame content (the child widgets) completely. In that case, use QueryWidget() and/or `opt(`immediate).
Please note that unlike YCheckBox this widget does not support tri-state - it is always either on or off.
| YCheckBoxFrame::YCheckBoxFrame | ( | const YWidgetOpt & | opt, | |
| const YCPString & | label | |||
| ) |
Constructor
| virtual char* YCheckBoxFrame::widgetClass | ( | ) | [inline, virtual] |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YContainerWidget.
| YCPValue YCheckBoxFrame::changeWidget | ( | const YCPSymbol & | property, | |
| const YCPValue & | newvalue | |||
| ) | [virtual] |
Implements the ui command changeWidget.
Reimplemented from YWidget.
Implements the ui command changeWidget.
Reimplemented from YWidget.
| void YCheckBoxFrame::setLabel | ( | const YCPString & | label | ) | [virtual] |
Change the Frame label. Overload this, but call YCheckBoxFrame::setLabel at the end of your own function.
| YCPString YCheckBoxFrame::getLabel | ( | ) |
Get the current label.
| virtual void YCheckBoxFrame::setValue | ( | bool | checked | ) | [pure virtual] |
Set the check box on or off (check or uncheck it).
| virtual bool YCheckBoxFrame::getValue | ( | ) | [pure virtual] |
Returns whether the checkbox is checked.
| const char* YCheckBoxFrame::shortcutProperty | ( | ) | [inline, virtual] |
| const char* YCheckBoxFrame::userInputProperty | ( | ) | [inline, virtual] |
| bool YCheckBoxFrame::autoEnable | ( | ) | const [inline] |
Returns 'true' if autoEnable is on, i.e. if the frame content (the child widgets) should automatically be enabled if this FrameCheckBox is set to "on" (is checked).
| bool YCheckBoxFrame::invertAutoEnable | ( | ) | const [inline] |
Returns 'true' if the behaviour of autoEnable is inverted, i.e. if the frame content (the child widgets) should automatically be disabled if this FrameCheckBox is set to "on" (is checked) and vice versa.
| void YCheckBoxFrame::handleChildrenEnablement | ( | bool | isChecked | ) |
Handle enabling/disabling of child widgets based on 'isChecked' (the current status of the check box) and autoEnable() and invertAutoEnable().
Derived classes should call this when the check box status changes rather than try to handle it on their level.
This method also needs to be called after new child widgets are added to establish the initial enabled or disabled state of the child widgets.
| void YCheckBoxFrame::saveUserInput | ( | YMacroRecorder * | macroRecorder | ) | [private, virtual] |
Save the widget's user input to a macro recorder. Intentionally declared as "private" so all macro recording internals are handled by the abstract libyui level, not by a specific UI.
Reimplemented from YContainerWidget.
YCPString YCheckBoxFrame::_label [private] |
bool YCheckBoxFrame::_value [private] |
bool YCheckBoxFrame::_autoEnable [private] |
bool YCheckBoxFrame::_invertAutoEnable [private] |
1.5.3