1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Immediate-mode drawing helpers over a [`Rect`](retroglyph_core::Rect).
//!
//! Box borders, filled panels, gauges, tables, sparklines, and a small
//! constraint-based [`Rect`](retroglyph_core::Rect) splitter with
//! ratatui-style `Fixed`/`Percent`/`Fill`/`Min`/`Max` constraints and `Flex`
//! alignment ([`layout`]).
//!
//! Every widget ([`widget`]) is a builder struct that draws itself into a
//! [`Terminal`](retroglyph_core::Terminal) via [`Widget`]/[`StatefulWidget`]
//! and retains no state of its own -- state that outlives one render call
//! (a selection index, a scroll offset) lives in [`ListState`] instead. A
//! handful of things that are genuinely just functions ([`fill_rect`],
//! [`thumb_geometry`]/[`offset_for_pos`]) stay free functions in [`draw`]
//! rather than pretending to be widgets. Three more independent layers
//! build on top:
//!
//! - [`Widget`]/[`StatefulWidget`] ([`widget`]) let callers box or store
//! heterogeneous widgets, e.g. a `Vec<Box<dyn Widget<B>>>` of panes to
//! render each frame.
//! - [`Interaction`] ([`interact`]) for hover/click/drag/focus tracking
//! without a retained widget tree -- the sibling of [`ListState`] for
//! widgets that don't have a natural selection index of their own.
//! - [`BoxStyle`] ([`style`]) for a Lip-Gloss-style box model (padding,
//! border, margin) rendered into a standalone `Grid`.
//! - [`join_h`]/[`join_v`] ([`block`]) to compose several `Grid`s -- e.g.
//! `BoxStyle::render` output -- into one before drawing it.
//! - [`Theme`] ([`theme`]) for named color roles (an app picks
//! [`Theme::DARK`]/[`Theme::LIGHT`], or builds its own), independent of
//! how the app decides which one is active.
//!
//! This crate is itself optional: games that draw manually depend only on
//! `retroglyph-core`.
// Compile the code blocks in this crate's own README as doctests so its quick start is
// type-checked on every test run and cannot silently rot. The `cfg(doctest)` gate keeps this out
// of the rendered crate documentation -- see `retroglyph-crossterm`'s matching include for the
// same pattern applied to the workspace root README.
;
pub use Align;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Theme;
pub use Paragraph;
pub use ;