#include <YSelectionBox.h>
Inheritance diagram for YSelectionBox:

Public Member Functions | |
| YSelectionBox (const YWidgetOpt &opt, YCPString label) | |
| virtual char * | widgetClass () |
| YCPValue | changeWidget (const YCPSymbol &property, const YCPValue &newvalue) |
| YCPValue | queryWidget (const YCPSymbol &property) |
| const char * | userInputProperty () |
Protected Member Functions | |
| virtual int | getCurrentItem ()=0 |
| virtual void | setCurrentItem (int index)=0 |
Private Member Functions | |
| virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
SelectionBox
A selection box offers the user to select an item out of a list. Each item has a label and an optional id. When constructing the list of items, you have two way of specifying an item. Either you give a plain string, in which case the string is used both for the id and the label of the item. Or you specify a term `item( term id, string label ) or `item( term id, string label, boolean selected ), where you give an id of the form `id( any v ) where you can store an aribtrary value as id. The third argument controls whether the item is the selected item.
| YSelectionBox::YSelectionBox | ( | const YWidgetOpt & | opt, | |
| YCPString | label | |||
| ) |
Constructor
| text | the initial text of the SelectionBox label | |
| opt | the widget options |
| virtual char* YSelectionBox::widgetClass | ( | ) | [inline, virtual] |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YSelectionWidget.
| YCPValue YSelectionBox::changeWidget | ( | const YCPSymbol & | property, | |
| const YCPValue & | newvalue | |||
| ) | [virtual] |
Implements the ui command changeWidget.
The label above the list describing what it is all about
Reimplemented from YWidget.
Implements the ui command queryWidget
Reimplemented from YWidget.
| const char* YSelectionBox::userInputProperty | ( | ) | [inline, virtual] |
| virtual int YSelectionBox::getCurrentItem | ( | ) | [protected, pure virtual] |
Returns the index of the currently selected item or -1 if no item is selected.
| virtual void YSelectionBox::setCurrentItem | ( | int | index | ) | [protected, pure virtual] |
Selects an item from the list.
| void YSelectionBox::saveUserInput | ( | YMacroRecorder * | macroRecorder | ) | [private, virtual] |
1.5.0