package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Toggle_button/index.html
Module Wrappers.Toggle_button
type t =
[ `toggle_button | `button | `widget | `initially_unowned | `object_ ]
Gobject.objval new_ : unit -> tCreate a new ToggleButton
val new_with_label : string -> tCreate a new ToggleButton
val new_with_mnemonic : string -> tCreate a new ToggleButton
val toggled : t -> unitEmits the ::toggled signal on the `GtkToggleButton`.
Adds @self to the group of @group.
In a group of multiple toggle buttons, only one button can be active at a time.
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_active : t -> bool -> unitSets the status of the toggle button.
Set to %TRUE if you want the `GtkToggleButton` to be “pressed in”, and %FALSE to raise it.
If the status of the button changes, this action causes the signal@Gtk.ToggleButton::toggled signal to be emitted.
val get_active : t -> boolQueries a `GtkToggleButton` and returns its current state.
Returns %TRUE if the toggle button is pressed in and %FALSE if it is raised.
val on_toggled :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id