package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Alert_dialog/index.html
Module Wrappers.Alert_dialog
type t = [ `alert_dialog | `object_ ] Gobject.objval show :
t ->
[ `window | `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitShow the alert to the user.
This function is a simple version of method@Gtk.AlertDialog.choose intended for dialogs with a single button. If you want to cancel the dialog or if the alert has more than one button, you should use that function instead and provide it with a #GCancellable or callback respectively.
val set_modal : t -> bool -> unitSets whether the alert blocks interaction with the parent window while it is presented.
val set_message : t -> string -> unitSets the message that will be shown in the alert.
val set_detail : t -> string -> unitSets the detail text that will be shown in the alert.
val set_default_button : t -> int -> unitSets the index of the default button.
See property@Gtk.AlertDialog:default-button for details of how this value is used.
val set_cancel_button : t -> int -> unitSets the index of the cancel button.
See property@Gtk.AlertDialog:cancel-button for details of how this value is used.
val set_buttons : t -> string array -> unitSets the button labels for the alert.
val get_modal : t -> boolReturns whether the alert blocks interaction with the parent window while it is presented.
val get_message : t -> stringReturns the message that will be shown in the alert.
val get_detail : t -> stringReturns the detail text that will be shown in the alert.
val get_default_button : t -> intReturns the index of the default button.
val get_cancel_button : t -> intReturns the index of the cancel button.
val get_buttons : t -> string array optionReturns the button labels for the alert.
val choose_finish :
t ->
Ocgtk_gio.Gio.Wrappers.Async_result.t ->
(int, GError.t) resultFinishes the method@Gtk.AlertDialog.choose call and returns the index of the button that was clicked.