pub struct WidgetPod { /* private fields */ }Expand description
Standard retained-widget adapter used by the SUI runtime.
WidgetPod gives a Widget stable identity, cached layout state, event
routing participation, and scene/semantics cooperation. It is the default
local retained model, but a widget’s own internals may still use custom
state, virtualization, worker threads, or remote systems before rejoining
SUI through widget contexts and scene output.
Implementations§
Source§impl WidgetPod
impl WidgetPod
pub fn new<W>(widget: W) -> Selfwhere
W: Widget + 'static,
pub const fn id(&self) -> WidgetId
pub const fn bounds(&self) -> Rect
pub const fn measured_size(&self) -> Size
pub fn set_bounds(&mut self, bounds: Rect)
pub fn measure( &mut self, parent_ctx: &mut MeasureCtx, constraints: Constraints, ) -> Size
pub fn arrange(&mut self, parent_ctx: &mut ArrangeCtx, bounds: Rect)
pub fn paint(&self, parent_ctx: &mut PaintCtx)
pub fn semantics(&self, parent_ctx: &mut SemanticsCtx)
Sourcepub fn visit_children(&self, visitor: &mut dyn WidgetPodVisitor)
pub fn visit_children(&self, visitor: &mut dyn WidgetPodVisitor)
Visit this pod’s direct children. Public so container widgets can walk their own subtree (e.g. to derive a focus-within visual by comparing descendant ids against the focused widget id — sui has no focus-within event, and any focus change repaints every window, so polling at paint time stays correct).
Auto Trait Implementations§
impl !RefUnwindSafe for WidgetPod
impl !Send for WidgetPod
impl !Sync for WidgetPod
impl !UnwindSafe for WidgetPod
impl Freeze for WidgetPod
impl Unpin for WidgetPod
impl UnsafeUnpin for WidgetPod
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