1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! egui-pop: themable, accessible, agent-drivable components for egui.
//!
//! The facade over the egui-pop crates: an application framework (`App`,
//! plugins, commands with their keys, menus and palette, zones and a
//! docking workbench, dialogs, toasts, settings, an undo history, a debug
//! bridge an agent can drive) and parts usable on their own (design tokens
//! and themes, visual kits, widgets, the image viewport, data views,
//! editors). What is stable and what is experimental is in the README;
//! what works without `App` is in the guide's "Using parts without App".
//!
//! The smallest start: themes are DTCG token files (see [`tokens`]) in
//! three tiers (palette, roles, components), composed from a base theme
//! (dark, light, high contrast), a density, an accent and overrides, and
//! turned into egui's own style so egui's widgets and other crates'
//! widgets match. Custom widgets read the typed [`theme::Tokens`] from the
//! context.
//!
//! ```
//! use egui_pop::theme::{self, Density, ThemeSpec};
//!
//! let ctx = egui::Context::default();
//! // At start-up, or whenever the user picks another theme:
//! let tokens = theme::install(
//! &ctx,
//! &ThemeSpec::new("pop-dark").density(Density::Compact).accent("blue"),
//! );
//! assert!(tokens.resolved().problems().is_empty());
//!
//! // Then draw as usual: egui's widgets use the theme, custom painting
//! // reads the typed tokens.
//! fn draw(ui: &mut egui::Ui) {
//! let tokens = theme::Tokens::of(ui.ctx());
//! ui.colored_label(tokens.status.success, "Saved");
//! let _ = ui.button("A themed button");
//! }
//! ```
//!
//! `egui` is re-exported: use `egui_pop::egui` to be sure to get the
//! version egui-pop was built for (one egui-pop minor per egui minor).
/// egui-pop's version: this crate's, the one an application depends on.
pub const VERSION: &str = env!;
pub use egui;
/// eframe (feature `eframe`): the version applications run with.
pub use eframe;
/// The token parser and resolver (no egui dependency).
pub use egui_pop_tokens as tokens;
/// The logic without egui: ids, commands, keymap, menus, panels, layouts,
/// the value store, documents.
pub use egui_pop_model as model;
/// The egui layer: focus, keys, overlays, placement, accessibility,
/// strings, icons, persistence, fault boundaries, binding.
pub use egui_pop_core as core;
/// The application API: plugins, the app builder, zones and blocks,
/// hooks, services, stories.
pub use egui_pop_api as api;
/// The image viewport, thumbnails and the histogram (feature
/// `viewport`).
pub use egui_pop_viewport as viewport;
/// The image tools' steps: each change of the histogram's drag, a
/// curve, a colour wheel, the zoom control or the navigator runs as a
/// step of the application (feature `imaging`).
pub use egui_pop_imaging as imaging;
/// Data views: a live tree, a list and a data table (feature `views`).
pub use egui_pop_views as views;
/// Text and code editors (feature `editors`).
pub use egui_pop_editors as editors;
/// Translations: catalogues, the language setting, locale formatting,
/// the key extractor (feature `i18n`).
pub use egui_pop_i18n as i18n;
/// Platform services as opt-in plugins: a single instance and deep
/// links, notifications, a tray icon, global shortcuts, logs and crash
/// reports, the focus mode and the text scaling read in-process, the
/// system clipboard (feature `platform`, or `platform-<service>` for
/// one).
pub use egui_pop_platform as platform;
/// Themes: tokens into egui's style (from `egui-pop-core`).
pub use theme;
/// What most applications use.