package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Alert_dialog/index.html

Module Wrappers.Alert_dialog

type t = [ `alert_dialog | `object_ ] Gobject.obj
val show : t -> [ `window | `widget | `initially_unowned | `object_ ] Gobject.obj option -> unit

Show 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 -> unit

Sets whether the alert blocks interaction with the parent window while it is presented.

val set_message : t -> string -> unit

Sets the message that will be shown in the alert.

val set_detail : t -> string -> unit

Sets the detail text that will be shown in the alert.

val set_default_button : t -> int -> unit

Sets 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 -> unit

Sets 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 -> unit

Sets the button labels for the alert.

val get_modal : t -> bool

Returns whether the alert blocks interaction with the parent window while it is presented.

val get_message : t -> string

Returns the message that will be shown in the alert.

val get_detail : t -> string

Returns the detail text that will be shown in the alert.

val get_default_button : t -> int

Returns the index of the default button.

val get_cancel_button : t -> int

Returns the index of the cancel button.

val get_buttons : t -> string array option

Returns the button labels for the alert.

val choose_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> (int, GError.t) result

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