Skip to main content

Crate guinea_eframe

Crate guinea_eframe 

Source
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.
LayoutCx
What a layout’s drawing is handed. Same as a page’s, plus the child.
MountLayout
MountPage
A zero-sized marker per segment type: what a const entry points at to get its &'static dyn Mount.
Node
Drawing that has not happened yet.
PageCx
What a page’s drawing is handed.

Constants§

MAIN
What run calls the root it opens.

Traits§

Layout
A branch: draws its own chrome and decides where its child goes. Its own state, the same way a Page is.
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 initial says.
segment_entry