Struct druid::HandlerCtx
source · pub struct HandlerCtx<'a> { /* private fields */ }
Expand description
Context given to handlers.
Implementations
sourceimpl<'a> HandlerCtx<'a>
impl<'a> HandlerCtx<'a>
sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Invalidate this widget. Finer-grained invalidation is not yet implemented, but when it is, this method will invalidate the widget’s bounding box.
sourcepub fn request_layout(&mut self)
pub fn request_layout(&mut self)
Request layout; implies invalidation.
sourcepub fn send_event<A: Any>(&mut self, a: A)
pub fn send_event<A: Any>(&mut self, a: A)
Send an event, to be handled by listeners.
sourcepub fn set_active(&mut self, active: bool)
pub fn set_active(&mut self, active: bool)
Set or unset the widget as active.
sourcepub fn is_hot(&self) -> bool
pub fn is_hot(&self) -> bool
Determine whether this widget is hot. A widget can be both hot and active, but if a widget is active, it is the only widget that can be hot.
sourcepub fn request_anim_frame(&mut self)
pub fn request_anim_frame(&mut self)
Request an animation frame.
Calling this schedules an animation frame, and also causes anim_frame
to be
called on this widget at the beginning of that frame.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for HandlerCtx<'a>
impl<'a> !Send for HandlerCtx<'a>
impl<'a> !Sync for HandlerCtx<'a>
impl<'a> Unpin for HandlerCtx<'a>
impl<'a> !UnwindSafe for HandlerCtx<'a>
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