pub trait AdwDialogExt: IsA<Dialog> + 'static {
Show 35 methods
// Provided methods
fn add_breakpoint(&self, breakpoint: Breakpoint) { ... }
fn close(&self) -> bool { ... }
fn force_close(&self) { ... }
fn can_close(&self) -> bool { ... }
fn child(&self) -> Option<Widget> { ... }
fn content_height(&self) -> i32 { ... }
fn content_width(&self) -> i32 { ... }
fn current_breakpoint(&self) -> Option<Breakpoint> { ... }
fn default_widget(&self) -> Option<Widget> { ... }
fn focus(&self) -> Option<Widget> { ... }
fn follows_content_size(&self) -> bool { ... }
fn presentation_mode(&self) -> DialogPresentationMode { ... }
fn title(&self) -> GString { ... }
fn present(&self, parent: Option<&impl IsA<Widget>>) { ... }
fn set_can_close(&self, can_close: bool) { ... }
fn set_child(&self, child: Option<&impl IsA<Widget>>) { ... }
fn set_content_height(&self, content_height: i32) { ... }
fn set_content_width(&self, content_width: i32) { ... }
fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>) { ... }
fn set_focus(&self, focus: Option<&impl IsA<Widget>>) { ... }
fn set_follows_content_size(&self, follows_content_size: bool) { ... }
fn set_presentation_mode(&self, presentation_mode: DialogPresentationMode) { ... }
fn set_title(&self, title: &str) { ... }
fn connect_close_attempt<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_closed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_can_close_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_content_height_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_content_width_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_current_breakpoint_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_default_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_focus_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_follows_content_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_presentation_mode_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_title_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}v1_5 only.Expand description
Trait containing all Dialog methods.
§Implementors
AboutDialog, AlertDialog, Dialog, PreferencesDialog, ShortcutsDialog
Provided Methods§
Sourcefn add_breakpoint(&self, breakpoint: Breakpoint)
fn add_breakpoint(&self, breakpoint: Breakpoint)
Sourcefn close(&self) -> bool
fn close(&self) -> bool
Attempts to close @self.
If the can-close property is set to FALSE, the
close-attempt signal is emitted.
See also: force_close().
§Returns
whether @self was successfully closed
Sourcefn force_close(&self)
fn force_close(&self)
Sourcefn content_height(&self) -> i32
fn content_height(&self) -> i32
Sourcefn content_width(&self) -> i32
fn content_width(&self) -> i32
Sourcefn current_breakpoint(&self) -> Option<Breakpoint>
fn current_breakpoint(&self) -> Option<Breakpoint>
Sourcefn default_widget(&self) -> Option<Widget>
fn default_widget(&self) -> Option<Widget>
Sourcefn follows_content_size(&self) -> bool
fn follows_content_size(&self) -> bool
Sourcefn presentation_mode(&self) -> DialogPresentationMode
fn presentation_mode(&self) -> DialogPresentationMode
Sourcefn present(&self, parent: Option<&impl IsA<Widget>>)
fn present(&self, parent: Option<&impl IsA<Widget>>)
Presents @self within @parent’s window.
If @self is already shown, raises it to the top instead.
If the window is an Window or ApplicationWindow, the dialog
will be shown within it. Otherwise, it will be a separate window.
§parent
a widget within the toplevel
Sourcefn set_can_close(&self, can_close: bool)
fn set_can_close(&self, can_close: bool)
Sets whether @self can be closed.
If set to FALSE, the close button, shortcuts and
close() will result in close-attempt being
emitted instead, and bottom sheet close swipe will be disabled.
force_close() still works.
§can_close
whether to allow closing
Sourcefn set_content_height(&self, content_height: i32)
fn set_content_height(&self, content_height: i32)
Sets the height of the dialog’s contents.
Set it to -1 to reset it to the content’s natural height.
See also: default-height
§content_height
the content height
Sourcefn set_content_width(&self, content_width: i32)
fn set_content_width(&self, content_width: i32)
Sets the width of the dialog’s contents.
Set it to -1 to reset it to the content’s natural width.
See also: default-width
§content_width
the content width
Sourcefn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>)
fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>)
Sets the default widget for @self.
It’s activated when the user presses Enter.
§default_widget
the default widget
Sourcefn set_focus(&self, focus: Option<&impl IsA<Widget>>)
fn set_focus(&self, focus: Option<&impl IsA<Widget>>)
Sets the focus widget for @self.
If @focus is not the current focus widget, and is focusable, sets it as the focus widget for the dialog.
If focus is NULL, unsets the focus widget for this dialog. To set the focus
to a particular widget in the dialog, it is usually more convenient to use
[WidgetExtManual::grab_focus()][crate::gtk::prelude::WidgetExtManual::grab_focus()] instead of this function.
§focus
the focus widget
Sourcefn set_follows_content_size(&self, follows_content_size: bool)
fn set_follows_content_size(&self, follows_content_size: bool)
Sets whether to size content of @self automatically.
If set to TRUE, always use the content’s natural size instead of
content-width and content-height. If
the content resizes, the dialog will immediately resize as well.
See also: resizable
§follows_content_size
whether to size content automatically
Sourcefn set_presentation_mode(&self, presentation_mode: DialogPresentationMode)
fn set_presentation_mode(&self, presentation_mode: DialogPresentationMode)
Sets presentation mode for @self.
When set to ADW_DIALOG_AUTO, the dialog appears as a bottom sheet when the
following condition is met: max-width: 450px or max-height: 360px, and as a
floating window otherwise.
Set it to ADW_DIALOG_FLOATING or ADW_DIALOG_BOTTOM_SHEET to always
present it a floating window or a bottom sheet respectively, regardless of
available size.
Presentation mode does nothing for dialogs presented as a window.
§presentation_mode
the new presentation mode
Sourcefn connect_close_attempt<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_close_attempt<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Sourcefn connect_closed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_closed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the dialog is successfully closed.
fn connect_can_close_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_content_height_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_content_width_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_current_breakpoint_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_default_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_focus_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_follows_content_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_presentation_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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.