pub struct NodeInfo {Show 34 fields
pub key: Key,
pub parent: Option<Key>,
pub depth: u16,
pub kind: NodeKind,
pub label: Option<String>,
pub rect: Rect,
pub dir: Dir,
pub width: Sizing,
pub height: Sizing,
pub bg: Color,
pub float: bool,
pub role: Option<Role>,
pub text: Option<String>,
pub flags: Vec<&'static str>,
pub layer: u16,
pub origin: OriginId,
pub children: u32,
pub padding: Edges,
pub gap: f32,
pub main_align: Align,
pub cross_align: Align,
pub wrap: bool,
pub table: bool,
pub min_w: Option<f32>,
pub min_h: Option<f32>,
pub max_w: Option<f32>,
pub max_h: Option<f32>,
pub radius: [f32; 4],
pub border_w: f32,
pub border_color: Color,
pub opacity: f32,
pub backdrop_blur: f32,
pub scroll: Option<Vec2>,
pub events: Vec<(&'static str, Value)>,
}Expand description
One node of the last finished frame.
Fields§
§key: Key§parent: Option<Key>§depth: u16Nesting depth; the root is 0.
kind: NodeKind§label: Option<String>The label it was opened under, when it was opened by one.
rect: RectWhere layout put it, logical px — the host’s viewport through
Core::nodes, the window’s in the snapshot the panel reads.
dir: Dir§width: Sizing§height: Sizing§bg: Color§float: bool§role: Option<Role>The role the access tree reads for it — declared, or derived from what it is and does (a box with a click is a button). Plain structure has none.
text: Option<String>A text node’s content, cut to a line’s worth.
flags: Vec<&'static str>The declarations that make it interactive or special, by name:
click, drag, key, hover, hoverable, context-menu,
modal, selectable, focusable, disabled, scroll, clip,
transition.
layer: u16The paint layer it is in: 0 in flow, else the rank of its float layer from the bottom, 1 being the first layer over the flow. What decides which of two nodes under one point is on top.
origin: OriginIdWho declared it: the host, an extension, or the devtools.
children: u32How many children it has.
padding: EdgesThe rest of the layout spec, for the inspector.
gap: f32§main_align: Align§cross_align: Align§wrap: bool§table: boolWhether it is a table (LayoutSpec::table): a column whose rows’
cells line up.
min_w: Option<f32>The size floors and ceilings, as layout left them: a floor is the
declared px, or the number a fit floor resolved to in the fit
pass (the pass writes it back into the spec, so a declared "fit"
reads as its measurement here, not as the word); None only for a
fit floor the pass never measured. A ceiling is None when
unbounded.
min_h: Option<f32>§max_w: Option<f32>§max_h: Option<f32>§radius: [f32; 4]The rest of the paint spec.
border_w: f32§border_color: Color§opacity: f32§backdrop_blur: f32Its backdrop_blur radius in logical px, 0 for none (backlog
F129).
scroll: Option<Vec2>A scroller’s offset, None for a node that does not scroll.
events: Vec<(&'static str, Value)>Every handler it declared, with the payload it would post:
click, drag, key (the sink’s tag), hover, context-menu,
force-click, layout, modal.