package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Dialog/index.html
Module Wrappers.Dialog
type t =
[ `dialog | `window | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Dialog
val set_response_sensitive : t -> int -> bool -> unitA convenient way to sensitize/desensitize dialog buttons.
Calls `gtk_widget_set_sensitive (widget, @setting)` for each widget in the dialog’s action area with the given @response_id.
val set_default_response : t -> int -> unitSets the default widget for the dialog based on the response ID.
Pressing “Enter” normally activates the default widget.
val response : t -> int -> unitEmits the ::response signal with the given response ID.
Used to indicate that the user has responded to the dialog in some way.
val get_widget_for_response :
t ->
int ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the widget button that uses the given response ID in the action area of a dialog.
val get_response_for_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
intGets the response id of a widget in the action area of a dialog.
val get_header_bar :
t ->
[ `header_bar | `widget | `initially_unowned | `object_ ] Gobject.objReturns the header bar of @dialog.
Note that the headerbar is only used by the dialog if the property@Gtk.Dialog:use-header-bar property is %TRUE.
val get_content_area :
t ->
[ `box | `widget | `initially_unowned | `object_ ] Gobject.objReturns the content area of @dialog.
val add_button :
t ->
string ->
int ->
[ `widget | `initially_unowned | `object_ ] Gobject.objAdds a button with the given text.
GTK arranges things so that clicking the button will emit the signal@Gtk.Dialog::response signal with the given @response_id. The button is appended to the end of the dialog’s action area. The button widget is returned, but usually you don’t need it.
val add_action_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
unitAdds an activatable widget to the action area of a `GtkDialog`.
GTK connects a signal handler that will emit the signal@Gtk.Dialog::response signal on the dialog when the widget is activated. The widget is appended to the end of the dialog’s action area.
If you want to add a non-activatable widget, simply pack it into the @action_area field of the `GtkDialog` struct.
val get_use_header_bar : t -> intGet property: use-header-bar
val on_close :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_response :
?after:bool ->
t ->
callback:(response_id:int -> unit) ->
Gobject.Signal.handler_id