pub struct Padding { /* private fields */ }
Expand description
A padding widget. Is expected to have exactly one child.
Implementations
Trait Implementations
sourceimpl Widget for Padding
impl Widget for Padding
sourcefn layout(
&mut self,
bc: &BoxConstraints,
children: &[Id],
size: Option<(f32, f32)>,
ctx: &mut LayoutCtx
) -> LayoutResult
fn layout(
&mut self,
bc: &BoxConstraints,
children: &[Id],
size: Option<(f32, f32)>,
ctx: &mut LayoutCtx
) -> LayoutResult
Participate in the layout protocol. Read more
sourcefn paint(&mut self, paint_ctx: &mut PaintCtx<'_, '_>, geom: &Geometry)
fn paint(&mut self, paint_ctx: &mut PaintCtx<'_, '_>, geom: &Geometry)
Paint the widget’s appearance into the paint context. Read more
sourcefn mouse(&mut self, event: &MouseEvent, ctx: &mut HandlerCtx<'_>) -> bool
fn mouse(&mut self, event: &MouseEvent, ctx: &mut HandlerCtx<'_>) -> bool
Sent to the widget on mouse event. Read more
sourcefn mouse_moved(&mut self, x: f32, y: f32, ctx: &mut HandlerCtx<'_>)
fn mouse_moved(&mut self, x: f32, y: f32, ctx: &mut HandlerCtx<'_>)
Sent to the active or hot widget on mouse move events.
sourcefn on_hot_changed(&mut self, hot: bool, ctx: &mut HandlerCtx<'_>)
fn on_hot_changed(&mut self, hot: bool, ctx: &mut HandlerCtx<'_>)
Sent to the widget when its “hot” status changes.
sourcefn poke(&mut self, payload: &mut dyn Any, ctx: &mut HandlerCtx<'_>) -> bool
fn poke(&mut self, payload: &mut dyn Any, ctx: &mut HandlerCtx<'_>) -> bool
An “escape hatch” of sorts for accessing widget state beyond the widget
methods. Returns true if it is handled. Read more
sourcefn key(&mut self, event: &KeyEvent, ctx: &mut HandlerCtx<'_>) -> bool
fn key(&mut self, event: &KeyEvent, ctx: &mut HandlerCtx<'_>) -> bool
Sent to the widget on key event. Read more
sourcefn anim_frame(&mut self, interval: u64, ctx: &mut HandlerCtx<'_>)
fn anim_frame(&mut self, interval: u64, ctx: &mut HandlerCtx<'_>)
Called at the beginning of a new animation frame. Read more
sourcefn on_child_removed(&mut self, child: Id)
fn on_child_removed(&mut self, child: Id)
Called when a child widget is removed.
Auto Trait Implementations
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more