Expand description
Reusable widget state, kept separate from drawing.
Widgets in this crate retain no state of their own (see the crate docs). But something
still has to remember which item is selected and how far a list has scrolled between
frames: that’s app state, not widget state, and ListState is a small, tested, headless
(no Backend dependency) building block for
it so every consumer doesn’t hand-roll its own selection-cursor math.
Structs§
- List
State - Selection index and scroll offset for a selectable, scrollable list.
- Scroll
Physics - Configurable physics constants for
ScrollState. - Scroll
State - Scroll state for smooth, momentum-based scrolling with rubber-banding.
- Text
Input State - A
Stringvalue, a byte cursor into it, and a horizontal scroll offset.
Enums§
- Selection
Wrap - How
ListState::select_next/select_previousbehave when the selection is already at the first/last item.