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

Module Wrappers.Size_group

type t = [ `size_group | `object_ ] Gobject.obj

Create a new SizeGroup

val set_mode : t -> Gtk_enums.sizegroupmode -> unit

Sets the `GtkSizeGroupMode` of the size group.

The mode of the size group determines whether the widgets in the size group should all have the same horizontal requisition (%GTK_SIZE_GROUP_HORIZONTAL) all have the same vertical requisition (%GTK_SIZE_GROUP_VERTICAL), or should all have the same requisition in both directions (%GTK_SIZE_GROUP_BOTH).

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

Removes a widget from a `GtkSizeGroup`.

val get_widgets : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj list

Returns the list of widgets associated with @size_group.

val get_mode : t -> Gtk_enums.sizegroupmode

Gets the current mode of the size group.

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

Adds a widget to a `GtkSizeGroup`.

In the future, the requisition of the widget will be determined as the maximum of its requisition and the requisition of the other widgets in the size group. Whether this applies horizontally, vertically, or in both directions depends on the mode of the size group. See method@Gtk.SizeGroup.set_mode.

When the widget is destroyed or no longer referenced elsewhere, it will be removed from the size group.