bevy_pf 0.2.3

A XAML / WPF-like UI framework for Bevy: XAML in macros or files, styling with resources, and the common WPF control set.
Documentation
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
//! ECS components attached to XAML-instantiated entities.

use bevy::platform::collections::HashMap;
use bevy::prelude::*;

/// The XAML type name this entity was created from (`"Button"`, `"Grid"`, ...).
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfElementKind(pub String);

/// The element's `x:Name` / `Name`.
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfName(pub String);

/// The element's `x:Uid` (WPF's localization/stable-identity directive).
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfUid(pub String);

/// The element's `AutomationProperties.AutomationId` (WPF's UI-automation id).
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfAutomationId(pub String);

/// The `Node::display` an element had before `Visibility="Collapsed"` set it
/// to `Display::None`. Restoring visibility puts this value back — guessing
/// `Display::DEFAULT` (Flex) instead silently turned Grid containers (a
/// ScrollViewer, a Grid) into flex rows whose children shrink-wrap.
#[derive(Component, Debug, Clone, Copy, PartialEq, Eq)]
pub struct PfCollapsedDisplay(pub bevy::ui::Display);

/// On the root entity of an instantiated XAML scene: `x:Name` -> entity map.
#[derive(Component, Debug, Default)]
pub struct XamlNames(pub HashMap<String, Entity>);

impl XamlNames {
    /// Find a named element (e.g. to attach an observer to a button).
    pub fn get(&self, name: &str) -> Option<Entity> {
        self.0.get(name).copied()
    }
}

/// Attached-property values that a parent panel consumes
/// (`Grid.Row`, `Canvas.Left`, `DockPanel.Dock`, ...), stored as
/// `"Owner.Prop" -> raw string`.
#[derive(Component, Debug, Default, Clone)]
pub struct PfAttachedProps(pub HashMap<String, String>);

impl PfAttachedProps {
    pub fn get(&self, owner: &str, prop: &str) -> Option<&str> {
        self.0.get(&format!("{owner}.{prop}")).map(|s| s.as_str())
    }

    pub fn parse<T: std::str::FromStr>(&self, owner: &str, prop: &str) -> Option<T> {
        self.get(owner, prop).and_then(|s| s.trim().parse().ok())
    }
}

/// Interaction-state colors for a Button-like control; a system swaps the
/// background/border on `Interaction` changes.
#[derive(Component, Debug, Clone)]
pub struct ButtonVisual {
    pub normal_bg: Color,
    pub hover_bg: Color,
    pub pressed_bg: Color,
    pub normal_border: Color,
    pub hover_border: Color,
    pub pressed_border: Color,
}

impl Default for ButtonVisual {
    fn default() -> Self {
        // Classic Windows 10/11 button palette.
        Self {
            normal_bg: Color::srgb_u8(0xE1, 0xE1, 0xE1),
            hover_bg: Color::srgb_u8(0xE5, 0xF1, 0xFB),
            pressed_bg: Color::srgb_u8(0xCC, 0xE4, 0xF7),
            normal_border: Color::srgb_u8(0xAD, 0xAD, 0xAD),
            hover_border: Color::srgb_u8(0x00, 0x78, 0xD7),
            pressed_border: Color::srgb_u8(0x00, 0x54, 0x99),
        }
    }
}

/// The WPF accent color used by default control chrome.
pub const ACCENT: Color = Color::srgb(0.0, 0.47, 0.84); // #0078D7

/// Colors for the built-in (non-templated) form-control chrome: CheckBox /
/// RadioButton boxes, the Slider track and thumb, the ToggleSwitch track,
/// the ComboBox face, and dropdown popups.
///
/// The default reproduces the classic WPF look. A host with its own design
/// system overrides the resource once (`app.insert_resource`) and every stock
/// control follows — the same pattern as [`crate::PfFocusRingColor`], for the
/// controls whose visuals are spawned in code rather than styled in markup.
#[derive(Resource, Debug, Clone)]
pub struct PfControlTheme {
    /// Checked / active fill: checked box, slider thumb, switch-on track.
    pub accent: Color,
    /// Glyph drawn on top of the accent (check mark, radio dot).
    pub on_accent: Color,
    /// Face of an idle control (unchecked box, combo face).
    pub control_face: Color,
    /// Border of an idle control.
    pub control_border: Color,
    /// Inactive rail fill: slider track, switch-off track.
    pub track: Color,
    /// Dropdown popup surface (ComboBox / menu popups).
    pub popup_face: Color,
    /// Dropdown popup border.
    pub popup_border: Color,
    /// Selected list-item fill.
    pub selection_fill: Color,
    /// Hovered list-item fill.
    pub hover_fill: Color,
    /// Text of GENERATED items (ComboBox dropdown rows, ItemsSource-bound
    /// list rows). These live under the overlay root rather than under the
    /// control, so they cannot inherit the control's `Foreground` the way
    /// authored content does — the theme has to supply it. Must contrast
    /// with `popup_face`.
    pub item_text: Color,
}

