Trait libadwaita::prelude::MessageDialogExt

source ·
pub trait MessageDialogExt: IsA<MessageDialog> + Sealed + 'static {
Show 31 methods // Provided methods fn add_response(&self, id: &str, label: &str) { ... } fn body(&self) -> GString { ... } fn is_body_use_markup(&self) -> bool { ... } fn close_response(&self) -> GString { ... } fn default_response(&self) -> Option<GString> { ... } fn extra_child(&self) -> Option<Widget> { ... } fn heading(&self) -> Option<GString> { ... } fn is_heading_use_markup(&self) -> bool { ... } fn response_appearance(&self, response: &str) -> ResponseAppearance { ... } fn is_response_enabled(&self, response: &str) -> bool { ... } fn has_response(&self, response: &str) -> bool { ... } fn remove_response(&self, id: &str) { ... } fn response(&self, response: &str) { ... } fn set_body(&self, body: &str) { ... } fn set_body_use_markup(&self, use_markup: bool) { ... } fn set_close_response(&self, response: &str) { ... } fn set_default_response(&self, response: Option<&str>) { ... } fn set_extra_child(&self, child: Option<&impl IsA<Widget>>) { ... } fn set_heading(&self, heading: Option<&str>) { ... } fn set_heading_use_markup(&self, use_markup: bool) { ... } fn set_response_appearance( &self, response: &str, appearance: ResponseAppearance, ) { ... } fn set_response_enabled(&self, response: &str, enabled: bool) { ... } fn set_response_label(&self, response: &str, label: &str) { ... } fn connect_response<F: Fn(&Self, &str) + 'static>( &self, detail: Option<&str>, f: F, ) -> SignalHandlerId { ... } fn connect_body_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_body_use_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_close_response_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default_response_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_extra_child_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_heading_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_heading_use_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
👎Deprecated: Since 1.6
Available on crate feature v1_2 only.
Expand description

Trait containing all MessageDialog methods.

§Implementors

MessageDialog

Provided Methods§

source

fn add_response(&self, id: &str, label: &str)

👎Deprecated: Since 1.6

Adds a response with @id and @label to @self.

Responses are represented as buttons in the dialog.

Response ID must be unique. It will be used in response to tell which response had been activated, as well as to inspect and modify the response later.

An embedded underline in @label indicates a mnemonic.

set_response_label() can be used to change the response label after it had been added.

set_response_enabled() and set_response_appearance() can be used to customize the responses further.

§Deprecated since 1.6

Use AlertDialog.

§id

the response ID

§label

the response label

source

fn body(&self) -> GString

👎Deprecated: Since 1.6

Gets the body text of @self.

§Deprecated since 1.6

Use AlertDialog.

§Returns

the body of @self.

source

fn is_body_use_markup(&self) -> bool

👎Deprecated: Since 1.6

Gets whether the body text of @self includes Pango markup.

§Deprecated since 1.6

Use AlertDialog.

§Returns

whether @self uses markup for body text

source

fn close_response(&self) -> GString

👎Deprecated: Since 1.6

Gets the ID of the close response of @self.

§Deprecated since 1.6

Use AlertDialog.

§Returns

the close response ID

source

fn default_response(&self) -> Option<GString>

👎Deprecated: Since 1.6

Gets the ID of the default response of @self.

§Deprecated since 1.6

Use AlertDialog.

§Returns

the default response ID

source

fn extra_child(&self) -> Option<Widget>

👎Deprecated: Since 1.6

Gets the child widget of @self.

§Deprecated since 1.6

Use AlertDialog.

§Returns

the child widget of @self.

source

fn heading(&self) -> Option<GString>

👎Deprecated: Since 1.6

Gets the heading of @self.

§Deprecated since 1.6

Use AlertDialog.

§Returns

the heading of @self.

source

fn is_heading_use_markup(&self) -> bool

👎Deprecated: Since 1.6

Gets whether the heading of @self includes Pango markup.

§Deprecated since 1.6

Use AlertDialog.

§Returns

whether @self uses markup for heading

source

fn response_appearance(&self, response: &str) -> ResponseAppearance

👎Deprecated: Since 1.6

Gets the appearance of @response.

See set_response_appearance().

§Deprecated since 1.6

Use AlertDialog.

§response

a response ID

§Returns

the appearance of @response

source

fn is_response_enabled(&self, response: &str) -> bool

👎Deprecated: Since 1.6

Gets whether @response is enabled.

See set_response_enabled().

