Skip to content

struct

ItemMeta

pub struct ItemMeta {
    pub child_index: usize,
    pub path: Vec<usize>,
    pub label: Option<String>,
    pub events: Vec<EventHandler>,
}

Per-item metadata kept alongside shapes/objects (same order).

Fields

child_index

pub child_index: usize

Index of the item's element within the surface's children (for nested 3D groups, the top-level group's index).

path

pub path: Vec<usize>

Path from the surface to the item's element ([child_index] unless it sits inside groups).

label

pub label: Option<String>

The item's accessible label (label or aria-label).

events

pub events: Vec<EventHandler>

The item's event handlers.

Methods

new

pub fn new(child_index: usize) -> ItemMeta

Metadata for the scene item made from child child_index of its surface, with no label, events or bounds yet.

interactive

pub fn interactive(&self) -> bool

Whether the item responds to clicks (and so should be focusable).

Trait implementations