corundum_framework_gui/lib.rs
1//! The look shared by the sapphire apps and asteria: what an egui app's window is made of
2//! before any of its own screens.
3//!
4//! [`Shell`] is the window frame: the app's screens on a rail (a bottom bar when narrow, as
5//! on a phone), with a footer for Settings and a slot of the app's own. [`fonts`] finds a
6//! CJK fallback font on the system; [`icons`] is a set of Lucide icons and the SVG loader
7//! that draws them; [`theme`] is the colours — light and dark, the contrast, the accent;
8//! [`i18n`] is the translations — every string looked up by id in the user's language,
9//! through [`tr!`]. [`settings`] is the Settings screen: the pages an app and the
10//! frameworks under it put in, the tabs of the scopes a setting can be kept in, and the
11//! theme and the language over them. [`detail`] is a main view's detail pane: a right
12//! column beside it, a card over it, or on a phone the screen in its place; its column's
13//! toggle sits at the right end of the shell's status bar.
14//!
15//! The components depend on egui alone, so they render inside any host's egui context, on
16//! the desktops and on phones. With the `eframe` feature (on by default), [`window::run`]
17//! opens a desktop window on wgpu the same way for every app, set up by [`gpu`]; an app that
18//! renders egui without eframe turns default features off.
19
20/// The egui this crate renders with. Apps should use this re-export so their egui is
21/// always the one the components were built against.
22pub use egui;
23
24/// The eframe [`window::run`] opens windows with, for the same reason as [`egui`].
25#[cfg(feature = "eframe")]
26pub use eframe;
27
28pub mod detail;
29pub mod fonts;
30#[cfg(feature = "eframe")]
31pub mod gpu;
32pub mod i18n;
33pub mod icons;
34pub mod logcat;
35pub mod platform;
36pub mod settings;
37mod shell;
38pub mod theme;
39#[cfg(feature = "eframe")]
40pub mod window;
41
42#[cfg(test)]
43mod test_support;
44
45pub use shell::{Action, COMPACT_WIDTH, Destination, Shell};