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
//! Saudade — a minimal, retained-mode GUI library for small Win 3.1-styled
//! programs and utilities. Targets Wayland, X11, Windows, macOS.
//!
//! The library stays intentionally small:
//!
//! * the runtime drives winit + softbuffer
//! * widgets are ordinary Rust values implementing [`Widget`]
//! * events are typed (no integer message IDs)
//! * widgets request repaint / window close via [`EventCtx`]
//! * the default [`Theme`] paints chrome that matches Windows 3.1
//!
//! ## Minimal example
//!
//! ```no_run
//! use saudade::*;
//!
//! let root = Container::new(200, 80)
//! .with_background(Color::WHITE)
//! .add(Label::new(Rect::new(10, 10, 180, 16), "Hello, world!"))
//! .add(
//! Button::new(Rect::new(60, 40, 80, 24), "OK")
//! .default(true)
//! .on_click(|cx| cx.close()),
//! );
//!
//! App::new(WindowConfig::new("Hello", 200, 80), root).run();
//! ```
// Let the crate refer to itself as `saudade`, so the `include_svg!` macro —
// which expands to absolute `::saudade::…` paths for use by *downstream* crates
// — also works when saudade uses it internally (e.g. the dialog icons).
extern crate self as saudade;
pub use ;
pub use ;
pub use ;
pub use Font;
pub use ;
pub use Painter;
// `include_svg!` reads an SVG at compile time and expands to a const
// `SvgImage`; the runtime side just fills the baked polygons (no SVG parser in
// the binary). The macro emits paths like `::saudade::SvgImage`, so these
// re-exports are also the names its output references.
pub use include_svg;
pub use ;
pub use Theme;
pub use ;
pub use ;