impl Default for PfControlTheme {
    fn default() -> Self {
        Self {
            accent: ACCENT,
            on_accent: Color::WHITE,
            control_face: Color::WHITE,
            control_border: Color::srgb_u8(0x70, 0x70, 0x70),
            track: Color::srgb_u8(0xC4, 0xC4, 0xC4),
            popup_face: Color::WHITE,
            popup_border: Color::srgb_u8(0xAD, 0xAD, 0xAD),
            selection_fill: Color::srgb(0.796, 0.909, 0.964), // #CBE8F6
            hover_fill: Color::srgb(0.898, 0.953, 1.0),       // #E5F3FF
            // Correct against the WHITE popup_face above. An app that
            // darkens popup_face MUST darken this too, or its dropdown rows
            // go black-on-black.
            item_text: Color::BLACK,
        }
    }
}

/// Links a CheckBox/RadioButton root to its box and check-glyph entities so
/// visual-state systems can update them when `Checked` changes.
#[derive(Component, Debug, Clone)]
pub struct PfCheckVisual {
    pub box_node: Entity,
    pub glyph: Entity,
    /// CheckBox fills its box with the accent color when checked;
    /// RadioButton keeps a white circle and shows an accent dot.
    pub accent_fills_box: bool,
}

/// Marks a ToggleButton (a Button that latches `Checked`).
#[derive(Component, Debug, Default, Clone)]
pub struct PfToggleButton;

/// WPF `RadioButton.GroupName`. Radios with the same non-empty group name are
/// mutually exclusive; an empty name groups radios sharing the same parent.
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfRadioGroup(pub String);

/// WPF `ProgressBar` state (`Minimum`/`Maximum`/`Value`).
#[derive(Component, Debug, Clone)]
pub struct PfProgress {
    pub min: f32,
    pub max: f32,
    pub value: f32,
    /// WPF `IsIndeterminate`: animated sweep instead of a value fill.
    pub indeterminate: bool,
}

impl PfProgress {
    pub fn fraction(&self) -> f32 {
        if self.max > self.min {
            ((self.value - self.min) / (self.max - self.min)).clamp(0.0, 1.0)
        } else {
            0.0
        }
    }
}

/// WPF `Frame`: a navigable content host with a journal.
#[derive(Component, Debug, Clone)]
pub struct PfFrame {
    /// The entity whose children are the current page.
    pub content: Entity,
    /// Built-in back/forward chrome, when `NavigationUIVisibility` shows it.
    pub chrome: Option<PfFrameChrome>,
    /// Journal: routes behind the current page.
    pub back: Vec<String>,
    /// Journal: routes ahead of the current page (after `go_back`).
    pub forward: Vec<String>,
    /// The route currently shown.
    pub current: Option<String>,
    /// The current page's `Title`, if declared.
    pub current_title: Option<String>,
    /// `Source=` waiting for the page registry (resolved by a startup system).
    pub pending_source: Option<String>,
}

/// The built-in navigation chrome of a [`PfFrame`].
#[derive(Debug, Clone, Copy)]
pub struct PfFrameChrome {
    pub back_button: Entity,
    pub forward_button: Entity,
}

/// Links a ProgressBar root to its fill entity.
#[derive(Component, Debug, Clone)]
pub struct PfProgressVisual {
    pub fill: Entity,
}

/// Links a Slider root to its thumb entity (positioned by a system from
/// `SliderValue`/`SliderRange`).
#[derive(Component, Debug, Clone)]
pub struct PfSliderVisual {
    pub thumb: Entity,
}

/// Marks a ListBox root; tracks the selected item entity.
#[derive(Component, Debug, Default, Clone)]
pub struct PfListBox {
    pub selected: Option<Entity>,
}

/// Marks a selectable item container inside a ListBox.
#[derive(Component, Debug, Default, Clone)]
pub struct PfListBoxItem;

/// WPF `ItemsPanelTemplate`: the items host redirect. Lives on the items
/// control; generated item containers land in `panel` instead of the root.
#[derive(Component, Debug, Clone)]
pub struct PfItemsPanel {
    pub panel: Entity,
}

