#include <wx/vlbox.h>
wxVListBox is a wxListBox-like control with the following two main differences from a regular wxListBox: it can have an arbitrarily huge number of items because it doesn't store them itself but uses the from it (for example, wxHtmlListBox).
However it emits the same events as wxListBox and the same event macros may be used with it. Since wxVListBox does not store its items itself, the events will only contain the index, not any contents such as the string of an item.
Destructor.
Deletes all items from the control..
Deselects all the items in the listbox.
This method is only valid for multi selection listboxes.:
This method is only valid for multi selection listboxes.
Get the number of items in the control.
Returns the rectangle occupied by this item in physical coordinates.
If the item is not currently visible, returns an empty rectangle.
Returns the margins used by the control.
The
x field of the returned point is the horizontal margin and the
y field is the vertical one.
Returns the index of the next selected item or
wxNOT_FOUND if there are no more.
This method is only valid for multi selection listboxes.
Returns the number of the items currently selected.
It is valid for both single and multi selection controls. In the former case it may only return 0 or 1 however.
Get the currently selected item or
wxNOT_FOUND if there is no selection.
Returns the background colour used for the selected cells.
By default the standard system colour is used.
Returns true if the listbox was created with
wxLB_MULTIPLE style and so supports multiple selection or false if it is a single selection listbox.
Returns true if this item is the current one, false otherwise.
The current item is always the same as selected one for the single selection listbox and in this case this method is equivalent to IsSelected() but they are different for multi selection listboxes where many items may be selected but only one (at most) is current.
Returns true if this item is selected, false otherwise.
This method is used to draw the item's background and, maybe, a border around it.
The base class version implements a reasonable default behaviour which consists in drawing the selected item with the standard background colour and drawing a border around the item if it is either selected or current.
This method may be used to draw separators between the lines.
The rectangle passed to it may be modified, typically to deflate it a bit before passing to OnDrawItem().
The base class version of this method doesn't do anything.
The derived class must implement this method to return the height of the specified item (in pixels).
Selects or deselects the specified item which must be valid (i.e. not equal to
wxNOT_FOUND).
This function is only valid for the multiple selection listboxes, use SetSelection() for the single selection ones.
Selects all the items in the listbox.
This method is only valid for multi selection listboxes.
Selects all items in the specified range which may be given in any order.
This method is only valid for multi selection listboxes.
Set the number of items to be shown in the control.
This is just a synonym for wxVScrolledWindow::SetRowCount().
Set the margins: horizontal margin is the distance between the window border and the item contents while vertical margin is half of the distance between items.
By default both margins are 0.
Set the margins: horizontal margin is the distance between the window border and the item contents while vertical margin is half of the distance between items.
By default both margins are 0.
Set the selection to the specified item, if it is -1 the selection is unset.
The selected item will be automatically scrolled into view if it isn't currently visible.
This method may be used both with single and multiple selection listboxes.
Sets the colour to be used for the selected cells background.
The background of the standard cells may be changed by simply calling wxWindow::SetBackgroundColour().