package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
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.objval new_ : unit -> tCreate a new InfoBar
val set_show_close_button : t -> bool -> unitIf true, a standard close button is shown.
When clicked it emits the response %GTK_RESPONSE_CLOSE.
val set_revealed : t -> bool -> unitSets 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 -> unitSets 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 -> unitSets the message type of the message area.
GTK uses this type to determine how the message is displayed.
val set_default_response : t -> int -> unitSets 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 -> unitEmits the “response” signal with the given @response_id.
val remove_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves a widget from the content area of the info bar.
val remove_action_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves 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 -> boolReturns whether the widget will display a standard close button.
val get_revealed : t -> boolReturns whether the info bar is currently revealed.
val get_message_type : t -> Gtk_enums.messagetypeReturns the message type of the message area.
val add_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitAdds a widget to the content area of the info bar.
val add_button :
t ->
string ->
int ->
[ `button | `widget | `initially_unowned | `object_ ] Gobject.objAdds 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 ->
unitAdd 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_idval on_response :
?after:bool ->
t ->
callback:(response_id:int -> unit) ->
Gobject.Signal.handler_id