Drag[en]gine Script Module DragonScript  1.23
Dragengine.Gui.ListModel Interface Reference

Model for content of list oriented widgets. More...

Inheritance diagram for Dragengine.Gui.ListModel:
Dragengine.Gui.DefaultListModel Dragengine.Gui.SharedListModel Dragengine.Gui.ToggleButtonGroup Dragengine.Gui.EditBindingsListModel

Public Member Functions

void addListener (ListModelListener listener)
 Add modifier. More...
 
Object getAt (int index)
 Element at index. More...
 
int getCount ()
 Number of elements. More...
 
int getSelected ()
 Index of the selected element or -1 if there is no selected element. More...
 
bool has (Object element)
 Element is present. More...
 
int indexOf (Object element)
 Index of element or -1 if absent. More...
 
void notifyContentChanged (int fromIndex, int toIndex)
 Notify all that the content of the model in the given range changed. More...
 
void removeListener (ListModelListener listener)
 Remove listener. More...
 
void setSelected (int index)
 Set index of selected element or -1 if none is no selected element. More...
 

Detailed Description

Model for content of list oriented widgets.

Member Function Documentation

◆ addListener()

void Dragengine.Gui.ListModel.addListener ( ListModelListener  listener)

◆ getAt()

Object Dragengine.Gui.ListModel.getAt ( int  index)

Element at index.

Exceptions
EOutOfBoundsindex is less than 0 or larger than or equal to getCount().

Implemented in Dragengine.Gui.ToggleButtonGroup, Dragengine.Gui.SharedListModel, and Dragengine.Gui.DefaultListModel.

◆ getCount()

int Dragengine.Gui.ListModel.getCount ( )

◆ getSelected()

int Dragengine.Gui.ListModel.getSelected ( )

Index of the selected element or -1 if there is no selected element.

Implemented in Dragengine.Gui.ToggleButtonGroup, Dragengine.Gui.SharedListModel, and Dragengine.Gui.DefaultListModel.

◆ has()

bool Dragengine.Gui.ListModel.has ( Object  element)

◆ indexOf()

int Dragengine.Gui.ListModel.indexOf ( Object  element)

Index of element or -1 if absent.

Implemented in Dragengine.Gui.ToggleButtonGroup, and Dragengine.Gui.SharedListModel.

◆ notifyContentChanged()

void Dragengine.Gui.ListModel.notifyContentChanged ( int  fromIndex,
int  toIndex 
)

Notify all that the content of the model in the given range changed.

Parameters
fromIndexIndex of first element that changed
toIndexIndex of last element that changed

Implemented in Dragengine.Gui.SharedListModel, Dragengine.Gui.DefaultListModel, and Dragengine.Gui.EditBindingsListModel.

◆ removeListener()

void Dragengine.Gui.ListModel.removeListener ( ListModelListener  listener)

◆ setSelected()

void Dragengine.Gui.ListModel.setSelected ( int  index)

Set index of selected element or -1 if none is no selected element.

Implemented in Dragengine.Gui.ToggleButtonGroup, Dragengine.Gui.SharedListModel, and Dragengine.Gui.DefaultListModel.


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