#include <listbox.h>
Inheritance diagram for KrListBox:

Public Member Functions | |
| KrListBox (int width, int height, const KrScheme &scheme, bool drawBorder) | |
| Constructs a list box. | |
| int | NumItems () |
| Return the number of items in the list box. | |
| int | SelectedItem () |
| Return the index of the selected item. | |
| std::string | SelectedItemText () |
| Return the text of the selected item. | |
| int | AddTextChar (const std::string &text) |
| Add an item. Returns the index of the item. | |
| void | GetTextChar (int index, std::string *text) |
| Query an item and write it to the "text" string. | |
| void | MoveSelection (int delta) |
| Move the selection, positive or negative, scrolling if necessary. | |
| void | MoveUpOne () |
| Move the selection up one. | |
| void | MoveDownOne () |
| Move the selection down one. | |
| virtual bool | HandleWidgetEvent (KrWidget *source, const KrWidgetEvent &event) |
| Handle widget events, return true if handled, false if not ours. | |
Items can be added, but not removed. It can be scrolled, but through the method MoveSelection. Normally, you set up button to accomplish this. (The guitest demonstrates this.)
Events Sent
|
||||||||||||||||||||
|
Constructs a list box.
|
1.4.3