Skip to main content

kas_core/theme/
mod.rs

1// Licensed under the Apache License, Version 2.0 (the "License");
2// you may not use this file except in compliance with the License.
3// You may obtain a copy of the License in the LICENSE-APACHE file or at:
4//     https://www.apache.org/licenses/LICENSE-2.0
5
6//! Theme API and sample implementations
7//!
8//! Widgets expect the theme to provide an implementation of [`SizeCx`] and of
9//! [`DrawCx`].
10//!
11//! Launching a UI requires a [`Theme`]. Two
12//! implementations are provided here: [`SimpleTheme`] and [`FlatTheme`].
13//! An adapter, [`MultiTheme`], is also provided.
14
15mod anim;
16mod colors;
17mod draw;
18mod flat_theme;
19mod multi;
20mod simple_theme;
21mod size;
22mod style;
23mod text;
24mod theme_dst;
25mod traits;
26
27#[cfg_attr(not(feature = "internal_doc"), doc(hidden))]
28#[cfg_attr(docsrs, doc(cfg(internal_doc)))]
29pub mod dimensions;
30
31pub use colors::{Colors, ColorsLinear, ColorsSrgb, InputState};
32pub use draw::{Background, DrawCx};
33pub use flat_theme::FlatTheme;
34pub use multi::MultiTheme;
35pub use simple_theme::SimpleTheme;
36pub use size::SizeCx;
37pub use style::*;
38pub use text::Text;
39pub use theme_dst::ThemeDst;
40pub use traits::{Theme, Window};
41
42#[cfg_attr(not(feature = "internal_doc"), doc(hidden))]
43#[cfg_attr(docsrs, doc(cfg(internal_doc)))]
44pub use {draw::ThemeDraw, size::ThemeSize};