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
//! Egui-based renderer for `HyperChad` applications.
//!
//! This crate provides desktop rendering capabilities for `HyperChad` using the egui framework.
//! It implements the `hyperchad_renderer::Renderer` trait to render `HyperChad` UI elements
//! as native desktop applications through egui's immediate mode GUI system.
//!
//! # Features
//!
//! * **v1** - Version 1 renderer implementation (enabled by default)
//! * **v2** - Version 2 renderer implementation (enabled by default)
//! * **wgpu** - Use wgpu backend for rendering (enabled by default)
//! * **glow** - Use OpenGL backend for rendering
//! * **wayland** - Enable Wayland support on Linux
//! * **x11** - Enable X11 support on Linux
//!
//! # Example
//!
//! ```rust,no_run
//! use hyperchad_renderer_egui::{EguiRenderer, layout::EguiCalc};
//! use hyperchad_router::Router;
//! use hyperchad_router::ClientInfo;
//! use std::sync::Arc;
//!
//! # fn example<C: EguiCalc + Clone + Send + Sync + 'static>(
//! # router: Router,
//! # calculator: C,
//! # ) {
//! let (tx, _rx) = flume::unbounded();
//! let (resize_tx, _resize_rx) = flume::unbounded();
//! let client_info = Arc::new(ClientInfo::default());
//!
//! let renderer = EguiRenderer::new(
//! router,
//! tx,
//! resize_tx,
//! client_info,
//! calculator,
//! );
//! # }
//! ```
/// Version 1 of the egui renderer implementation.
///
/// This module provides the first generation egui-based renderer for `HyperChad`.
/// It includes the core renderer types and implements the `Renderer` trait for
/// rendering `HyperChad` UI elements using egui.
pub use *;
/// Version 2 of the egui renderer implementation.
///
/// This module provides the second generation egui-based renderer for `HyperChad`.
/// It includes improved rendering capabilities and updated implementations of the
/// `Renderer` trait for rendering `HyperChad` UI elements using egui.
pub use *;
/// Font metrics utilities for text measurement.
///
/// This module provides egui-specific implementations of font metrics,
/// enabling text measurement and layout calculations using egui's font system.
/// Layout calculation traits and utilities.
///
/// This module provides the `EguiCalc` trait that extends the base layout
/// calculation trait with egui-specific context handling for layout calculations.
pub use eframe;