____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

gcn::ListModel Class Reference

#include <listmodel.h>

Inheritance diagram for gcn::ListModel:

LuaListModel

List of all members.

Public Member Functions

virtual int getNumberOfElements ()=0
virtual std::string getElementAt (int i)=0
virtual ~ListModel ()


Detailed Description

Represents a list. 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 70 of file listmodel.h.


Constructor & Destructor Documentation

virtual gcn::ListModel::~ListModel (  )  [inline, virtual]

Definition at line 89 of file listmodel.h.


Member Function Documentation

virtual int gcn::ListModel::getNumberOfElements (  )  [pure virtual]

Gets the number of elements in the ListModel.

Returns:
the number of elements in the ListModel

Implemented in LuaListModel.

Referenced by gcn::ListBox::adjustSize(), gcn::ListBox::draw(), and gcn::ListBox::setSelected().

virtual std::string gcn::ListModel::getElementAt ( int  i  )  [pure virtual]

Gets an element at a certain index in the list.

Parameters:
i an index in the list.
Returns:
an element as a string.

Implemented in LuaListModel.

Referenced by gcn::ListBox::draw(), and gcn::DropDown::draw().


The documentation for this class was generated from the following file:

Generated on Sat Feb 21 00:28:26 2009 for Bos Wars by  doxygen 1.5.6