Skip to main content

retroglyph_ui/state/
mod.rs

1//! Reusable widget state, kept separate from drawing.
2//!
3//! Widgets in this crate retain no state of their own (see the crate docs). But *something*
4//! still has to remember which item is selected and how far a list has scrolled between
5//! frames: that's app state, not widget state, and [`ListState`] is a small, tested, headless
6//! (no [`Backend`](retroglyph_core::backend::Backend) dependency) building block for
7//! it so every consumer doesn't hand-roll its own selection-cursor math.
8
9mod list;
10mod scroll;
11mod text_input;
12
13pub use list::{ListState, SelectionWrap};
14pub use scroll::{ScrollPhysics, ScrollState};
15pub use text_input::TextInputState;