|
NXWidgets
1.19
|
#include <ilistbox.hxx>

Public Member Functions | |
| virtual | ~IListBox (void) |
| virtual void | addOption (const CNxString &text, const uint32_t value)=0 |
| virtual void | addOption (CListBoxDataItem *option)=0 |
| virtual void | removeOption (const int index)=0 |
| virtual void | removeAllOptions (void)=0 |
| virtual void | addOption (const CNxString &text, const uint32_t value, const nxwidget_pixel_t normalTextColor, const nxwidget_pixel_t normalBackColor, const nxwidget_pixel_t selectedTextColor, const nxwidget_pixel_t selectedBackColor)=0 |
| virtual void | selectOption (const int index)=0 |
| virtual void | deselectOption (const int index)=0 |
| virtual void | selectAllOptions (void)=0 |
| virtual void | deselectAllOptions (void)=0 |
| virtual const int | getSelectedIndex (void) const =0 |
| virtual void | setSelectedIndex (const int index)=0 |
| virtual const CListBoxDataItem * | getSelectedOption (void) const =0 |
| virtual void | setAllowMultipleSelections (const bool allowMultipleSelections)=0 |
| virtual const bool | allowsMultipleSelections (void) const =0 |
| virtual const CListBoxDataItem * | getOption (const int index)=0 |
| virtual void | sort (void)=0 |
| virtual const int | getOptionCount (void) const =0 |
| virtual const nxgl_coord_t | getOptionHeight (void) const =0 |
| virtual void | setSortInsertedItems (const bool sortInsertedItems)=0 |
Defines the interface for ListBox classes.
Definition at line 102 of file ilistbox.hxx.
|
inlinevirtual |
A virtual destructor is required in order to override the IListBox destructor. We do this because if we delete IListBox, we want the destructor of the class that inherits from IListBox to run, not this one.
Definition at line 112 of file ilistbox.hxx.
|
pure virtual |
Add a new option to the widget using default colors.
| text | Text to show in the option. |
| value | The value of the option. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Add an option to the widget.
| option | The option to add. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Add a new option to the widget.
| text | Text to show in the option. |
| value | The value of the option. |
| normalTextColor | Color to draw the text with when not selected. |
| normalBackColor | Color to draw the background with when not selected. |
| selectedTextColor | Color to draw the text with when selected. |
| selectedBackColor | Color to draw the background with when selected. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Sets whether multiple selections are possible or not.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Deselect all options. Redraws the widget and raises a value changed event.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Select an option by its index. Redraws the widget and raises a value changed event.
| index | The index of the option to select. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Get the specified option.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Get the total number of options.
Implemented in NXWidgets::CScrollingListBox, and NXWidgets::CListBox.
|
pure virtual |
Get the height of a single option.
Implemented in NXWidgets::CScrollingListBox, and NXWidgets::CListBox.
|
pure virtual |
Get the selected index. Returns -1 if nothing is selected. If more than one option is selected, the index of the first selected option is returned.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Get the selected option. Returns NULL if nothing is selected.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Remove all options from the widget.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Remove an option from the widget by its index.
| index | The index of the option to remove. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Select all options. Does nothing if the listbox does not allow multiple selections. Redraws the widget and raises a value changed event.
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Select an option by its index. Redraws the widget and raises a value changed event.
| index | The index of the option to select. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Sets whether multiple selections are possible or not.
| allowMultipleSelections | True to allow multiple selections. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Sets the selected index. Specify -1 to select nothing. Resets any other selected options to deselected. Redraws the widget and raises a value changed event.
| index | The selected index. |
Implemented in NXWidgets::CListBox, and NXWidgets::CScrollingListBox.
|
pure virtual |
Sets whether or not items added to the list are automatically sorted on insert or not.
| sortInsertedItems | True to enable sort on insertion. |
Implemented in NXWidgets::CScrollingListBox, and NXWidgets::CListBox.
|
pure virtual |
Sort the options alphabetically by the text of the options.
Implemented in NXWidgets::CScrollingListBox, and NXWidgets::CListBox.
1.8.13