/// Marks an `ItemsPanel` panel entity, pointing back at the items control
/// that owns it (selection state lives there).
#[derive(Component, Debug, Clone)]
pub struct PfGeneratedItemsHost {
    pub owner: Entity,
}

/// WPF `ScrollBar`: proportional thumb over a track, value carried by
/// bevy's `SliderValue`/`SliderRange` (so Value bindings reuse the slider
/// machinery). `viewport` sizes the thumb like WPF's ViewportSize.
#[derive(Component, Debug, Clone)]
pub struct PfScrollBar {
    pub horizontal: bool,
    /// WPF ViewportSize: thumb length = viewport/(range+viewport) of track.
    pub viewport: f32,
    pub small_change: f32,
    pub track: Entity,
    pub thumb: Entity,
}

/// WPF `RepeatButton`: re-raises Click while held. bevy's natural Click
/// fires on release (covers the tap); a system fires synthetic
/// `Pointer<Click>` events after `delay`, then every `interval`.
#[derive(Component, Debug, Clone)]
pub struct PfRepeatButton {
    /// Milliseconds before the first repeat (WPF default 500).
    pub delay: f32,
    /// Milliseconds between repeats (WPF default ~33, keyboard speed).
    pub interval: f32,
    /// Virtual-clock elapsed ms when the press began; `None` while released.
    /// Elapsed-based (not delta-based) so paused-clock tests can drive it.
    pub pressed_at: Option<f32>,
    /// Repeats fired during this press.
    pub fired: u32,
}

impl Default for PfRepeatButton {
    fn default() -> Self {
        Self {
            delay: 500.0,
            interval: 33.0,
            pressed_at: None,
            fired: 0,
        }
    }
}

/// Links an Expander root to its collapsible content and arrow glyph.
#[derive(Component, Debug, Clone)]
pub struct PfExpander {
    pub content: Entity,
    pub arrow: Entity,
}

/// WPF `FrameworkElement.Tag`: an arbitrary user-data string slot.
#[derive(Component, Debug, Clone, PartialEq, Eq)]
pub struct PfTag(pub String);

/// WPF `Viewbox`: scales its child to fit. The scale is applied post-layout
/// via `UiTransform` by a system (visual-only approximation).
#[derive(Component, Debug, Clone)]
pub struct PfViewbox {
    pub stretch: bevy_pf_xaml::value::Stretch,
}

/// The logical parent of an entity whose *entity-tree* parent differs (popup
/// content lives under the overlay root but inherits DataContext, resources,
/// and fonts from its logical owner, like WPF's logical tree).
#[derive(Component, Debug, Clone, Copy)]
pub struct PfLogicalParent(pub Entity);

/// Style classes: `Classes="h1 accent"`, plus pseudo-classes the
/// runtime maintains. Selector matching reads this, and it is mutable so a
/// class can be added or removed while the app runs.
#[derive(Component, Debug, Clone, Default)]
pub struct PfClasses(pub Vec<String>);

impl PfClasses {
    pub fn has(&self, name: &str) -> bool {
        self.0.iter().any(|c| c == name)
    }
}

/// `SelectedValuePath`: the member of each item that `SelectedValue` binds.
/// Empty means the item itself, which is WPF's default.
#[derive(Component, Debug, Clone)]
pub struct PfSelectedValuePath(pub String);

/// WPF `ComboBox`: dropdown state and links to its generated parts.
#[derive(Component, Debug, Clone)]
pub struct PfComboBox {
    /// The dropdown content root (under the overlay layer).
    pub popup: Entity,
    /// The light-dismiss backdrop.
    pub backdrop: Entity,
    /// The text presenter showing the selection.
    pub text: Entity,
    pub selected: Option<usize>,
    pub open: bool,
}

/// A selectable entry inside a ComboBox dropdown.
#[derive(Component, Debug, Clone)]
pub struct PfComboItem {
    pub combo: Entity,
    pub index: usize,
}

/// WPF `TabControl`: tab strip + one content host per tab.
#[derive(Component, Debug, Clone)]
pub struct PfTabControl {
    pub headers: Vec<Entity>,
    pub contents: Vec<Entity>,
    pub selected: usize,
}

/// A clickable tab header.
#[derive(Component, Debug, Clone)]
pub struct PfTabHeader {
    pub tab_control: Entity,
    pub index: usize,
}

