Skip to main content

Module ui

Module ui 

Source
Expand description

The component kit: the pieces every surface is built from.

One Surface per modal or sidebar, FormRows inside it, a Picker for pick-one lists, a HintBar for the keys, a SectionRule to divide space without borders, Working for a wait said where its result will appear. The canon these implement is the ui-style skill; a screen that hand-rolls one of these is a migration target.

Structs§

FormRow
FormView
What a form dialog draws. footer is the form’s own keys; while a picker is open its keys stand in, from the Picker group of screen’s registry entries.
HintBar
A row of key chips. Primary action first, Esc last; chips that do not fit are dropped whole from the right, never clipped mid-word.
Picker
Draws a pick-one list: the selection carries the rail, and the tint when the list is focused. Selected-but-unfocused stays visible. With marks it is a toggle list: each item carries a checkbox, and choosing means Space.
PickerState
The list and where the cursor is in it. Owns the narrowing; the caller owns what choosing means.
SectionRule
Never a focus signal: the section’s focused row carries the rail and the accent, and the rule reads the same whether focus is in its section or not.
Surface
The frame every surface draws: rounded border, unpadded Title Case title, optionally a one-line chip footer on the last inner row.
Working

Enums§

Clicks
What a click on a line does, recorded as the list is drawn.
FormLine
One line of a form dialog.
FormValue
What sits after the label.