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.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeInfo
impl RefUnwindSafe for NodeInfo
impl Send for NodeInfo
impl Sync for NodeInfo
impl Unpin for NodeInfo
impl UnsafeUnpin for NodeInfo
impl UnwindSafe for NodeInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.