pub trait WindowExt: Sized {
Show 14 methods
// Required methods
fn open_sheet<F>(&mut self, cx: &mut App, build: F)
where F: Fn(Sheet, &mut Window, &mut App) -> Sheet + 'static;
fn open_sheet_at<F>(&mut self, placement: Placement, cx: &mut App, build: F)
where F: Fn(Sheet, &mut Window, &mut App) -> Sheet + 'static;
fn has_active_sheet(&mut self, cx: &mut App) -> bool;
fn close_sheet(&mut self, cx: &mut App);
fn open_dialog<F>(&mut self, cx: &mut App, build: F)
where F: Fn(Dialog, &mut Window, &mut App) -> Dialog + 'static;
fn has_active_dialog(&mut self, cx: &mut App) -> bool;
fn close_dialog(&mut self, cx: &mut App);
fn close_all_dialogs(&mut self, cx: &mut App);
fn push_notification(&mut self, note: impl Into<Notification>, cx: &mut App);
fn remove_notification<T: Sized + 'static>(&mut self, cx: &mut App);
fn clear_notifications(&mut self, cx: &mut App);
fn notifications(&mut self, cx: &mut App) -> Rc<Vec<Entity<Notification>>>;
fn focused_input(&mut self, cx: &mut App) -> Option<Entity<InputState>>;
fn has_focused_input(&mut self, cx: &mut App) -> bool;
}Expand description
Extension trait for Window to add dialog, sheet .. functionality.
Required Methods§
Sourcefn open_sheet<F>(&mut self, cx: &mut App, build: F)
fn open_sheet<F>(&mut self, cx: &mut App, build: F)
Opens a Sheet at right placement.
Sourcefn open_sheet_at<F>(&mut self, placement: Placement, cx: &mut App, build: F)
fn open_sheet_at<F>(&mut self, placement: Placement, cx: &mut App, build: F)
Opens a Sheet at the given placement.
Sourcefn has_active_sheet(&mut self, cx: &mut App) -> bool
fn has_active_sheet(&mut self, cx: &mut App) -> bool
Return true, if there is an active Sheet.
Sourcefn close_sheet(&mut self, cx: &mut App)
fn close_sheet(&mut self, cx: &mut App)
Closes the active Sheet.
Sourcefn open_dialog<F>(&mut self, cx: &mut App, build: F)
fn open_dialog<F>(&mut self, cx: &mut App, build: F)
Opens a Dialog.
Sourcefn has_active_dialog(&mut self, cx: &mut App) -> bool
fn has_active_dialog(&mut self, cx: &mut App) -> bool
Return true, if there is an active Dialog.
Sourcefn close_dialog(&mut self, cx: &mut App)
fn close_dialog(&mut self, cx: &mut App)
Closes the last active Dialog.
Sourcefn close_all_dialogs(&mut self, cx: &mut App)
fn close_all_dialogs(&mut self, cx: &mut App)
Closes all active Dialogs.
Sourcefn push_notification(&mut self, note: impl Into<Notification>, cx: &mut App)
fn push_notification(&mut self, note: impl Into<Notification>, cx: &mut App)
Pushes a notification to the notification list.
Sourcefn remove_notification<T: Sized + 'static>(&mut self, cx: &mut App)
fn remove_notification<T: Sized + 'static>(&mut self, cx: &mut App)
Removes the notification with the given id.
Sourcefn clear_notifications(&mut self, cx: &mut App)
fn clear_notifications(&mut self, cx: &mut App)
Clears all notifications.
Sourcefn notifications(&mut self, cx: &mut App) -> Rc<Vec<Entity<Notification>>>
fn notifications(&mut self, cx: &mut App) -> Rc<Vec<Entity<Notification>>>
Returns number of notifications.
Sourcefn focused_input(&mut self, cx: &mut App) -> Option<Entity<InputState>>
fn focused_input(&mut self, cx: &mut App) -> Option<Entity<InputState>>
Return current focused Input entity.
Sourcefn has_focused_input(&mut self, cx: &mut App) -> bool
fn has_focused_input(&mut self, cx: &mut App) -> bool
Returns true if there is a focused Input entity.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.