gtk.alert_dialog

Module for [AlertDialog] class

Types 3

A gtk.alert_dialog.AlertDialog object collects the arguments that are needed to present a message to the user.

The message is shown with the gtk.alert_dialog.AlertDialog.choose function. This API follows the GIO async pattern, and the result can be obtained by calling gtk.alert_dialog.AlertDialog.chooseFinish.

If you don't need to wait for a button to be clicked, you can use gtk.alert_dialog.AlertDialog.show.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
AlertDialog self() nothrowReturns `this`, for use in `with` statements.
AlertDialogGidBuilder builder() static nothrowGet builder for [gtk.alert_dialog.AlertDialog] Returns: New builder object
int cancelButton() @property nothrowGet `cancelButton` property. Returns: This property determines what happens when the Escape key is pressed while the alert is shown.
void cancelButton(int propval) @property nothrowSet `cancelButton` property. Params: propval = This property determines what happens when the Escape key is pressed while the alert is shown.
int defaultButton() @property nothrowGet `defaultButton` property. Returns: This property determines what happens when the Return key is pressed while the alert is shown.
void defaultButton(int propval) @property nothrowSet `defaultButton` property. Params: propval = This property determines what happens when the Return key is pressed while the alert is shown.
string detail() @property nothrowGet `detail` property. Returns: The detail text for the alert.
void detail(string propval) @property nothrowSet `detail` property. Params: propval = The detail text for the alert.
string message() @property nothrowGet `message` property. Returns: The message for the alert.
void message(string propval) @property nothrowSet `message` property. Params: propval = The message for the alert.
bool modal() @property nothrowGet `modal` property. Returns: Whether the alert is modal.
void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the alert is modal.
void choose(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function shows the alert to the user.
int chooseFinish(gio.async_result.AsyncResult result)Finishes the [gtk.alert_dialog.AlertDialog.choose] call and returns the index of the button that was clicked.
string[] getButtons() nothrowReturns the button labels for the alert. Returns: the button labels
int getCancelButton() nothrowReturns the index of the cancel button. Returns: the index of the cancel button, or -1
int getDefaultButton() nothrowReturns the index of the default button. Returns: the index of the default button, or -1
string getDetail() nothrowReturns the detail text that will be shown in the alert. Returns: the detail text
string getMessage() nothrowReturns the message that will be shown in the alert. Returns: the message
bool getModal() nothrowReturns whether the alert blocks interaction with the parent window while it is presented. Returns: `TRUE` if the alert is modal
void setButtons(string[] labels) nothrowSets the button labels for the alert.
void setCancelButton(int button) nothrowSets the index of the cancel button.
void setDefaultButton(int button) nothrowSets the index of the default button.
void setDetail(string detail) nothrowSets the detail text that will be shown in the alert.
void setMessage(string message) nothrowSets the message that will be shown in the alert.
void setModal(bool modal) nothrowSets whether the alert blocks interaction with the parent window while it is presented.
void show(gtk.window.Window parent = null) nothrowShow the alert to the user.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.alert_dialog.AlertDialog

Methods
T cancelButton(int propval) nothrowSet `cancelButton` property. Params: propval = This property determines what happens when the Escape key is pressed while the alert is shown.
T defaultButton(int propval) nothrowSet `defaultButton` property. Params: propval = This property determines what happens when the Return key is pressed while the alert is shown.
T detail(string propval) nothrowSet `detail` property. Params: propval = The detail text for the alert. Returns: Builder instance for fluent chaining
T message(string propval) nothrowSet `message` property. Params: propval = The message for the alert. Returns: Builder instance for fluent chaining
T modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the alert is modal. Returns: Builder instance for fluent chaining

Fluent builder for gtk.alert_dialog.AlertDialog

Methods
AlertDialog build() nothrowCreate object from builder. Returns: New object