Children

interface Children<W : Any>

An interface for manipulating a widget's list of children.

Arguments to these methods can be assumed to be validated against the current state of the list. No additional validation needs to be performed (for example, checking index bounds).

Inheritors

Properties

Link copied to clipboard
abstract val widgets: List<Widget<W>>

A view of current child widgets. This list will change its contents as the mutator functions below are invoked.

Functions

Link copied to clipboard
abstract fun detach()

Clear widgets without triggering an update the displayed UI.

Link copied to clipboard
abstract fun insert(index: Int, widget: Widget<W>)

Insert child widget at index.

Link copied to clipboard
abstract fun move(fromIndex: Int, toIndex: Int, count: Int)

Move count child widgets from fromIndex to toIndex.

Link copied to clipboard
abstract fun onModifierUpdated(index: Int, widget: Widget<W>)

Indicates that Modifiers for the child widgets have changed.

Link copied to clipboard
abstract fun remove(index: Int, count: Int)

Remove count child widgets starting from index.