#include <listmodel.hpp>
It is used in certain Widgets, like the ListBox, to handle a list with string elements. If you want to use Widgets like ListBox, you should inherit from this calss and implement it's functions.
Definition at line 72 of file listmodel.hpp.
Public Member Functions | |
virtual | ~ListModel () |
Destructor. | |
virtual int | getNumberOfElements ()=0 |
Gets the number of elements in the ListModel. | |
virtual std::string | getElementAt (int i)=0 |
Gets an element at a certain index in the list. |
virtual std::string gcn::ListModel::getElementAt | ( | int | i | ) | [pure virtual] |
Gets an element at a certain index in the list.
i | an index in the list. |
Referenced by gcn::ListBox::draw(), and gcn::DropDown::draw().
virtual int gcn::ListModel::getNumberOfElements | ( | ) | [pure virtual] |
Gets the number of elements in the ListModel.
Referenced by gcn::ListBox::adjustSize(), gcn::ListBox::draw(), and gcn::ListBox::setSelected().