Main Page   Class Hierarchy   Compound List   File List   Compound Members  

KrListBox Class Reference

A very simple listbox. More...

#include <listbox.h>

Inheritance diagram for KrListBox::

KrWidget KrImNode IKrWidgetListener List of all members.

Public Methods

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.


Detailed Description

A very simple listbox.

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


The documentation for this class was generated from the following file:
Generated on Fri Feb 7 20:44:21 2003 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001