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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
// schema=ui_types.json schema_version=1 generator_version=64
// schema_sha256=644f7a5dfed92dd89db94b4d52ef8451b796a7989a3c8162a40e261d81e5e7f5
use super::{FontId, PixelRect, UiDirection};
use crate::Color;
#[derive(Clone, Debug, Default)]
pub struct UiTabBarResult {
/// Full tab-bar rectangle.
pub bar: PixelRect,
/// Rectangle spanning visible tab buttons only.
pub tabs: PixelRect,
/// Index of the first visible tab after this call.
pub first_visible: i32,
/// One past the last visible tab.
pub one_past_last: i32,
/// Index of the tab that was clicked, or -1.
pub activated_index: i32,
/// Index of the tab whose close button was clicked, or -1.
pub close_requested_index: i32,
/// Whether `state.selected` changed.
pub selection_changed: bool,
}
#[derive(Clone, Debug, Default)]
pub struct UiTreeRowConfig {
/// Nesting depth (0 = root).
pub depth: i32,
/// Pixels per indent level.
pub indent: i32,
/// Width reserved for the disclosure arrow.
pub disclosure_width: i32,
/// True if this item has children.
pub has_children: bool,
/// True if this item is currently expanded.
pub open: bool,
/// True if this item is selected.
pub selected: bool,
/// False to render greyed out.
pub enabled: bool,
}
#[derive(Clone, Debug, Default)]
pub struct UiTreeRowResult {
/// Full row rectangle.
pub row: PixelRect,
/// Disclosure-arrow rectangle.
pub disclosure: PixelRect,
/// Label rectangle.
pub label: PixelRect,
/// True if the row was activated (clicked).
pub activated: bool,
/// True if the open/close state toggled.
pub open_changed: bool,
/// Current open state after this call.
pub open: bool,
}
#[derive(Clone, Debug)]
pub struct UiScrollConfig {
/// Pixels scrolled per mouse-wheel notch.
pub wheel_step: f32,
/// Width of the scrollbar track in pixels.
pub scrollbar_width: f32,
/// Gap between content and scrollbar track.
pub scrollbar_gap: f32,
/// Whether to show the scrollbar.
pub show_scrollbar: bool,
}
#[derive(Clone, Debug)]
pub struct UiSplitConfig {
/// Flow direction: Column = top/bottom split, Row = left/right split.
pub direction: UiDirection,
/// Width of the drag handle in pixels.
pub handle_size: f32,
/// Minimum size of the first pane in pixels.
pub minimum_first: f32,
/// Minimum size of the second pane in pixels.
pub minimum_second: f32,
/// Pixels moved per arrow-key press.
pub keyboard_step: f32,
}
#[derive(Clone, Debug)]
pub struct UiPropertyRowConfig {
/// Fraction of the row width reserved for the label (0–1).
pub label_fraction: f32,
/// Gap between label and value columns in pixels.
pub gap: f32,
/// Horizontal padding inside each column.
pub padding_x: f32,
/// Draw an alternating background on even rows.
pub alternate: bool,
}
#[derive(Clone, Debug)]
pub struct UiPopupConfig {
/// Popup width in pixels.
pub width: f32,
/// Popup height in pixels (0 = hug content).
pub height: f32,
/// Gap between anchor and popup in pixels.
pub gap: f32,
/// Padding inside the popup panel.
pub padding: f32,
}
#[derive(Clone, Debug)]
pub struct UiDropdownConfig {
/// Maximum number of visible items before scrolling.
pub max_visible_items: i32,
/// Popup width override (0 = match widget width).
pub popup_width: f32,
/// Gap between widget and popup.
pub popup_gap: f32,
}
#[derive(Clone, Debug)]
pub struct UiTooltipConfig {
/// Milliseconds to wait before showing the tooltip.
pub delay_ms: f32,
/// Maximum tooltip width in pixels.
pub max_width: f32,
/// Gap between cursor and tooltip box.
pub gap: f32,
/// Padding inside the tooltip panel.
pub padding: f32,
}
#[derive(Clone, Debug)]
pub struct UiHeatmapConfig {
/// Number of data rows.
pub rows: i32,
/// Number of data columns.
pub cols: i32,
/// Minimum value mapped to the cold color.
pub v_min: f32,
/// Maximum value mapped to the hot color.
pub v_max: f32,
/// Colormap index (matches [`crate::plot::axes::HeatmapStyle`] colormap).
pub colormap: i32,
/// Auto-scale range from data when true.
pub auto_scale: bool,
/// Draw grid lines between cells.
pub show_grid: bool,
}
#[derive(Clone, Debug)]
pub struct UiGridConfig {
pub origin: [f32; 2],
pub minor_spacing: [f32; 2],
pub major_every: u32,
/// Number of minor intervals per super-major interval.
pub super_major_every: u32,
pub minor_thickness: f32,
pub major_thickness: f32,
pub super_major_thickness: f32,
pub axis_thickness: f32,
pub opacity: f32,
pub guide_fade_center: [f32; 2],
pub guide_fade_inner_radius: f32,
pub guide_fade_outer_radius: f32,
pub background_top: Color,
pub background_bottom: Color,
pub minor_color: Color,
pub major_color: Color,
pub super_major_color: Color,
pub axis_color: Color,
pub fill_background: bool,
pub draw_grid: bool,
pub draw_axes: bool,
pub radial_guide_fade: bool,
pub dither_background: bool,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct UiPlotConfig {
/// Series line color.
pub color: Color,
/// X-axis minimum (screen-space sample domain when not auto-scaled).
pub x_min: f32,
/// X-axis maximum.
pub x_max: f32,
/// Y-axis minimum, used when `auto_scale` is false.
pub y_min: f32,
/// Y-axis maximum, used when `auto_scale` is false.
pub y_max: f32,
/// Resolve Y bounds from finite samples.
pub auto_scale: bool,
/// Draw the chart grid behind the series.
pub show_grid: bool,
/// Fill under the series line.
pub fill: bool,
/// Compute-line rasterization samples; the implemented set is 1/4/8. Other values resolve to four samples rather than naming MSAA on a storage-image path.
pub antialias_samples: u32,
/// Rasterized line width in pixels.
pub line_width: f32,
/// Paint the themed plot surface before drawing.
pub draw_surface: bool,
}
#[derive(Clone, Copy, Debug)]
pub struct CvBboxesConfig {
pub color: Color,
pub line_width: f32,
pub alpha: f32,
pub label_scale: i32,
pub show_labels: bool,
pub show_scores: bool,
}
#[derive(Clone, Debug)]
pub struct DetectionOverlayConfig {
pub max_detections: u32,
pub max_glyphs: u32,
pub thickness_pixels: f32,
pub font_size: f32,
pub label_padding_x: f32,
pub label_padding_y: f32,
pub box_color: Color,
pub label_text_color: Color,
pub show_labels: bool,
}
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct GlyphInfo {
pub codepoint: u32,
pub atlas_x: f32,
pub atlas_y: f32,
pub atlas_w: f32,
pub atlas_h: f32,
pub bearing_x: f32,
pub bearing_y: f32,
pub advance: f32,
pub ink_w: f32,
pub ink_h: f32,
pub raster_size: f32,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct TextLayoutConfig {
pub font: FontId,
pub size: f32,
pub wrap_width: f32,
pub monospace: bool,
}