class MASKING_DLL_DECLSPEC ListBox

The ListBox widget.

Inheritance:

ListBox - CompoundWidget - Dialog - Widget - Rect


Public Methods

[more]void HandleEvent(Widget& obj, int msg, int arg1=0, int arg2=0)
ListBox event handler.
[more]void SetMultiSelect(bool m)
Selects either the multiselect or normal mode.
[more]int Size()
Returns the number of items in the list
[more]bool Selected(int i)
[more]void Select(int i)
[more]void Deselect(int i)
[more]int Selection()
[more]void ScrollToSelection()
[more]int Focus()
[more]void SetFocus(int i)
[more]void InsertItem(ListItem* item, int i=0)
[more]ListItem* GetItem(int i)
[more]ListItem* GetFocusedItem()
[more]ListItem* GetSelectedItem()
[more]void DeleteItem(int i)
[more]void DeleteAllItems()
[more]void Sort()
[more]bool GetSingleClick()
[more]void SetSingleClick(bool single=false)
[more]void Sort(bool (*cmp)(const ListItem* , const ListItem* ))
These a are basically just wrappers for functions with the same names in ListView

Protected Fields

[more]Panel box
The underlaying panel widget
[more]Scroller vScroller
The underlaying vertical scroller used to scroll the main list view
[more]ListView* list
The underlaying ListView object

Protected Methods

[more]void MsgInitSkin()
Initializes the widget with the default bitmaps, fonts and colours
[more]void UpdateSize()
Updates the size and position of the underlaying widgets when the listbox itself is resized


Documentation

The ListBox widget. A ListBox is a widget for displaying lists of items. If there are too many items to display they can be scrolled vertically. The ListBox can operate in two modes: in normal mode only one item can be selected at any time and in multiselect mode more than one item can be selected. Every time the selection (or focus) changes the ListBox sends MSG_SCROLL to the parent dialog with the index of the focus item as the first argument and when an item is clicked or space or enter is pressed it sends MSG_ACTIVATE with the index of the selected item as the first argument.

Note: deprectated in favour of ListBoxEx.

oPanel box
The underlaying panel widget

oScroller vScroller
The underlaying vertical scroller used to scroll the main list view

oListView* list
The underlaying ListView object

ovoid MsgInitSkin()
Initializes the widget with the default bitmaps, fonts and colours

ovoid UpdateSize()
Updates the size and position of the underlaying widgets when the listbox itself is resized

ovoid HandleEvent(Widget& obj, int msg, int arg1=0, int arg2=0)
ListBox event handler. Handles events such as scrollbar scrolls and clicks in the list view.

ovoid SetMultiSelect(bool m)
Selects either the multiselect or normal mode. In multiselect mode more than one item can be selected at once while in normal mode only one can be selected. Default is normal mode.

oint Size()
Returns the number of items in the list

obool Selected(int i)

ovoid Select(int i)

ovoid Deselect(int i)

oint Selection()

ovoid ScrollToSelection()

oint Focus()

ovoid SetFocus(int i)

ovoid InsertItem(ListItem* item, int i=0)

oListItem* GetItem(int i)

oListItem* GetFocusedItem()

oListItem* GetSelectedItem()

ovoid DeleteItem(int i)

ovoid DeleteAllItems()

ovoid Sort()

obool GetSingleClick()

ovoid SetSingleClick(bool single=false)

ovoid Sort(bool (*cmp)(const ListItem* , const ListItem* ))
These a are basically just wrappers for functions with the same names in ListView


This class has no child classes.
Friends:
class MASKING_DLL_DECLSPEC ComboBox
See Also:
ListItem, ListItemString, ListView

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++