rust_widgets 2.9.2

Pure Rust cross-platform native GUI library with hardware-adaptive rendering, 180 widgets, touch/gesture support, i18n, and SVG-pipeline-accurate output
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
// SPDX-FileCopyrightText: Copyright (c) 2026 Mike Li/Mikewolfli/Wei Li(mikewolfli@163.com)
// SPDX-License-Identifier: MIT

// Hand-maintained const arrays for widget properties.
//
// This header used to claim the file was auto-generated from `properties.rs` with a
// "DO NOT EDIT DIRECTLY" instruction, but no generator exists in `tools/` or
// `scripts/` that writes `.in.rs` files. The only script that touches them
// (`generate_control_route_matrix.py`) *reads* the `create_widgets_*.in.rs` set to
// emit a report, which is a different family. Edit these directly.

macro_rules! impl_properties_view {
    () => {
        #[cfg(not(alloc_frugal))]
        pub(crate) const LIST_VIEW_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("focused_row", PropertyValueKind::UInt, true, true),
            PropertySchema::enumerated(
                "selection_mode",
                true,
                true,
                // `none` is a real, publicly reachable state (`SelectionMode::None`: the view
                // accepts no selection at all, which is distinct from an empty selection).
                // Omitting it made the reader report a token the schema never published *and*
                // the writer refuse that same token — so a `none` view could not be round-tripped
                // through its own contract.
                &["none", "single", "multi", "extended"],
            ),
            PropertySchema::enumerated(
                "view_mode",
                true,
                true,
                &["list", "icon", "details", "thumbnails"],
            ),
            PropertySchema::enumerated("alignment", true, true, &["left", "centre", "right"]),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("icon_visible_in_list_mode", PropertyValueKind::Bool, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const TREE_VIEW_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
            PropertySchema::new("node_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("focused_node", PropertyValueKind::UInt, true, true),
            PropertySchema::new("selected_node", PropertyValueKind::UInt, true, false),
            // Whether an in-place edit delegate is bound. Published so a designer can tell "this
            // tree can be renamed in place" from "the host left the seam empty" before offering
            // the gesture — the same reason `TableWidget` publishes `has_delegate`.
            PropertySchema::new("has_delegate", PropertyValueKind::Bool, true, false),
            // The focused node's expansion state. Optional by construction: `Null` means the
            // focused node is not a visible branch.
            PropertySchema::new("expanded_focused_node", PropertyValueKind::Bool, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("expansion_animated", PropertyValueKind::Bool, true, true),
            PropertySchema::new("lazy_loading", PropertyValueKind::Bool, true, true),
            PropertySchema::new("loading_indicator_visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("fetch_timeout_ms", PropertyValueKind::UInt, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const TABLE_WIDGET_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
            PropertySchema::new("has_delegate", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
            // `none` is published here for the same reason it is on `LIST_VIEW_PROPERTIES`:
            // both controls share `SelectionMode`, so both must publish its whole vocabulary.
            PropertySchema::enumerated(
                "selection_mode",
                true,
                true,
                &["none", "single", "multi", "extended"],
            ),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("editable", PropertyValueKind::Bool, true, true),
            // A bitset of gestures; the published tokens are `none`, `double_clicked`,
            // `edit_key` and the union `all` (or any `+`-joined combination).
            PropertySchema::new("edit_triggers", PropertyValueKind::String, true, true),
        ];

        // `GridTableWidget` is the feature-rich virtualised table (grid lines,
        // headers, per-column widths, sorting). It was implemented and exported but
        // had no capability at all, so it could not be created by name. It shares
        // `WidgetKind::GridTable` with nothing else, hence its own row in the
        // type-based tie-break table is only needed once the kind has a second entry.
        // `NumberPicker` is a scrolling digit wheel: `value` is snapped to a grid
        // anchored at `minimum`, so both bounds stay selectable.
        // `OtpInput` is a fixed-length code entry: `length` and `masked` describe
        // the display, `value` is the real code, and the two derived names let a
        // caller drive a "verify" button without re-deriving them.
        #[cfg(not(alloc_frugal))]
        pub(crate) const OTP_INPUT_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("value", PropertyValueKind::String, true, true),
            PropertySchema::new("length", PropertyValueKind::UInt, true, true),
            PropertySchema::new("masked", PropertyValueKind::Bool, true, true),
            // I-106: read-only and the character class are part of the published contract.
            PropertySchema::new("read_only", PropertyValueKind::Bool, true, true),
            PropertySchema::new("digits_only", PropertyValueKind::Bool, true, true),
            PropertySchema::new("separator", PropertyValueKind::String, true, true),
            PropertySchema::new("focused_index", PropertyValueKind::UInt, true, false),
            PropertySchema::new("is_complete", PropertyValueKind::Bool, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        // `Banner` is a persistent notice: unlike a snackbar it has no timer, so
        // `dismissed` is read-only state the user drives by clicking.
        #[cfg(not(alloc_frugal))]
        pub(crate) const BANNER_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("text", PropertyValueKind::String, true, true),
            PropertySchema::enumerated(
                "severity",
                true,
                true,
                &["info", "success", "warning", "error"],
            ),
            PropertySchema::new("dismissible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("dismissed", PropertyValueKind::Bool, true, false),
            PropertySchema::new("action_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        // `Pagination` holds no content, only the index into somebody else's data:
        // every number that defines that index is writable, and the two derived from
        // it are read-only.
        #[cfg(not(alloc_frugal))]
        pub(crate) const PAGINATION_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("total", PropertyValueKind::UInt, true, true),
            PropertySchema::new("page_size", PropertyValueKind::UInt, true, true),
            PropertySchema::new("page", PropertyValueKind::UInt, true, true),
            PropertySchema::new("page_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("last_page", PropertyValueKind::UInt, true, false),
            PropertySchema::new("sibling_count", PropertyValueKind::UInt, true, true),
            PropertySchema::new("show_nav_buttons", PropertyValueKind::Bool, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("wheel_paging_enabled", PropertyValueKind::Bool, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const NUMBER_PICKER_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("value", PropertyValueKind::Int, true, true),
            PropertySchema::new("minimum", PropertyValueKind::Int, true, true),
            PropertySchema::new("maximum", PropertyValueKind::Int, true, true),
            PropertySchema::new("step", PropertyValueKind::Int, true, true),
            PropertySchema::new("wrap", PropertyValueKind::Bool, true, true),
            PropertySchema::new("suffix", PropertyValueKind::String, true, true),
            // I-105: the prefix, the displayed decimal count and the special-value text.
            PropertySchema::new("prefix", PropertyValueKind::String, true, true),
            PropertySchema::new("decimals", PropertyValueKind::UInt, true, true),
            PropertySchema::new("special_value_text", PropertyValueKind::String, true, true),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("selected_row", PropertyValueKind::UInt, true, false),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const GRID_TABLE_WIDGET_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
            PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            // `GridTable` selects *cells*, not rows, so its tokens are a different set
            // from the list/table `selection_mode` despite sharing the property name.
            PropertySchema::enumerated(
                "selection_mode",
                true,
                true,
                &["none", "cell", "row", "column"],
            ),
            PropertySchema::new("sort_spec_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("selected_cell", PropertyValueKind::String, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("sorting_enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("sort_role", PropertyValueKind::String, true, true),
            PropertySchema::new("auto_refresh", PropertyValueKind::Bool, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const DATA_GRID_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
            PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            PropertySchema::new("column_width", PropertyValueKind::UInt, true, true),
            PropertySchema::new("frozen_columns", PropertyValueKind::UInt, true, true),
            PropertySchema::new("sort_spec_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("filter_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("sort_specs", PropertyValueKind::String, true, true),
            PropertySchema::new("filters", PropertyValueKind::String, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::enumerated(
                "selection_mode",
                true,
                true,
                &["single", "multi", "extended", "none"],
            ),
            PropertySchema::enumerated(
                "selection_behavior",
                true,
                true,
                &["cells", "rows", "columns"],
            ),
            PropertySchema::new("sort_indicator_visible", PropertyValueKind::Bool, true, true),
            // The grid-family spelling of `column_width_mode`; both name the same field.
            PropertySchema::enumerated(
                "section_resize_mode",
                true,
                true,
                &["fixed", "stretch", "interactive"],
            ),
            PropertySchema::new("current_cell", PropertyValueKind::String, true, false),
            PropertySchema::new("summary_text", PropertyValueKind::String, true, false),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const TREE_TABLE_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("selected_row", PropertyValueKind::UInt, true, true),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            PropertySchema::new("column_width", PropertyValueKind::UInt, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("expands_on_double_click", PropertyValueKind::Bool, true, true),
            PropertySchema::new("middle_click_expands", PropertyValueKind::Bool, true, true),
            PropertySchema::enumerated("sort_role", true, true, &["text", "number"]),
            PropertySchema::new("case_sensitive", PropertyValueKind::Bool, true, true),
            PropertySchema::enumerated("projection_strategy", true, true, &["windowed", "eager"]),
            PropertySchema::new("lazy_loading", PropertyValueKind::Bool, true, true),
            PropertySchema::new("loading_indicator_visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("fetch_timeout_ms", PropertyValueKind::UInt, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const VIRTUAL_TABLE_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
            PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            PropertySchema::new("column_width", PropertyValueKind::UInt, true, true),
            PropertySchema::new("overscan_rows", PropertyValueKind::UInt, true, true),
            PropertySchema::new("overscan_columns", PropertyValueKind::UInt, true, true),
            PropertySchema::new("visible_window", PropertyValueKind::String, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::enumerated("wheel_scroll_mode", true, true, &["per_row", "per_page"]),
            PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const VIRTUAL_LIST_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
            PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
            PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
            PropertySchema::new("overscan", PropertyValueKind::UInt, true, true),
            PropertySchema::new("selected_row", PropertyValueKind::UInt, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("selected_rows", PropertyValueKind::NumberList, true, false),
            PropertySchema::enumerated(
                "selection_mode",
                true,
                true,
                &["single", "multi", "extended", "none"],
            ),
        ];

        pub(crate) const IMAGE_VIEW_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("scaled", PropertyValueKind::Bool, true, true),
            // D-07/D-08: orientation, zoom and pan are part of the published view state.
            PropertySchema::enumerated("rotation", true, true, &["0", "90", "180", "270"]),
            PropertySchema::new("flip_horizontal", PropertyValueKind::Bool, true, true),
            PropertySchema::new("flip_vertical", PropertyValueKind::Bool, true, true),
            PropertySchema::new("zoom_level", PropertyValueKind::Float, true, true),
            PropertySchema::new("pan_offset", PropertyValueKind::String, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const PROPERTIES_PANEL_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("property_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::enumerated(
                "description_mode",
                true,
                true,
                &["tooltip", "status_bar", "hidden"],
            ),
            PropertySchema::enumerated(
                "edit_trigger",
                true,
                true,
                &["single_click", "double_click"],
            ),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const IMAGE_GALLERY_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("current_index", PropertyValueKind::UInt, true, true),
            // The image list is a *property*, not only the `add_image` / `set_images` methods, so a
            // document can spell the gallery. Each row is a record because an image carries its own
            // dimensions and optional label as well as its path.
            PropertySchema::records(
                "images",
                true,
                true,
                &crate::widget::view_widgets::image_gallery::GALLERY_IMAGE_SCHEMA,
            ),
            PropertySchema::new("thumbnail_size", PropertyValueKind::UInt, true, true),
            PropertySchema::new("show_thumbnails", PropertyValueKind::Bool, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("strip_offset", PropertyValueKind::UInt, true, true),
            PropertySchema::new("strip_scroll_enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::enumerated("wheel_mode", true, true, &["strip", "navigate", "zoom"]),
            PropertySchema::new(
                "arrow_key_navigation_enabled",
                PropertyValueKind::Bool,
                true,
                true,
            ),
        ];

        #[cfg(not(alloc_frugal))]
        pub(crate) const PROPERTY_GRID_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("property_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("selected_index", PropertyValueKind::UInt, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        // `Toast` is one transient message. `ToastStack` is the container that
        // queues them, so the properties here describe a single notification rather
        // than a collection: there is no count and no selection.
        #[cfg(not(alloc_frugal))]
        pub(crate) const TOAST_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("message", PropertyValueKind::String, true, true),
            PropertySchema::enumerated(
                "level",
                true,
                true,
                &["info", "success", "warning", "error"],
            ),
            // A ttl here is a *hint for the host*: this control does not schedule
            // its own expiry, so the value is data the host reads, not behaviour it
            // triggers. That is why it is writable but has no `expired` sibling.
            PropertySchema::new("ttl_ms", PropertyValueKind::UInt, true, true),
            PropertySchema::new("dismissible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        // `SplashScreen` is dismissed by the program, not the user, so it publishes
        // no `dismissed` state: `progress` is the only live value, and `Null` is the
        // documented way to return it to indeterminate.
        #[cfg(not(alloc_frugal))]
        pub(crate) const SPLASH_SCREEN_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("title", PropertyValueKind::String, true, true),
            PropertySchema::new("subtitle", PropertyValueKind::String, true, true),
            PropertySchema::new("progress", PropertyValueKind::Float, true, true),
            PropertySchema::new("skippable", PropertyValueKind::Bool, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
        ];

        // `ColorPicker` split out of `ColorDialog` in BLUE16 phase E-6. The property
        // set is identical to the dialog's because it describes the same picker; what
        // differs is the host, so the schemas stay in step deliberately.
        #[cfg(not(alloc_frugal))]
        pub(crate) const COLOR_DIALOG_PROPERTIES: &[PropertySchema] = &[
            PropertySchema::new("current_color", PropertyValueKind::String, true, false),
            // The dialog edits a colour through the same picker surface as `color_picker`, so it
            // publishes the same fields: the hex value and the preset selection are writable,
            // the three display switches are option bits, and the custom-colour count is derived
            // from the palette and therefore read-only.
            PropertySchema::new("hex_rgba", PropertyValueKind::String, true, true),
            PropertySchema::new("preset_index", PropertyValueKind::UInt, true, true),
            PropertySchema::new("show_hex_input", PropertyValueKind::Bool, true, true),
            PropertySchema::new("show_presets", PropertyValueKind::Bool, true, true),
            PropertySchema::new("show_hue_rail", PropertyValueKind::Bool, true, true),
            PropertySchema::new("custom_color_count", PropertyValueKind::UInt, true, false),
            PropertySchema::new("modal", PropertyValueKind::Bool, true, true),
            PropertySchema::new("options_alpha", PropertyValueKind::Bool, true, true),
            PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
            PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
            PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
            PropertySchema::new("geometry", PropertyValueKind::String, false, false),
            PropertySchema::new("show_screen_picker", PropertyValueKind::Bool, true, true),
        ];
    };
}