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/Info_bar/index.html

Module Wrappers.Info_bar

type t = [ `info_bar | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new InfoBar

val set_show_close_button : t -> bool -> unit

If true, a standard close button is shown.

When clicked it emits the response %GTK_RESPONSE_CLOSE.

val set_revealed : t -> bool -> unit

Sets whether the `GtkInfoBar` is revealed.

Changing this will make @info_bar reveal or conceal itself via a sliding transition.

Note: this does not show or hide @info_bar in the property@Gtk.Widget:visible sense, so revealing has no effect if property@Gtk.Widget:visible is %FALSE.

val set_response_sensitive : t -> int -> bool -> unit

Sets the sensitivity of action widgets for @response_id.

Calls `gtk_widget_set_sensitive (widget, setting)` for each widget in the info bars’s action area with the given @response_id. A convenient way to sensitize/desensitize buttons.

val set_message_type : t -> Gtk_enums.messagetype -> unit

Sets the message type of the message area.

GTK uses this type to determine how the message is displayed.

val set_default_response : t -> int -> unit

Sets the last widget in the info bar’s action area with the given response_id as the default widget for the dialog.

Pressing “Enter” normally activates the default widget.

Note that this function currently requires @info_bar to be added to a widget hierarchy.

val response : t -> int -> unit

Emits the “response” signal with the given @response_id.

val remove_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> unit

Removes a widget from the content area of the info bar.

val remove_action_widget : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> unit

Removes a widget from the action area of @info_bar.

The widget must have been put there by a call to method@Gtk.InfoBar.add_action_widget or method@Gtk.InfoBar.add_button.

val get_show_close_button : t -> bool

Returns whether the widget will display a standard close button.

val get_revealed : t -> bool

Returns whether the info bar is currently revealed.

val get_message_type : t -> Gtk_enums.messagetype

Returns the message type of the message area.

val add_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> unit

Adds a widget to the content area of the info bar.

val add_button : t -> string -> int -> [ `button | `widget | `initially_unowned | `object_ ] Gobject.obj

Adds a button with the given text.

Clicking the button will emit the signal@Gtk.InfoBar::response signal with the given response_id. The button is appended to the end of the info bar'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 -> unit

Add an activatable widget to the action area of a `GtkInfoBar`.

This also connects a signal handler that will emit the signal@Gtk.InfoBar::response signal on the message area when the widget is activated. The widget is appended to the end of the message areas action area.

val on_close : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_response : ?after:bool -> t -> callback:(response_id:int -> unit) -> Gobject.Signal.handler_id