pub struct EventCtx { /* private fields */ }Implementations§
Source§impl EventCtx
impl EventCtx
pub const fn window_id(&self) -> WindowId
pub const fn widget_id(&self) -> WidgetId
pub const fn bounds(&self) -> Rect
pub const fn dpi(&self) -> DpiInfo
pub const fn current_time(&self) -> f64
pub const fn phase(&self) -> EventPhase
pub const fn focused_widget_id(&self) -> Option<WidgetId>
pub fn is_focused(&self) -> bool
pub const fn is_handled(&self) -> bool
pub fn set_handled(&mut self)
Sourcepub fn clipboard(&self) -> &Clipboard
pub fn clipboard(&self) -> &Clipboard
Shared clipboard service for this window. Backed by the OS clipboard when the platform installed a native backend, otherwise by in-process storage shared across the runtime.
pub fn clipboard_text(&self) -> Option<String>
pub fn set_clipboard_text(&mut self, text: impl AsRef<str>)
Sourcepub fn post_event(&mut self, target: WidgetId, event: Event)
pub fn post_event(&mut self, target: WidgetId, event: Event)
Queue an event for delivery to target after the current dispatch
completes. Used to route commands (for example clipboard actions from
a context menu) to a specific widget outside the normal hit-test or
focus routing.
pub fn request_focus(&mut self)
pub fn clear_focus(&mut self)
pub fn schedule_timer_at(&mut self, deadline: f64) -> TimerToken
pub fn schedule_timer_after(&mut self, delay: f64) -> TimerToken
pub fn cancel_timer(&mut self, token: TimerToken)
pub fn register_async_wakeup(&mut self) -> AsyncWakeToken
pub fn unregister_async_wakeup(&mut self, token: AsyncWakeToken)
pub fn request_animation_frame(&mut self)
pub fn request_pointer_capture(&mut self, pointer_id: u64)
pub fn release_pointer_capture(&mut self, pointer_id: u64)
pub fn begin_drag( &mut self, scope_id: DragScopeId, pointer_id: u64, position: Point, payload: DragPayload, allowed_effect: DropEffect, preview_label: Option<String>, ) -> DragSessionId
pub fn accept_drop(&mut self, effect: DropEffect)
pub fn request(&mut self, request: InvalidationRequest)
pub fn request_measure(&mut self)
pub fn request_arrange(&mut self)
pub fn request_ordering(&mut self)
pub fn request_paint(&mut self)
pub fn request_paint_rect(&mut self, rect: Rect)
pub fn request_transform(&mut self)
pub fn request_effect(&mut self)
pub fn request_visibility(&mut self)
pub fn request_hit_test(&mut self)
pub fn request_text(&mut self)
pub fn request_semantics(&mut self)
pub fn request_resources(&mut self)
pub fn invalidations(&self) -> &[InvalidationRequest]
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EventCtx
impl !Send for EventCtx
impl !Sync for EventCtx
impl !UnwindSafe for EventCtx
impl Freeze for EventCtx
impl Unpin for EventCtx
impl UnsafeUnpin for EventCtx
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