pub trait MessageDialogExtManual: Sealed + IsA<MessageDialog> + 'static {
    // Provided methods
    fn response_label(&self, response: &str) -> GString { ... }
    fn add_responses(&self, ids_and_labels: &[(&str, &str)]) { ... }
    fn choose<P: FnOnce(GString) + 'static>(
        self,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P
    ) { ... }
    fn choose_future(self) -> Pin<Box_<dyn Future<Output = GString> + 'static>> { ... }
}
Available on crate feature v1_2 only.

Provided Methods§

source

fn response_label(&self, response: &str) -> GString

Gets the label of @response.

See MessageDialogExt::set_response_label().

§response

a response ID

§Returns

the label of @response

source

fn add_responses(&self, ids_and_labels: &[(&str, &str)])

Adds multiple responses to @self.

This is the same as calling MessageDialogExt::add_response() repeatedly. The variable argument list should be NULL-terminated list of response IDs and labels.

Example:

⚠️ The following code is in c ⚠️

adw_message_dialog_add_responses (dialog,
                                  "cancel",  _("_Cancel"),
                                  "discard", _("_Discard"),
                                  "save",    _("_Save"),
                                  NULL);
§first_id

response id

source

fn choose<P: FnOnce(GString) + 'static>( self, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

Available on crate feature v1_3 only.

This function shows @self to the user.

The @callback will be called when the alert is dismissed. It should call MessageDialog::choose_finish() to obtain the result.

§cancellable

a GCancellable to cancel the operation

§callback

a callback to call when the operation is complete

source

fn choose_future(self) -> Pin<Box_<dyn Future<Output = GString> + 'static>>

Available on crate feature v1_3 only.

Object Safety§

This trait is not object safe.

Implementors§