Class clove::RadioGroupΒΆ

class clove::RadioGroup

Groups some clove::RadioButton together in a logical way, so the user can select exactly one of them.

Assign buttons to a group by setting clove::RadioButton::group().

Public Functions

RadioGroup()
selected()

Returns the clove::RadioButton which is currently selected in this group.

select(w)

Selects a button in the group.

Parameters

OnChanged

Triggered when another button was selected in this group.

This is a clove.Event instance. See Manual for details.

static getGroupByPublicName(name)

Returns a clove::RadioGroup by name. Either returns an already existing one, or creates a new one.

Developers of library functionality should not use this function due to risks of naming clashes.

Parameters
  • name: The group name.

selectedIndex()

Returns the position index of the currently selected child in this group.

selectedValue()

Returns the value of the currently selected child in this group.

selectByIndex(i)

Selects a child by its position index.

Parameters
  • i: The position index.

selectByValue(v)

Selects a child by its value. It will also understand position indexes as fallback.

Parameters
  • v: The value.

unselectAll()

Unselects all childs in this group.