1use super::{FontId, PixelRect, UiDirection};
5use crate::Color;
6#[derive(Clone, Debug, Default)]
7pub struct UiTabBarResult {
8 pub bar: PixelRect,
10 pub tabs: PixelRect,
12 pub first_visible: i32,
14 pub one_past_last: i32,
16 pub activated_index: i32,
18 pub close_requested_index: i32,
20 pub selection_changed: bool,
22 pub dragged_index: i32,
24 pub drop_index: i32,
26 pub dropped: bool,
28}
29
30#[derive(Clone, Debug, Default)]
31pub struct UiTreeRowConfig {
32 pub depth: i32,
34 pub indent: i32,
36 pub disclosure_width: i32,
38 pub has_children: bool,
40 pub open: bool,
42 pub selected: bool,
44 pub enabled: bool,
46}
47
48#[derive(Clone, Debug, Default)]
49pub struct UiTreeRowResult {
50 pub row: PixelRect,
52 pub disclosure: PixelRect,
54 pub label: PixelRect,
56 pub activated: bool,
58 pub open_changed: bool,
60 pub open: bool,
62}
63
64#[derive(Clone, Debug)]
65pub struct UiScrollConfig {
66 pub wheel_step: f32,
68 pub scrollbar_width: f32,
70 pub scrollbar_gap: f32,
72 pub show_scrollbar: bool,
74}
75
76#[derive(Clone, Debug)]
77pub struct UiSplitConfig {
78 pub direction: UiDirection,
80 pub handle_size: f32,
82 pub minimum_first: f32,
84 pub minimum_second: f32,
86 pub keyboard_step: f32,
88}
89
90#[derive(Clone, Debug)]
91pub struct UiPropertyRowConfig {
92 pub label_fraction: f32,
94 pub gap: f32,
96 pub padding_x: f32,
98 pub alternate: bool,
100}
101
102#[derive(Clone, Debug)]
103pub struct UiPopupConfig {
104 pub width: f32,
106 pub height: f32,
108 pub gap: f32,
110 pub padding: f32,
112}
113
114#[derive(Clone, Debug)]
115pub struct UiDropdownConfig {
116 pub max_visible_items: i32,
118 pub popup_width: f32,
120 pub popup_gap: f32,
122}
123
124#[derive(Clone, Debug)]
125pub struct UiTableConfig {
126 pub row_height: i32,
128 pub max_visible_rows: i32,
130 pub show_header: bool,
132 pub zebra: bool,
134}
135
136#[derive(Clone, Debug)]
137pub struct UiTooltipConfig {
138 pub delay_ms: f32,
140 pub max_width: f32,
142 pub gap: f32,
144 pub padding: f32,
146}
147
148#[derive(Clone, Debug)]
149pub struct UiHeatmapConfig {
150 pub rows: i32,
152 pub cols: i32,
154 pub v_min: f32,
156 pub v_max: f32,
158 pub colormap: i32,
160 pub auto_scale: bool,
162 pub show_grid: bool,
164}
165
166#[derive(Clone, Debug)]
167pub struct UiGridConfig {
168 pub origin: [f32; 2],
169 pub minor_spacing: [f32; 2],
170 pub major_every: u32,
171 pub super_major_every: u32,
173 pub minor_thickness: f32,
174 pub major_thickness: f32,
175 pub super_major_thickness: f32,
176 pub axis_thickness: f32,
177 pub opacity: f32,
178 pub guide_fade_center: [f32; 2],
179 pub guide_fade_inner_radius: f32,
180 pub guide_fade_outer_radius: f32,
181 pub background_top: Color,
182 pub background_bottom: Color,
183 pub minor_color: Color,
184 pub major_color: Color,
185 pub super_major_color: Color,
186 pub axis_color: Color,
187 pub fill_background: bool,
188 pub draw_grid: bool,
189 pub draw_axes: bool,
190 pub radial_guide_fade: bool,
191 pub dither_background: bool,
192}
193
194#[derive(Clone, Copy, Debug, PartialEq)]
195pub struct UiPlotConfig {
196 pub color: Color,
198 pub x_min: f32,
200 pub x_max: f32,
202 pub y_min: f32,
204 pub y_max: f32,
206 pub auto_scale: bool,
208 pub show_grid: bool,
210 pub fill: bool,
212 pub antialias_samples: u32,
214 pub line_width: f32,
216 pub draw_surface: bool,
218}
219
220#[derive(Clone, Copy, Debug)]
221pub struct CvBboxesConfig {
222 pub color: Color,
223 pub line_width: f32,
224 pub alpha: f32,
225 pub label_scale: i32,
226 pub show_labels: bool,
227 pub show_scores: bool,
228}
229
230#[derive(Clone, Debug)]
231pub struct DetectionOverlayConfig {
232 pub max_detections: u32,
233 pub max_glyphs: u32,
234 pub thickness_pixels: f32,
235 pub font_size: f32,
236 pub label_padding_x: f32,
237 pub label_padding_y: f32,
238 pub box_color: Color,
239 pub label_text_color: Color,
240 pub show_labels: bool,
241}
242
243#[derive(Clone, Copy, Debug, Default, PartialEq)]
244pub struct GlyphInfo {
245 pub codepoint: u32,
246 pub atlas_x: f32,
247 pub atlas_y: f32,
248 pub atlas_w: f32,
249 pub atlas_h: f32,
250 pub bearing_x: f32,
251 pub bearing_y: f32,
252 pub advance: f32,
253 pub ink_w: f32,
254 pub ink_h: f32,
255 pub raster_size: f32,
256}
257
258#[derive(Clone, Copy, Debug, PartialEq)]
259pub struct TextLayoutConfig {
260 pub font: FontId,
261 pub size: f32,
262 pub wrap_width: f32,
263 pub monospace: bool,
264}