ferroui_themes_simple/lib.rs
1//! ferroui-themes-simple
2//!
3//! The Simple theme: the control themes of the control set and the
4//! resources they use, in a light and a dark variant.
5//!
6//! The theme is markup: `SimpleTheme.xaml` (the document of the
7//! [`SimpleTheme`] class), `Accents/Base.xaml` (colours and brushes of the
8//! variants), `Controls/SimpleControls.xaml` (the list of the control
9//! themes) and one document per control under `Controls/`. The documents
10//! belong to the assembly `FerroUI.Themes.Simple`, with the URIs
11//! `ferres://FerroUI.Themes.Simple/<path>`. They are compiled into the crate,
12//! as upstream's compiler compiles them, and are not embedded as assets: a
13//! load by URI goes to the loader table of the compiled markup, which
14//! answers the public document `SimpleTheme.xaml` (see `build.rs`).
15//!
16//! ```ignore
17//! application.styles().add(SimpleTheme::new().upcast::<Styles>());
18//! ```
19
20mod assets;
21// `compiled_xaml`, the compiled markup of the theme: generated by the build script of the
22// crate from the documents of [`SimpleTheme`], against the type models of this crate and of
23// the crates it is built on (docs/porting/xaml.md, 9.5.13). The checked-in `compiled_xaml.rs`
24// is the reference `tests/compiled_xaml_tests.rs` compares the output of the build with, byte
25// for byte; it is not a module of the crate. (`compiled_markup`, which the same file declares,
26// is not used: the theme registers its assets and its loader table itself.)
27ferroui_markup_xaml::include_compiled_xaml!();
28mod register_types;
29mod rust_paths;
30mod simple_theme;
31
32pub use assets::{excluded_documents, ExcludedDocument};
33pub use register_types::{register_types, ASSEMBLY};
34pub use simple_theme::SimpleTheme;
35
36#[cfg(test)]
37mod tests;