pub struct ClippedItem { /* private fields */ }Expand description
Wraps a child so its rendered output is clipped to the child’s own layout rect. When the child
collapses to a zero rect (e.g. a section hidden via display:none), the clip is empty, so nothing
inside draws — even a widget left with a stale rect or one that paints at fixed coordinates. Layout
is unchanged: layout_node passes through to the wrapped child.
Implementations§
Source§impl ClippedItem
impl ClippedItem
pub fn new(inner: Box<dyn LayoutItem>) -> Self
Trait Implementations§
Source§impl Component for ClippedItem
impl Component for ClippedItem
fn view(&self) -> RenderNode
fn on_event(&mut self, event: &Event) -> EventResult
Source§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Human-readable widget type name for the devtools tree inspector.
Source§impl LayoutItem for ClippedItem
impl LayoutItem for ClippedItem
fn layout_node(&self) -> NodeId
Auto Trait Implementations§
impl !RefUnwindSafe for ClippedItem
impl !Send for ClippedItem
impl !Sync for ClippedItem
impl !UnwindSafe for ClippedItem
impl Freeze for ClippedItem
impl Unpin for ClippedItem
impl UnsafeUnpin for ClippedItem
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