/// WPF `TreeView`: tracks the selected item's header entity.
#[derive(Component, Debug, Default, Clone)]
pub struct PfTreeView {
    pub selected: Option<Entity>,
}

/// A `TreeViewItem`: expander arrow + children container.
#[derive(Component, Debug, Clone)]
pub struct PfTreeItem {
    pub container: Entity,
    pub arrow: Entity,
    pub expanded: bool,
    pub has_children: bool,
}

/// A clickable tree item header row.
#[derive(Component, Debug, Clone)]
pub struct PfTreeHeader {
    pub tree: Entity,
    pub item: Entity,
}

/// A menu popup (top-level dropdown or nested submenu); closing a menu
/// closes every popup with this marker in the same menu tree.
#[derive(Component, Debug, Clone)]
pub struct PfMenuPopup {
    /// The Menu bar (or context-menu owner) this popup belongs to.
    pub menu_root: Entity,
}

/// A menu entry; leaf items close the menu on click, parents toggle their
/// submenu popup.
#[derive(Component, Debug, Clone)]
pub struct PfMenuItem {
    pub menu_root: Entity,
    pub submenu: Option<Entity>,
}

/// A `DataGrid` column definition (v1: text columns).
#[derive(Debug, Clone)]
pub struct PfGridColumn {
    pub header: String,
    pub path: String,
    pub width: bevy_pf_xaml::value::GridLength,
    /// `CellTemplate` (GridViewColumn) — expanded per cell with the row's
    /// scoped DataContext when present; otherwise `path` renders as text.
    pub template: Option<std::sync::Arc<bevy_pf_xaml::XamlNode>>,
}

/// WPF `DataGrid`: column definitions + the rows container (rows are
/// generated from `ItemsSource`).
#[derive(Component, Debug, Clone)]
pub struct PfDataGrid {
    pub columns: Vec<PfGridColumn>,
    pub rows_host: Entity,
}

/// WPF `Hyperlink`: clicking opens `NavigateUri` in the default browser.
#[derive(Component, Debug, Clone)]
pub struct PfHyperlink(pub String);

/// The XAML `<Popup>` placeholder element -> its overlay popup entity.
#[derive(Component, Debug, Clone)]
pub struct PfPopupSource {
    pub popup: Entity,
}

/// WPF `GridSplitter`: drags resize the two neighboring tracks of the
/// parent `Grid`.
#[derive(Component, Debug, Clone)]
pub struct PfGridSplitter {
    /// True = resizes columns (drag x), false = rows (drag y).
    pub columns: bool,
}

/// WPF `Calendar` month view.
#[derive(Component, Debug, Clone)]
pub struct PfCalendar {
    pub year: i32,
    pub month: u32,
    pub selected: Option<(i32, u32, u32)>,
    /// Grid hosting the day buttons (rebuilt on month change).
    pub days_host: Entity,
    /// The "July 2026" title text entity.
    pub title: Entity,
    /// DatePicker that owns this calendar, if any (selection reports back).
    pub owner_picker: Option<Entity>,
}

/// WPF `DatePicker`: display text + calendar dropdown on the popup layer.
#[derive(Component, Debug, Clone)]
pub struct PfDatePicker {
    pub calendar: Entity,
    pub popup: Entity,
    pub display: Entity,
    pub selected: Option<(i32, u32, u32)>,
}

/// Toolkit `ToggleSwitch`: pill track + sliding thumb, latching `Checked`.
#[derive(Component, Debug, Clone)]
pub struct PfToggleSwitch {
    pub track: Entity,
    pub thumb: Entity,
}

/// Toolkit `NumericUpDown` state and its readout entity.
#[derive(Component, Debug, Clone)]
pub struct PfNumericUpDown {
    pub value: f64,
    pub minimum: f64,
    pub maximum: f64,
    pub increment: f64,
    pub text: Entity,
}

/// Toolkit `RatingBar`: clickable pips, `value` of `maximum`.
#[derive(Component, Debug, Clone)]
pub struct PfRatingBar {
    pub value: u32,
    pub maximum: u32,
    pub pips: Vec<Entity>,
}

/// Watermark/placeholder overlay for an empty TextBox.
#[derive(Component, Debug, Clone)]
pub struct PfWatermark {
    pub overlay: Entity,
}

/// Toolkit `BusyIndicator`: dimming overlay shown while `busy`.
#[derive(Component, Debug, Clone)]
pub struct PfBusyIndicator {
    pub overlay: Entity,
    pub busy: bool,
}

