Sets our main struct and passes it to the parent class.
Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text the user may want to see. When the user clicks a button a "response" signal is emitted with response IDs from GtkResponseType. See GtkDialog for more details.
Returns the message area of the dialog.
Get the main Gtk struct
the main Gtk struct as a void*
Sets the text of the message dialog.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Adds an activatable widget to the action area of a GtkDialog.
Adds a button with the given text.
Returns the content area of @dialog.
Returns the header bar of @dialog.
Gets the response id of a widget in the action area of a dialog.
Gets the widget button that uses the given response ID in the action area of a dialog.
Emits the ::response signal with the given response ID.
Sets the default widget for the dialog based on the response ID.
A convenient way to sensitize/desensitize dialog buttons.
Emitted when the user uses a keybinding to close the dialog.
Emitted when an action widget is clicked.
GtkMessageDialog presents a dialog with some message text.
It’s simply a convenience widget; you could construct the equivalent of GtkMessageDialog from GtkDialog without too much effort, but GtkMessageDialog saves typing.
The easiest way to do a modal message dialog is to use the %GTK_DIALOG_MODAL flag, which will call [method@Gtk.Window.set_modal] internally. The dialog will prevent interaction with the parent window until it's hidden or destroyed. You can use the [signal@Gtk.Dialog::response] signal to know when the user dismissed the dialog.
An example for using a modal dialog:
You might do a non-modal GtkMessageDialog simply by omitting the %GTK_DIALOG_MODAL flag:
GtkMessageDialog as GtkBuildable
The GtkMessageDialog implementation of the GtkBuildable interface exposes the message area as an internal child with the name “message_area”.