pub struct CommandCtx { /* private fields */ }Expand description
Context supplied to window and application command controllers.
Implementations§
Source§impl CommandCtx
impl CommandCtx
pub const fn window_id(&self) -> Option<WindowId>
pub const fn is_handled(&self) -> bool
pub fn set_handled(&mut self)
pub fn sender(&self) -> &CommandSender
pub fn request(&mut self, request: InvalidationRequest)
pub fn request_with_reason( &mut self, request: InvalidationRequest, reason: impl Into<String>, )
Sourcepub fn request_window(&mut self, kind: InvalidationKind)
pub fn request_window(&mut self, kind: InvalidationKind)
Invalidate this controller’s window, or every window for an application controller, which has no window of its own.
Sourcepub fn request_window_with_reason(
&mut self,
kind: InvalidationKind,
reason: impl Into<String>,
)
pub fn request_window_with_reason( &mut self, kind: InvalidationKind, reason: impl Into<String>, )
Self::request_window, recording reason in the diagnostics.
pub fn request_measure(&mut self)
pub fn request_arrange(&mut self)
pub fn request_paint(&mut self)
pub fn request_semantics(&mut self)
Sourcepub fn request_paint_rect(&mut self, rect: Rect)
pub fn request_paint_rect(&mut self, rect: Rect)
Repaint rect in this controller’s window, or in every window for an
application controller.
Sourcepub fn request_animation_frame(&mut self, widget_id: WidgetId)
pub fn request_animation_frame(&mut self, widget_id: WidgetId)
Ask widget_id for an animation frame. For an application controller,
whichever window shows widget_id gets it.
Auto Trait Implementations§
impl Forget for CommandCtx
impl Freeze for CommandCtx
impl Move for CommandCtx
impl RefUnwindSafe for CommandCtx
impl Send for CommandCtx
impl Sync for CommandCtx
impl Unpin for CommandCtx
impl UnsafeUnpin for CommandCtx
impl UnwindSafe for CommandCtx
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