makeover-immediate 0.1.0

The immediate-mode renderer for makeover-layout. Immediate mode is the constraint that matters, not the library: no cascade, no retained tree, one stroke per widget. Backed by egui.
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented0 out of 6 items with examples
  • Size
  • Source code size: 29.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 705 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MaxJMath

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, a Frame for a filled region, and the decision of what to do when an intent has no colour yet.

It owns no colours and no sizes. Palette is handed in already resolved, and every radius, margin and stroke width arrives in FrameStyle. That is why there is no dependency on makeover: the app already resolves a theme, and pinning a renderer to a colour crate's version would buy nothing.

Usage

use makeover_immediate::{frame, FrameStyle, Palette};
use makeover_layout::Depth;

frame(ui, Depth::Raised, &palette, style, |ui| {
    ui.label("a card laid on the panel it sits in");
});

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

Unpublished, and depends on makeover-layout by path while both are. The sequencing decision is that neither goes to crates.io until a second renderer has exercised the vocabulary, since a description with one renderer is an API with extra steps.

First consumer is audiofiles, the only Make Creative app that is egui and the only one with no CSS. Design lives in the wiki note makeover-immediate; the backlog is in GoingsOn under the project of the same name.

Licence

MIT.