pub trait RootExt:
IsA<Root>
+ Sealed
+ 'static {
// Provided methods
fn display(&self) -> Display { ... }
fn focus(&self) -> Option<Widget> { ... }
fn set_focus(&self, focus: Option<&impl IsA<Widget>>) { ... }
}
Expand description
Trait containing all Root
methods.
§Implementors
AboutDialog
, AppChooserDialog
, ApplicationWindow
, Assistant
, ColorChooserDialog
, Dialog
, DragIcon
, FileChooserDialog
, FontChooserDialog
, MessageDialog
, PageSetupUnixDialog
, PrintUnixDialog
, Root
, ShortcutsWindow
, Window
Provided Methods§
Sourcefn set_focus(&self, focus: Option<&impl IsA<Widget>>)
fn set_focus(&self, focus: Option<&impl IsA<Widget>>)
If @focus is not the current focus widget, and is focusable, sets it as the focus widget for the root.
If @focus is None
, unsets the focus widget for the root.
To set the focus to a particular widget in the root, it is usually
more convenient to use WidgetExt::grab_focus()
instead of
this function.
§focus
widget to be the new focus widget, or None
to unset the focus widget
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.