ChildPlacement

sealed interface ChildPlacement

How a node holds the children composed under it.

A host either adds children to its own index space, or holds each child in a named region through a dedicated setter. The two are not interchangeable, so every child composed under a host is held to the placement the host declares.

Inheritors

Types

Link copied to clipboard
data object Indexed : ChildPlacement

Children are added by index and laid out by the host's layout manager.

Link copied to clipboard

Every child fills one region and the host holds any number of them in composition order.

Link copied to clipboard
class Slots(val names: List<String>, val content: SlotAttachment? = null) : ChildPlacement

Named regions that each hold at most one child, plus at most one unnamed child that fills the host's content when it declares one.