Expand description
guinea on egui: the same router and features, drawn immediately.
The closest relative among the backends is ratatui, not WinUI: egui is
immediate, so a view is not a tree that is kept and diffed - it is drawing
that happens inside one frame and leaves nothing behind. As there, a view
is a Node: drawing deferred until someone supplies the egui::Ui to
draw into, which is what lets a layout decide where its child goes.
What differs from the terminal is who owns the loop. eframe owns it, the
way the reactor does under WinUI, so run hands it over and puts the
frame inside eframe::App::update. And unlike a terminal, egui sleeps when
nothing happens - so work finished on another thread has to wake it, which
is what the dispatcher’s request_repaint is for.
Structs§
- Egui
- egui as a
Ui. - Layout
Cx - What a layout’s drawing is handed. Same as a page’s, plus the child.
- Mount
Layout - Mount
Page - A zero-sized marker per segment type: what a
constentry points at to get its&'static dyn Mount. - Node
- Drawing that has not happened yet.
- PageCx
- What a page’s drawing is handed.
Constants§
Traits§
- Layout
- A branch: draws its own chrome and decides where its child goes. Its own
state, the same way a
Pageis. - Page
- A leaf of the route tree, and its own state.
Functions§
- layout_
entry - page_
chain - A one-segment chain, for a page drawn without a route tree.
- run
- Runs the application in a window eframe opens, starting where
initialsays. - segment_
entry