Optionalconfiguration: {Optionalcanvas: TCanvasAdds a custom occupant, built by factory each time it is placed; options.slot adds it to the table.
Optionaloptions: TLayoutOccupantOptionsThe element an occupant renders into; undefined before render() or for an occupant placed nowhere
ProtectedinsertAdds key to the table's slot, next to before/after when that occupant is in it, else at its end
ProtectedisThe occupants of a slot, in stacking order
Calls listener with each occupant a layout change moved to another slot (undefined: placed nowhere now)
ProtectedreadThe slots the configuration gives, each occupant kept in the first slot naming it
ProtectedregisterOptionaloptions: TLayoutOccupantOptionsProtectedrelayoutResolves the placement again and, once rendered, moves the hosts and announces who changed slot
Removes a custom occupant added by add; false when there was none under that key
Builds the slots holding occupants, with a host per occupant, and moves the connection state into its own
ProtectedrenderBuilds a custom occupant's element for its current slot; a factory that throws is logged, the rest renders
Protectedrender(Re)builds the slot containers, keeping each occupant's host — and so its content — across layouts
ProtectedresolveThe occupants of each slot: the configured slots as given, the others from the defaults minus what moved
Replaces the slots given, as at load: an occupant left out keeps its slot, one moved elsewhere leaves its default.
The slot an occupant sits in
OptionalcanvasThe canvas custom occupants' factories receive
The slots as configured, before the defaults fill the rest
ProtectedhostsProtectedloggerProtectedmoveThe built-in occupants of this canvas; a name outside of them and of the registered ones is ignored
ProtectedplacementWhere each occupant sits, resolved from the configuration and the defaults
ProtectedregisteredCustom occupants, by key
ProtectedrenderedProtectedslots
Remarks
Each occupant gets a host element in its slot, in table order: it renders into that host, so the order holds whatever order the occupants render in. When the layout changes, the hosts move with their content; an occupant that changes slot is announced (see onOccupantMoved) so it can rebuild for its new slot.