Drag[en]gine Script Module DragonScript  1.23
Dragengine.Gui.ToggleButtonGroup Class Reference

Toggle button group. More...

Inheritance diagram for Dragengine.Gui.ToggleButtonGroup:
Dragengine.Gui.ListModel Dragengine.Gui.Events.StateChangeListener

Public Member Functions

void add (ToggleButton button)
 Add button. More...
 
void addListener (ListModelListener listener)
 Add listener. More...
 
Object getAt (int index)
 Element at index. More...
 
ToggleButton getButtonAt (int index)
 Button at index. More...
 
int getCount ()
 Count of models. 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 insert (int index, ToggleButton button)
 Insert button at index. More...
 
ToggleButtonGroup new ()
 Create toggle model group. More...
 
void remove (ToggleButton button)
 Remove button. More...
 
void removeAll ()
 Remove all buttons. 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...
 
- Public Member Functions inherited from Dragengine.Gui.ListModel
void notifyContentChanged (int fromIndex, int toIndex)
 Notify all that the content of the model in the given range changed. More...
 
- Public Member Functions inherited from Dragengine.Gui.Events.StateChangeListener
void onStateChanged (StateChangeEvent event)
 Widget changed state. More...
 

Detailed Description

Toggle button group.

Deprecated:
Use OptionGroupModel instead.

Ensures at most one ToggleButton in the group is toggled at each time.

Member Function Documentation

◆ add()

void Dragengine.Gui.ToggleButtonGroup.add ( ToggleButton  button)

Add button.

◆ addListener()

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

Add listener.

Implements Dragengine.Gui.ListModel.

◆ getAt()

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

Element at index.

Implements Dragengine.Gui.ListModel.

◆ getButtonAt()

ToggleButton Dragengine.Gui.ToggleButtonGroup.getButtonAt ( int  index)

Button at index.

◆ getCount()

int Dragengine.Gui.ToggleButtonGroup.getCount ( )

Count of models.

Implements Dragengine.Gui.ListModel.

◆ getSelected()

int Dragengine.Gui.ToggleButtonGroup.getSelected ( )

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

Implements Dragengine.Gui.ListModel.

◆ has()

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

Element is present.

Implements Dragengine.Gui.ListModel.

◆ indexOf()

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

Index of element or -1 if absent.

Implements Dragengine.Gui.ListModel.

◆ insert()

void Dragengine.Gui.ToggleButtonGroup.insert ( int  index,
ToggleButton  button 
)

Insert button at index.

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

◆ new()

ToggleButtonGroup Dragengine.Gui.ToggleButtonGroup.new ( )

Create toggle model group.

◆ remove()

void Dragengine.Gui.ToggleButtonGroup.remove ( ToggleButton  button)

Remove button.

◆ removeAll()

void Dragengine.Gui.ToggleButtonGroup.removeAll ( )

Remove all buttons.

◆ removeListener()

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

Remove listener.

Implements Dragengine.Gui.ListModel.

◆ setSelected()

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

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

Implements Dragengine.Gui.ListModel.


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