Skip to main content

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 the app's side pane: a right column
12//! beside every screen, 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. With the `serde` feature,
14//! [`store`] is corundum's file on the device, `corundum.toml`: what the person left the UI
15//! in — [`look`], the theme and the language in effect, and the order of the shell's rail —
16//! put back before the app's first frame.
17//!
18//! The components depend on egui alone, so they render inside any host's egui context, on
19//! the desktops and on phones. With the `eframe` feature (on by default), [`window::run`]
20//! opens a desktop window on wgpu the same way for every app, set up by [`gpu`]; an app that
21//! renders egui without eframe turns default features off.
22
23/// The egui this crate renders with. Apps should use this re-export so their egui is
24/// always the one the components were built against.
25pub use egui;
26
27/// The eframe [`window::run`] opens windows with, for the same reason as [`egui`].
28#[cfg(feature = "eframe")]
29pub use eframe;
30
31pub mod detail;
32pub mod fonts;
33#[cfg(feature = "eframe")]
34pub mod gpu;
35pub mod i18n;
36pub mod icons;
37pub mod logcat;
38#[cfg(feature = "serde")]
39pub mod look;
40pub mod platform;
41pub mod settings;
42mod shell;
43#[cfg(feature = "serde")]
44pub mod store;
45pub mod theme;
46#[cfg(feature = "eframe")]
47pub mod window;
48
49#[cfg(test)]
50mod test_support;
51
52pub use shell::{Action, COMPACT_WIDTH, Destination, RailItem, RailOrder, Shell, ShellApp, Side};