/// Toolkit `RangeSlider`: two thumbs selecting an interval.
#[derive(Component, Debug, Clone)]
pub struct PfRangeSlider {
    pub lower: f32,
    pub upper: f32,
    pub minimum: f32,
    pub maximum: f32,
    /// Smallest allowed gap between the two thumbs (WPF `MinRange`). Dragging a
    /// thumb never brings the interval below this, so the two knobs cannot fully
    /// collapse. `0` = they may meet.
    pub min_range: f32,
    pub thumb_lower: Entity,
    pub thumb_upper: Entity,
    pub fill: Entity,
}

/// Toolkit `TimePicker`: a display box with an hour/minute dropdown.
#[derive(Component, Debug, Clone)]
pub struct PfTimePicker {
    pub hour: Option<u32>,
    pub minute: Option<u32>,
    pub display: Entity,
    pub popup: Entity,
}

/// Toolkit `ColorPicker`: a swatch button with a palette dropdown.
#[derive(Component, Debug, Clone)]
pub struct PfColorPicker {
    pub selected: Color,
    pub swatch: Entity,
    pub hex_input: Entity,
    pub popup: Entity,
}

/// Marks the hex `EditableText` inside a [`PfColorPicker`] popup.
#[derive(Component, Debug, Clone)]
pub struct PfColorHexInput {
    pub owner: Entity,
}

/// Toolkit `AutoSuggestBox`: a TextBox with a filtered suggestion dropdown.
#[derive(Component, Debug, Clone)]
pub struct PfAutoSuggestBox {
    pub input: Entity,
    pub popup: Entity,
    pub items: Vec<String>,
}

/// `PasswordBox` state: the real password. The visible `EditableText`
/// only ever shows mask characters; edits are diffed back into `password`
/// (WPF semantics: `Password` is code-readable, never rendered or bound).
#[derive(Component, Debug, Clone)]
pub struct PfPasswordBox {
    pub input: Entity,
    pub password: String,
    pub mask: char,
}

/// Marks the `EditableText` inside a [`PfPasswordBox`].
#[derive(Component, Debug, Clone)]
pub struct PfPasswordInput {
    pub owner: Entity,
}

/// Marks the `EditableText` inside a [`PfAutoSuggestBox`].
#[derive(Component, Debug, Clone)]
pub struct PfAutoSuggestInput {
    pub owner: Entity,
}

/// A templated control's per-expansion namescope: every x:Name inside its
/// expanded template, keyed by name (WPF `GetTemplateChild`). Includes
/// non-PART names (Expander's `HeaderSite` style lookups need that).
/// Upgrade path: seal-time child-index compaction once templates are shared
/// at scale; a string map is semantically equivalent today.
#[derive(Component, Debug, Default)]
pub struct PfTemplateParts(pub HashMap<String, Entity>);

impl PfTemplateParts {
    /// WPF `GetTemplateChild`.
    pub fn get(&self, name: &str) -> Option<Entity> {
        self.0.get(name).copied()
    }
}

/// Stamped on every element spawned inside a `ControlTemplate` expansion:
/// points at the control the template was applied to. (Projected content is
/// NOT stamped — it belongs to the page, not the template.)
#[derive(Component, Debug, Clone, Copy)]
pub struct PfTemplatedParent(pub Entity);

/// A control whose default chrome was replaced by a `ControlTemplate`.
/// Template-consumed properties (Background, BorderBrush/Thickness,
/// Padding, CornerRadius) stop painting the root — in WPF they reach the
/// visuals only through TemplateBinding inside the template.
#[derive(Component, Debug, Clone)]
pub struct PfTemplatedControl {
    /// The expanded template's visual root (despawn handle for template
    /// re-application / theme swaps).
    pub template_root: Entity,
}

/// A `Command=` source: activation invokes the named command against the
/// DataContext (see `bevy_pf::binding::invoke_command`).
#[derive(Component, Debug, Clone)]
pub struct PfCommand {
    pub name: String,
    pub parameter: Option<crate::binding::PfCommandParameter>,
}

/// A checkable `MenuItem` (`IsCheckable="True"`): activation toggles
/// `Checked` and the check glyph.
#[derive(Component, Debug, Clone)]
pub struct PfCheckableMenuItem {
    pub glyph: Entity,
}

/// WinUI-style `NavigationView`: a pane of items driving an embedded frame.
#[derive(Component, Debug, Clone)]
pub struct PfNavigationView {
    pub frame: Entity,
    pub items: Vec<Entity>,
    pub selected: Option<usize>,
}