package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Check_button/index.html
Module Wrappers.Check_button
type t =
[ `check_button | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new CheckButton
val new_with_label : string option -> tCreate a new CheckButton
val new_with_mnemonic : string option -> tCreate a new CheckButton
val set_use_underline : t -> bool -> unitSets whether underlines in the label indicate mnemonics.
If @setting is %TRUE, an underscore character in @self's label indicates a mnemonic accelerator key. This behavior is similar to property@Gtk.Label:use-underline.
val set_label : t -> string option -> unitSets the text of @self.
If property@Gtk.CheckButton:use-underline is %TRUE, an underscore in @label is interpreted as mnemonic indicator, see method@Gtk.CheckButton.set_use_underline for details on this behavior.
val set_inconsistent : t -> bool -> unitSets the `GtkCheckButton` to inconsistent state.
You should turn off the inconsistent state again if the user checks the check button. This has to be done manually.
Adds @self to the group of @group.
In a group of multiple check buttons, only one button can be active at a time. The behavior of a checkbutton in a group is also commonly known as a *radio button*.
Setting the group of a check button also changes the css name of the indicator widget's CSS node to 'radio'.
Setting up groups in a cycle leads to undefined behavior.
Note that the same effect can be achieved via the iface@Gtk.Actionable API, by using the same action with parameter type and state type 's' for all buttons in the group, and giving each button its own target value.
val set_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the child widget of @button.
Note that by using this API, you take full responsibility for setting up the proper accessibility label and description information for @button. Most likely, you'll either set the accessibility label or description for @button explicitly, or you'll set a labelled-by or described-by relations from @child to @button.
val set_active : t -> bool -> unitChanges the check buttons active state.
val get_use_underline : t -> boolReturns whether underlines in the label indicate mnemonics.
val get_label : t -> string optionReturns the label of the check button or `NULL` if property@CheckButton:child is set.
val get_inconsistent : t -> boolReturns whether the check button is in an inconsistent state.
val get_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child widget of @button or `NULL` if property@CheckButton:label is set.
val get_active : t -> boolReturns whether the check button is active.
val on_activate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_toggled :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id