FifeGUI 0.2.0
A C++ GUI library designed for games.
fcn::ListModel Class Referenceabstract

#include <listmodel.hpp>

Public Member Functions

virtual std::string getElementAt (int i)=0
virtual int getNumberOfElements ()=0
 ListModel (ListModel &&)=default
 ListModel (ListModel const &)=default
ListModel & operator= (ListModel &&)=default
ListModel & operator= (ListModel const &)=default

Detailed Description

Interface for a data model representing a list (used by ListBox/DropDown).

It is used in certain widgets, like the ListBox, to handle a lists with string elements. If you want to use widgets like ListBox, make a derived class from this class that represents your list.

Definition at line 23 of file listmodel.hpp.

Member Function Documentation

◆ getElementAt()

virtual std::string fcn::ListModel::getElementAt ( int i)
pure virtual

Gets an element at a certain index in the list.

Parameters
iAn index in the list.
Returns
An element as a string at the a certain index.

◆ getNumberOfElements()

virtual int fcn::ListModel::getNumberOfElements ( )
pure virtual

Gets the number of elements in the list.

Returns
The number of elements in the list

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