pub trait DialogExt: IsA<Dialog> + 'static {
// Provided methods
fn add_action_widget(
&self,
child: &impl IsA<Widget>,
response_id: ResponseType,
) { ... }
fn add_button(&self, button_text: &str, response_id: ResponseType) -> Widget { ... }
fn content_area(&self) -> Box { ... }
fn header_bar(&self) -> HeaderBar { ... }
fn widget_for_response(&self, response_id: ResponseType) -> Option<Widget> { ... }
fn response(&self, response_id: ResponseType) { ... }
fn set_default_response(&self, response_id: ResponseType) { ... }
fn set_response_sensitive(&self, response_id: ResponseType, setting: bool) { ... }
fn use_header_bar(&self) -> i32 { ... }
fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn emit_close(&self) { ... }
fn connect_response<F: Fn(&Self, ResponseType) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Since 4.10
Expand description
Trait containing all Dialog methods.
§Implementors
AppChooserDialog, ColorChooserDialog, Dialog, FileChooserDialog, FontChooserDialog, MessageDialog, PageSetupUnixDialog, PrintUnixDialog
Provided Methods§
Sourcefn add_action_widget(&self, child: &impl IsA<Widget>, response_id: ResponseType)
👎Deprecated: Since 4.10
fn add_action_widget(&self, child: &impl IsA<Widget>, response_id: ResponseType)
Since 4.10
👎Deprecated: Since 4.10
Since 4.10
Sourcefn content_area(&self) -> Box
👎Deprecated: Since 4.10
fn content_area(&self) -> Box
Since 4.10
Sourcefn header_bar(&self) -> HeaderBar
👎Deprecated: Since 4.10
fn header_bar(&self) -> HeaderBar
Since 4.10
Returns the header bar of @self.
Note that the headerbar is only used by the dialog if the
use-header-bar property is true.
§Deprecated since 4.10
Use Window instead
§Returns
the header bar
Sourcefn widget_for_response(&self, response_id: ResponseType) -> Option<Widget>
👎Deprecated: Since 4.10
fn widget_for_response(&self, response_id: ResponseType) -> Option<Widget>
Since 4.10
Sourcefn response(&self, response_id: ResponseType)
👎Deprecated: Since 4.10
fn response(&self, response_id: ResponseType)
Since 4.10
Sourcefn set_default_response(&self, response_id: ResponseType)
👎Deprecated: Since 4.10
fn set_default_response(&self, response_id: ResponseType)
Since 4.10
Sourcefn set_response_sensitive(&self, response_id: ResponseType, setting: bool)
👎Deprecated: Since 4.10
fn set_response_sensitive(&self, response_id: ResponseType, setting: bool)
Since 4.10
Sourcefn use_header_bar(&self) -> i32
👎Deprecated: Since 4.10
fn use_header_bar(&self) -> i32
Since 4.10
header, NULL); dialog = g_object_new (GTK_TYPE_DIALOG, header, TRUE, NULL);
# Deprecated since 4.10
Use [`Window`][crate::Window] insteadSourcefn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Since 4.10
Emitted when the user uses a keybinding to close the dialog.
This is a keybinding signal.
The default binding for this signal is the Escape key.
§Deprecated since 4.10
Use Window instead
fn emit_close(&self)
Since 4.10
Sourcefn connect_response<F: Fn(&Self, ResponseType) + 'static>(
&self,
f: F,
) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_response<F: Fn(&Self, ResponseType) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 4.10
Emitted when an action widget is clicked.
The signal is also emitted when the dialog receives a
delete event, and when response() is called.
On a delete event, the response ID is ResponseType::DeleteEvent.
Otherwise, it depends on which action widget was clicked.
§Deprecated since 4.10
Use Window instead
§response_id
the response ID
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".