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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
//! Backend-agnostic app code shared by every example in this crate.
//!
//! Every example is a thin `main` that constructs an `AppLogic` impl
//! and calls `quadraui::{tui,gtk}::run(app)`. The `AppLogic` bodies
//! themselves live in this module, identical across both backends —
//! that's the payoff of the runner abstraction.
//!
//! Cargo doesn't auto-treat `examples/common/mod.rs` as an example
//! binary (it would if it were named `common.rs` at the examples/
//! root). Each example references it via `#[path = "common/mod.rs"]
//! mod common;`. This is the canonical pattern for shared example
//! helpers in Rust crates.
//!
//! - [`MiniApp`] (in [`mini_app`]) — minimal one-StatusBar app, used
//! by `tui_app` / `gtk_app`.
//! - [`AppState`] (in [`demo`]) — richer demo state (tabs + status
//! focus + last message), used by `tui_demo` / `gtk_demo`.
//! - [`DebugSidebar`] (in [`multi_tree`]) — `MultiSectionView` with
//! N collapsible-tree sections, used by `tui_multi_tree` /
//! `gtk_multi_tree`. Demonstrates the consumer pattern for
//! per-section scroll/selection state.
//! - [`ChatDemo`] (in [`chat_demo`]) — `ChatController` overlay with
//! scrollable transcript, multi-line input, history, and spinner,
//! used by `tui_chat` / `gtk_chat`.
//! - [`SidebarRevealDemo`] (in [`sidebar_reveal_demo`]) — single Tree
//! section exercising `SidebarSystem::reveal`, used by
//! `tui_sidebar_reveal` / `gtk_sidebar_reveal`.
//! - [`SidebarPanelBodyDemo`] (in [`sidebar_panel_body_demo`]) —
//! `quadraui::compose::sidebar_panel_body::SidebarPanelBody`
//! composing a background fill + cyclable header/search chrome + a
//! raw `TreeView` body + a hand-built scrollbar. Used by
//! `tui_sidebar_panel_body` / `gtk_sidebar_panel_body`.
//! - [`WorkspaceDemo`] (in [`workspace_demo`]) — `WorkspaceController`
//! mounted inside an `AppShell` panel: open-N-view-one document
//! tabs in the panel's rect, body painted by the app. Used by
//! `tui_workspace` / `gtk_workspace`.
//! - [`FocusDemo`] (in [`focus_demo`]) — two lists + a status bar whose
//! Tab/Shift+Tab order is derived from `ScreenLayout::tab_stops` and
//! cycled by the runner-owned `FocusManager`, with the backend
//! painting the focus ring. Used by `tui_focus_ring` / `gtk_focus_ring`.
//! - [`CaretShapeDemo`] (in [`caret_shape_demo`]) — cycles an `Editor`'s
//! caret through `EditorCursorShape`'s three modes, calling
//! `Backend::set_caret_shape` on each change. Used by
//! `tui_caret_shape` / `gtk_caret_shape`.
//! - [`key_map`] — **not** an `AppLogic`, unlike everything else in this
//! list. `KeyMap`/`KeyContext` are a standalone copy-paste recipe, not
//! wired into any runner. See its own module doc.
// Each example uses a subset of the shared items, so dead-code +
// unused-import warnings are expected and not actionable here.
pub use TerminalApp;
pub use ActivityNavApp;
pub use ActivityStyleDemo;
pub use AiTranscript;
pub use BoardApp;
pub use CanvasApp;
pub use CaretShapeDemo;
pub use ChartApp;
pub use ChatDemo;
pub use ClipboardDemo;
pub use CommandLineSelectionDemo;
pub use ContextMenuStyleDemo;
pub use DataTableApp;
pub use AppState;
pub use DialogTableDemo;
pub use DiffViewApp;
pub use EditorFontDemo;
pub use FileDialogDemo;
pub use FilePickerApp;
pub use FindReplaceApp;
pub use FloatApp;
pub use FocusDemo;
pub use FolderPickerApp;
pub use FormAllFieldsApp;
pub use FormGroupsApp;
pub use FormScrollApp;
pub use FrameDemo;
pub use HelpLayerDemo;
pub use HitMapRecoverDemo;
pub use HScrollEditor;
pub use ImageApp;
pub use IndicatorsApp;
pub use MarkdownDemo;
pub use MarkdownWrapDemo;
pub use MenuBarApp;
pub use MessageDialogApp;
pub use MessageDialogDemo;
pub use MessageListApp;
pub use MiniApp;
pub use MinimapApp;
pub use ModalOcclusionDemo;
pub use DebugSidebar;
pub use NativeMenuApp;
pub use PaletteDualModeApp;
pub use PanelApp;
pub use PipelineApp;
pub use RightClickDemo;
pub use SearchPanelApp;
pub use SelectionDemo;
pub use ShellApp;
pub use ShellMenuDemo;
pub use SidebarPanelApp;
pub use SidebarPanelBodyDemo;
pub use SidebarRevealDemo;
pub use SidebarSearchApp;
pub use SplitApp;
pub use SplitTreeApp;
pub use StatusBarPriorityDemo;
pub use SubmenuApp;
pub use TabChromeDemo;
pub use TabGroupDemo;
pub use TabIconsDemo;
pub use TextDisplayWrapDemo;
pub use ToastActionsApp;
pub use ToastApp;
pub use ToolbarApp;
pub use TooltipDemo;
pub use WideTabBarDemo;
pub use WindowControlDemo;
pub use WorkspaceDemo;