AlertDialog

open class AlertDialog(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GtkAlertDialog object collects the arguments that are needed to present a message to the user.

The message is shown with the method@Gtk.AlertDialog.choose function.

If you don't need to wait for a button to be clicked, you can use method@Gtk.AlertDialog.show.

Skipped during bindings generation

  • method buttons: Property TypeInfo of getter and setter do not match

  • constructor new: Varargs parameter is not supported

Since

4.10

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open var cancelButton: <Error class: unknown class>

This property determines what happens when the Escape key is pressed while the alert is shown.

Link copied to clipboard
open var defaultButton: <Error class: unknown class>

This property determines what happens when the Return key is pressed while the alert is shown.

Link copied to clipboard
open var detail: String

The detail text for the alert.

Link copied to clipboard
val gtkAlertDialogPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var message: String

The message for the alert.

Link copied to clipboard
open var modal: Boolean

Whether the alert is modal.

Functions

Link copied to clipboard
open fun choose(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function shows the alert to the user.

Link copied to clipboard
open fun chooseFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>>

Finishes the method@Gtk.AlertDialog.choose call and returns the index of the button that was clicked.

Link copied to clipboard
open fun getButtons(): List<String>?

Returns the button labels for the alert.

Link copied to clipboard
open fun setButtons(labels: List<String>)

Sets the button labels for the alert.

Link copied to clipboard
open fun show(parent: Window? = null)

Show the alert to the user.