Inherited by WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.
Public Member Functions | |
virtual int | getSelectedIndex () const =0 |
Return the selected index of the Widget. | |
void | onSelectionChanged (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Setting the event handler for the "selection changed" event. | |
virtual void | setSelectedIndex (int idx)=0 |
Sets the selected index of the Widget. |
E.g. the WidgetComboBox have a "selected" Aspect therefore it realizes the AspectSelection through inheritance.
virtual int getSelectedIndex | ( | ) | const [pure virtual] |
Return the selected index of the Widget.
The return value is the selected items index of the Widget, if no item is selected the return value will be -1.
Note!
Some Widgets have the possibillity of selecting multiple items, if so you should not use this function but rather the multiple selection value getter.
Implemented in WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.
virtual void setSelectedIndex | ( | int | idx | ) | [pure virtual] |
Sets the selected index of the Widget.
The idx parameter is the (zero indexed) value of the item to set as the selected item. You must add the items before you set the selected index.
Implemented in WidgetComboBox, WidgetDataGrid, WidgetTabSheet, and WidgetTreeView.