pub struct WidgetNode {
pub id: WidgetId,
pub parent: Option<WidgetId>,
pub children: Vec<WidgetId>,
pub rect: Rect,
pub z_index: i32,
pub hit_testable: bool,
pub focusable: bool,
pub dirty: bool,
pub clip_rect: Option<Rect>,
pub label: Option<String>,
}Expand description
A single node in a WidgetTree.
Fields§
§id: WidgetIdThis node’s stable identifier.
parent: Option<WidgetId>Parent node, or None for the root.
children: Vec<WidgetId>Child nodes in paint (back-to-front) order.
rect: RectLayout rectangle in the coordinate space of the tree’s root.
z_index: i32Paint order among siblings; higher draws on top.
hit_testable: boolWhether this node participates in hit testing (false = pass-through).
focusable: boolWhether this node can receive keyboard focus.
dirty: boolDirty flag: layout or paint needs recomputation.
clip_rect: Option<Rect>Optional clip rectangle, in the tree’s root coordinate space. When set,
content (and hit testing) is constrained to the intersection of rect
and this clip. None means inherit the parent clip / no clipping.
label: Option<String>Optional debug/role label (used by a11y and diagnostics).
Implementations§
Trait Implementations§
Source§impl Clone for WidgetNode
impl Clone for WidgetNode
Source§fn clone(&self) -> WidgetNode
fn clone(&self) -> WidgetNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WidgetNode
impl RefUnwindSafe for WidgetNode
impl Send for WidgetNode
impl Sync for WidgetNode
impl Unpin for WidgetNode
impl UnsafeUnpin for WidgetNode
impl UnwindSafe for WidgetNode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more