Skip to main content

Module widgets

Module widgets 

Source
Expand description

Widget state types (list, table, input, select, etc.). Widget state types passed to Context widget methods.

Each interactive widget (text input, list, tabs, table, etc.) has a corresponding state struct defined here. Create the state once, then pass a &mut reference each frame.

Modules§

validators
Built-in field validator constructors (required / length / email / range / regex / one-of).

Structs§

AsyncValidationasync
One in-flight asynchronous field validation.
BreadcrumbResponse
Response from Context::breadcrumb.
CalDate
An absolute calendar date (year, month 1–12, day 1–31).
CalendarState
State for the calendar date picker widget.
ChordState
Cross-frame partial-sequence buffer for Context::key_chord.
ColorPickerState
State for an interactive color picker over the Color model.
CommandPaletteState
State for a command palette overlay.
ContextItem
Item in a context bar showing active context sources.
DirectoryTreeState
State for the directory tree widget.
FileEntry
A directory entry shown by FilePickerState.
FilePickerState
State for a file picker widget.
FormField
A single form field with a label, an input, and its own validators.
FormState
State for a form with multiple fields.
GaugeResponse
Response from Context::gauge and Context::line_gauge.
GutterResponse
Response from Context::scrollable_with_gutter.
HighlightRange
A highlighted line range within a scrollable region.
ListResponse
Response from Context::list_reorderable.
ListState
State for a selectable list widget.
ModeState
Named mode system with independent screen stacks.
MultiSelectState
State for a multi-select list.
NumberInputState
State for a numeric stepper field (clamp + step, integer or float).
PaginatorState
Standalone pagination state, decoupled from any list or table.
PaletteCommand
A single command entry in the palette.
RadioState
State for a radio button group.
RichLogEntry
A single entry in a RichLog.
RichLogState
State for the rich log viewer widget.
SchedulerState
Persistent timer table backing the frame-clock scheduler (issue #248).
ScreenState
Navigation stack state for multi-screen apps.
ScrollState
State for a scrollable container.
SelectState
State for a dropdown select widget.
SpinnerState
State for an animated spinner widget.
SplitPaneResponse
Response from Context::split_pane and Context::vsplit_pane.
SplitPaneState
State for a crate::Context::split_pane / crate::Context::vsplit_pane container.
StaticOutput
Accumulated static output lines for crate::run_static.
StreamingMarkdownState
State for a streaming markdown display.
StreamingTextState
State for a streaming text display.
TableState
State for a data table widget.
TabsState
State for a tab navigation widget.
TextInputState
State for a single-line text input widget.
TextareaState
State for a multi-line text area widget.
ToastMessage
A single toast notification message.
ToastState
State for toast notification display.
ToolApprovalState
State for a tool approval widget.
TreeNode
A node in a tree view.
TreeState
State for a hierarchical tree view widget.
Validator
A boxed, state-capturing field validator.

Enums§

AlertLevel
Severity level for alert widgets.
ApprovalAction
Approval state for a tool call.
ButtonVariant
Visual variant for buttons.
CalendarSelect
Selection behavior for CalendarState.
GridColumn
Column specification for crate::Context::grid_with().
PaginatorStyle
Visual style for Context::paginator.
PickerMode
Interaction mode of a ColorPickerState.
SpinnerPreset
Named throbber preset for SpinnerState.
TableColumn
Per-column width policy for a TableState.
ToastLevel
Severity level for a ToastMessage.
Trend
Direction indicator for stat widgets.
ValidateTrigger
When Context::form_field runs a field’s validators.

Constants§

DEFAULT_CHORD_TIMEOUT_TICKS
Default tick budget (~1s at 60Hz) after which a partially-typed chord is abandoned. Matches the tick clock used by notifications/animation.

Type Aliases§

FormValidator
Bare function-pointer validator used by the deprecated positional FormState::validate API.