Skip to main content

DialogExt

Trait DialogExt 

Source
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 { ... }
}
👎Deprecated:

Since 4.10

Expand description

Provided Methods§

Source

fn add_action_widget(&self, child: &impl IsA<Widget>, response_id: ResponseType)

👎Deprecated:

Since 4.10

s action area.

If you want to add a non-activatable widget, simply pack it into the @action_area field of the Dialog struct.

§Deprecated since 4.10

Use Window instead

§child

an activatable widget

§response_id

response ID for @child

Source

fn add_button(&self, button_text: &str, response_id: ResponseType) -> Widget

👎Deprecated:

Since 4.10

t need it.

§Deprecated since 4.10

Use Window instead

§button_text

text of button

§response_id

response ID for the button

§Returns

the Button widget that was added

Source

fn content_area(&self) -> Box

👎Deprecated:

Since 4.10

Returns the content area of @self.

§Deprecated since 4.10

Use Window instead

§Returns

the content area Box.

Source

fn header_bar(&self) -> HeaderBar

👎Deprecated:

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

Source

fn widget_for_response(&self, response_id: ResponseType) -> Option<Widget>

👎Deprecated:

Since 4.10

Gets the widget button that uses the given response ID in the action area of a dialog.

§Deprecated since 4.10

Use Window instead

§response_id

the response ID used by the @self widget

§Returns

the @widget button that uses the given @response_id

Source

fn response(&self, response_id: ResponseType)

👎Deprecated:

Since 4.10

Emits the ::response signal with the given response ID.

Used to indicate that the user has responded to the dialog in some way.

§Deprecated since 4.10

Use Window instead

§response_id

response ID

Source

fn set_default_response(&self, response_id: ResponseType)

👎Deprecated:

Since 4.10

normally activates the default widget.

§Deprecated since 4.10

Use Window instead

§response_id

a response ID

Source

fn set_response_sensitive(&self, response_id: ResponseType, setting: bool)

👎Deprecated:

Since 4.10

s action area with the given @response_id.

§Deprecated since 4.10

Use Window instead

§response_id

a response ID

§setting

true for sensitive

Source

fn use_header_bar(&self) -> i32

👎Deprecated:

Since 4.10

header, NULL); dialog = g_object_new (GTK_TYPE_DIALOG, header, TRUE, NULL);



# Deprecated since 4.10

Use [`Window`][crate::Window] instead
Source

fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

👎Deprecated:

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

Source

fn emit_close(&self)

👎Deprecated:

Since 4.10

Source

fn connect_response<F: Fn(&Self, ResponseType) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated:

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".

Implementors§

Source§

impl<O: IsA<Dialog>> DialogExt for O