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

Module Wrappers.Check_button

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

Create a new CheckButton

val new_with_label : string option -> t

Create a new CheckButton

val new_with_mnemonic : string option -> t

Create a new CheckButton

val set_use_underline : t -> bool -> unit

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

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

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

val set_group : t -> t option -> unit

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

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

Changes the check buttons active state.

val get_use_underline : t -> bool

Returns whether underlines in the label indicate mnemonics.

val get_label : t -> string option

Returns the label of the check button or `NULL` if property@CheckButton:child is set.

val get_inconsistent : t -> bool

Returns whether the check button is in an inconsistent state.

val get_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

Gets the child widget of @button or `NULL` if property@CheckButton:label is set.

val get_active : t -> bool

Returns whether the check button is active.

val on_activate : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_toggled : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id