Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / COLLECTIONS AND INTERACTION
StatefulWidget
A widget whose caller-owned state is synchronized with its rendered geometry.
State may update selection and scroll metrics during drawing. The widget never reads terminal events, starts tasks, or changes terminal modes.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Members on this page
Feature guides and release status
StatefulWidget
protocol StatefulWidgetA widget whose caller-owned state is synchronized with its rendered geometry.
State may update selection and scroll metrics during drawing. The widget never reads terminal events, starts tasks, or changes terminal modes.
Source · StatefulWidget.swift:5State
associatedtype StateThe application-owned state passed by reference while this widget renders.
Source · StatefulWidget.swift:6render(in:buffer:state:)
func render(in area: Rect, buffer: inout Buffer, state: inout State)Paints using caller-owned state. Widgets may reconcile measurement/selection metrics but never consume input.
Parameters (3)
in- Argument type and any default are shown in the declaration; see the behavior notes above.
buffer- Mutable destination cell grid.
state- Argument type and any default are shown in the declaration; see the behavior notes above.