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

Public Methods | |
| KrListBox (int width, int height, const KrScheme &scheme, bool drawBorder) | |
| Constructs a list box. More... | |
| int | NumItems () |
| Return the number of items in the list box. | |
| int | SelectedItem () |
| Return the index 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. | |
| virtual bool | HandleWidgetEvent (KrWidget *source, U32 event, U32 data, const SDL_Event *sdlEvent, const char *command, const char *arg) |
| Handle SDL 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.2.11.1 written by Dimitri van Heesch,
© 1997-2001