retroglyph_ui/draw/mod.rs
1//! [`fill_rect`] and [`thumb_geometry`]/[`offset_for_pos`]: the handful of
2//! things genuinely useful as standalone functions rather than
3//! [`Widget`](crate::widget::Widget)s.
4//!
5//! `fill_rect` is a one-shot fill with no configuration worth building.
6//! `thumb_geometry`/`offset_for_pos` are pure position/size arithmetic with
7//! no [`Terminal`](retroglyph_core::terminal::Terminal) involved, reused for
8//! hit-testing independently of drawing a
9//! [`Scrollbar`](crate::widget::Scrollbar).
10//!
11//! Everything else that used to live here (`panel`, `modal`,
12//! `progress_bar`, `print_line`, `log`, `gauge`, `stat_bar`, `sparkline`,
13//! `table`, `meter_ramp`, `scrollbar`) is now a [`Widget`](crate::widget::Widget)
14//! (or [`StatefulWidget`](crate::widget::StatefulWidget)) struct under
15//! [`widget`](crate::widget), one file each, so there's a single way to draw
16//! each of them instead of a free function and a builder both doing the same
17//! thing.
18
19mod primitives;
20mod scrollbar;
21
22pub use primitives::fill_rect;
23pub use scrollbar::{offset_for_pos, thumb_geometry};