#include <YMultiSelectionBox.h>
Inheritance diagram for YMultiSelectionBox:
Public Member Functions | |
YMultiSelectionBox (const YWidgetOpt &opt, YCPString label) | |
virtual char * | widgetClass () |
void | addItem (const YCPString &text, const YCPValue &id=YCPVoid(), bool selected=false) |
YCPValue | changeWidget (const YCPSymbol &property, const YCPValue &newvalue) |
YCPValue | queryWidget (const YCPSymbol &property) |
virtual void | setLabel (const YCPString &label) |
YCPString | getLabel () |
virtual void | deleteAllItems () |
const char * | shortcutProperty () |
Protected Member Functions | |
virtual void | itemAdded (const YCPString &text, bool selected)=0 |
virtual bool | itemIsSelected (int index)=0 |
virtual void | selectItem (int index)=0 |
virtual void | deselectAllItems ()=0 |
virtual int | getCurrentItem ()=0 |
virtual void | setCurrentItem (int index)=0 |
int | numItems () const |
int | itemWithId (const YCPValue &id, bool report_error) |
Protected Attributes | |
YCPString | label |
YCPList | item_ids |
YCPList | item_labels |
Private Member Functions | |
virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
MultiSelectionBox
The MultiSelectionBox displays a ( scrollable ) list of items from which any number ( even nothing! ) can be selected. Use the MultiSelectionBox's SelectedItems
property to find out which.
Each item can be specified either as a simple string or as `item( ... )
which includes an ( optional ) ID and an ( optional ) 'selected' flag that specifies the initial selected state ( 'not selected', i.e. 'false', is default ).
|
Constructor
|
|
Adds an item to the selection box. |
|
Implements the ui command changeWidget. string Label The label above the list describing what it is all about string CurrentItem The item that currently has the keyboard focus id_list SelectedItems The items that are currently selected Reimplemented from YWidget. |
|
Delete all items. Reimplement this in derived classes, but make sure to call the parent method! |
|
Deselect all items. Reimplement this in derived classes! |
|
Returns the index of the item that currently has the keyboard focus. Reimplement this in derived classes! |
|
Get the current label text. This method cannot be overidden. The value of the label cannot be changed other than by calling setLabel, i.e. not by the ui. Therefore setLabel stores the current label in label. |
|
Called when an item has been added. Reimplement this in derived classes!
|
|
Check whether or not item #index is selected. Reimplement this in derived classes! |
|
Searches for an item with a certain id or a certain label. Returns the index of the found item or -1 if none was found
|
|
Returns the current number of items |
|
Implements the ui command queryWidget Reimplemented from YWidget. |
|
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 YWidget. |
|
Select item #index. Reimplement this in derived classes! |
|
Set the keyboard focus to one item. Reimplement this in derived classes! |
|
Change the label text. Overload this, but call YTextEntry::setLabel at the end of your own function. |
|
The name of the widget property that holds the keyboard shortcut. Inherited from YWidget. Reimplemented from YWidget. |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YWidget. |
|
The current list of item ids. We make destructive changes to this variable, so make sure only one reference to it exists! |
|
The current list of item labels. We make destructive changes to this variable, so make sure only one reference to it exists! |
|
The current label of the selectionbox |