pub struct WidgetInfo {
pub name: String,
pub area: Rect,
pub hit_id: Option<HitId>,
pub hit_regions: Vec<(Rect, HitRegion, HitData)>,
pub render_time_us: Option<u64>,
pub depth: u8,
pub children: Vec<WidgetInfo>,
}Expand description
Information about a widget for inspector display.
Fields§
§name: StringHuman-readable widget name (e.g., “List”, “Button”).
area: RectAllocated render area.
hit_id: Option<HitId>Hit ID if widget is interactive.
hit_regions: Vec<(Rect, HitRegion, HitData)>Registered hit regions within this widget.
render_time_us: Option<u64>Render time in microseconds (if profiling enabled).
depth: u8Nesting depth for color cycling.
children: Vec<WidgetInfo>Child widgets (for tree view).
Implementations§
Source§impl WidgetInfo
impl WidgetInfo
Sourcepub fn with_hit_id(self, id: HitId) -> Self
pub fn with_hit_id(self, id: HitId) -> Self
Set the hit ID.
Sourcepub fn add_hit_region(&mut self, rect: Rect, region: HitRegion, data: HitData)
pub fn add_hit_region(&mut self, rect: Rect, region: HitRegion, data: HitData)
Add a hit region.
Sourcepub fn with_depth(self, depth: u8) -> Self
pub fn with_depth(self, depth: u8) -> Self
Set nesting depth.
Sourcepub fn add_child(&mut self, child: WidgetInfo)
pub fn add_child(&mut self, child: WidgetInfo)
Add a child widget.
Trait Implementations§
Source§impl Clone for WidgetInfo
impl Clone for WidgetInfo
Source§fn clone(&self) -> WidgetInfo
fn clone(&self) -> WidgetInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 WidgetInfo
impl RefUnwindSafe for WidgetInfo
impl Send for WidgetInfo
impl Sync for WidgetInfo
impl Unpin for WidgetInfo
impl UnsafeUnpin for WidgetInfo
impl UnwindSafe for WidgetInfo
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