forge_ui/lib.rs
1//! Forge UI: an owned widget/layout/painting engine with a native desktop adapter.
2//!
3//! Applications describe a tree and reduce semantic actions into their own state.
4//! IDs are stable identity: never derive an interactive ID from its current value.
5//!
6//! ```no_run
7//! use forge_ui::*;
8//! struct Counter(i32);
9//! impl Application for Counter {
10//! fn view(&self) -> Node {
11//! Node::column("root", vec![
12//! Node::label("count", format!("Count: {}", self.0)),
13//! Node::button("add", "Add one"),
14//! ]).padding(24.0).gap(12.0)
15//! }
16//! fn update(&mut self, action: Action) {
17//! if action.id == "add" { self.0 += 1; }
18//! }
19//! }
20//! run(Counter(0), WindowOptions::default()).unwrap();
21//! ```
22#![forbid(unsafe_code)]
23#[cfg(feature = "nedb")]
24pub mod journal;
25mod node;
26mod paint;
27mod runtime;
28mod window;
29pub use node::*;
30pub use paint::*;
31pub use runtime::*;
32pub use window::*;