§Deprecated since 1.6

Use AlertDialog.

§response

a response ID

§Returns

whether @response is enabled

source

fn has_response(&self, response: &str) -> bool

👎Deprecated: Since 1.6

Gets whether @self has a response with the ID @response.

§Deprecated since 1.6

Use AlertDialog.

§response

response ID

§Returns

whether @self has a response with the ID @response.

source

fn remove_response(&self, id: &str)

👎Deprecated: Since 1.6
Available on crate feature v1_5 only.

Removes a response from @self.

§Deprecated since 1.6

Use AlertDialog.

§id

the response ID

source

fn response(&self, response: &str)

👎Deprecated: Since 1.6

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 1.6

Use AlertDialog.

§response

response ID

source

fn set_body(&self, body: &str)

👎Deprecated: Since 1.6

Sets the body text of @self.

§Deprecated since 1.6

Use AlertDialog.

§body

the body of @self

source

fn set_body_use_markup(&self, use_markup: bool)

👎Deprecated: Since 1.6

Sets whether the body text of @self includes Pango markup.

See parse_markup().

§Deprecated since 1.6

Use AlertDialog.

§use_markup

whether to use markup for body text

source

fn set_close_response(&self, response: &str)

👎Deprecated: Since 1.6

Sets the ID of the close response of @self.

It will be passed to response if the window is closed by pressing Escape or with a system action.

It doesn’t have to correspond to any of the responses in the dialog.

The default close response is close.

§Deprecated since 1.6

Use AlertDialog.

§response

the close response ID

source

fn set_default_response(&self, response: Option<&str>)

👎Deprecated: Since 1.6

Sets the ID of the default response of @self.

If set, pressing Enter will activate the corresponding button.

If set to NULL or to a non-existent response ID, pressing Enter will do nothing.

§Deprecated since 1.6

Use AlertDialog.

§response

the default response ID

source

fn set_extra_child(&self, child: Option<&impl IsA<Widget>>)

👎Deprecated: Since 1.6

Sets the child widget of @self.

The child widget is displayed below the heading and body.

§Deprecated since 1.6

Use AlertDialog.

§child

the child widget

source

fn set_heading(&self, heading: Option<&str>)

👎Deprecated: Since 1.6

Sets the heading of @self.

§Deprecated since 1.6

Use AlertDialog.

§heading

the heading of @self

source

fn set_heading_use_markup(&self, use_markup: bool)

👎Deprecated: Since 1.6

Sets whether the heading of @self includes Pango markup.

See parse_markup().

§Deprecated since 1.6

Use AlertDialog.

§use_markup

whether to use markup for heading

source

fn set_response_appearance( &self, response: &str, appearance: ResponseAppearance, )

👎Deprecated: Since 1.6

Sets the appearance for @response.

message-dialog-appearance

Use ADW_RESPONSE_SUGGESTED to mark important responses such as the affirmative action, like the Save button in the example.

Use ADW_RESPONSE_DESTRUCTIVE to draw attention to the potentially damaging consequences of using @response. This appearance acts as a warning to the user. The Discard button in the example is using this appearance.

The default appearance is ADW_RESPONSE_DEFAULT.

Negative responses like Cancel or Close should use the default appearance.

§Deprecated since 1.6

Use AlertDialog.

§response

a response ID

§appearance

appearance for @response

source

fn set_response_enabled(&self, response: &str, enabled: bool)

👎Deprecated: Since 1.6

Sets whether @response is enabled.

If @response is not enabled, the corresponding button will have sensitive set to FALSE and it can’t be activated as a default response.

@response can still be used as close-response while it’s not enabled.

Responses are enabled by default.

§Deprecated since 1.6

Use AlertDialog.

§response

a response ID

§enabled

whether to enable @response

source

fn set_response_label(&self, response: &str, label: &str)

👎Deprecated: Since 1.6

Sets the label of @response to @label.

Labels are displayed on the dialog buttons. An embedded underline in @label indicates a mnemonic.

§Deprecated since 1.6

Use AlertDialog.

§response

a response ID

§label

the label of @response

source

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

👎Deprecated: Since 1.6

This signal is emitted when the dialog is closed.

@response will be set to the response ID of the button that had been activated.

if the dialog was closed by pressing Escape or with a system action, @response will be set to the value of close-response.

§Deprecated since 1.6

Use AlertDialog.

§response

the response ID

source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6
source

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

👎Deprecated: Since 1.6

Object Safety§

This trait is not object safe.

Implementors§