makeover-immediate
The immediate-mode renderer for makeover-layout.
It is the harshest renderer the description has to survive: no box-shadow,
no inset, no cascade, no retained tree to mutate, and one stroke per widget
with no per-side control. A two-tone lit edge is not something egui can be
configured into producing, so it is painted by hand here, once, rather than in
every consuming app.
Named for the mode rather than the library, the way makeover-tui is named
for the target and not for ratatui. Immediate mode is the constraint that
separates this renderer from the other two; egui is the backend it is written
against.
What it owns
The expression, and nothing else. Two mitred polylines for a bevel and a
Frame for a filled region.
It owns no substitutions. makeover derives surface-well and every consumer
reads it, so Palette::well is a required Color32 rather than an Option.
It picks no colours and no sizes. Palette is handed in already resolved, and
every radius, margin, stroke width and floor arrives in a style type
(FrameStyle, FieldStyle, PieceStyle, TableStyle, host::Metrics). Where
one has a default it is the suite's number: the focus ring (2 points) and the
target floor (24 points) match makeover-webview.
makeover is linked only by the theme feature, which adds
Palette::from_theme. Without it an app builds a palette from
Palette::two_tone and a setter per colour.
The vocabulary members (fields, columns, meters, controls, facts, figures and
charts) are drawn by quasi-immediate. This crate draws what carries no
member: depth, the palette, a table's per-frame facts and cell tones, tokens
and waits, and the egui visuals a host starts from.
Usage
use ;
use Depth;
frame;
A pressed control is Depth::Raised.pressed(). A stylesheet can say that once
and let the cascade carry it; an immediate-mode renderer has nowhere to put it,
so every call site decides, which is exactly why the description states the rule
instead of each widget re-deriving it.
Status
On crates.io. Design lives in the wiki note makeover-immediate; the backlog is
in GoingsOn under the project of the same name.
Licence
MIT.