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

Module Wrappers.Flow_box

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

Create a new FlowBox

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

Unselects a single child of @box, if the selection mode allows it.

val unselect_all : t -> unit

Unselect all children of @box, if the selection mode allows it.

val set_vadjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj -> unit

Hooks up an adjustment to focus handling in @box.

The adjustment is also used for autoscrolling during rubberband selection. See method@Gtk.ScrolledWindow.get_vadjustment for a typical way of obtaining the adjustment, and method@Gtk.FlowBox.set_hadjustment for setting the horizontal adjustment.

The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.

val set_selection_mode : t -> Gtk_enums.selectionmode -> unit

Sets how selection works in @box.

val set_row_spacing : t -> int -> unit

Sets the vertical space to add between children.

val set_min_children_per_line : t -> int -> unit

Sets the minimum number of children to line up in @box’s orientation before flowing.

val set_max_children_per_line : t -> int -> unit

Sets the maximum number of children to request and allocate space for in @box’s orientation.

Setting the maximum number of children per line limits the overall natural size request to be no more than @n_children children long in the given orientation.

val set_homogeneous : t -> bool -> unit

Sets whether or not all children of @box are given equal space in the box.

val set_hadjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj -> unit

Hooks up an adjustment to focus handling in @box.

The adjustment is also used for autoscrolling during rubberband selection. See method@Gtk.ScrolledWindow.get_hadjustment for a typical way of obtaining the adjustment, and method@Gtk.FlowBox.set_vadjustment for setting the vertical adjustment.

The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the box.

val set_column_spacing : t -> int -> unit

Sets the horizontal space to add between children.

val set_activate_on_single_click : t -> bool -> unit

If @single is %TRUE, children will be activated when you click on them, otherwise you need to double-click.

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

Selects a single child of @box, if the selection mode allows it.

val select_all : t -> unit

Select all children of @box, if the selection mode allows it.

val remove_all : t -> unit

Removes all children from @box.

This function does nothing if @box is backed by a model.

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

Removes a child from @box.

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

Adds @child to the start of @self.

If a sort function is set, the widget will actually be inserted at the calculated position.

See also: method@Gtk.FlowBox.insert.

val invalidate_sort : t -> unit

Updates the sorting for all children.

Call this when the result of the sort function on @box is changed due to an external factor.

val invalidate_filter : t -> unit

Updates the filtering for all children.

Call this function when the result of the filter function on the @box is changed due to an external factor. For instance, this would be used if the filter function just looked for a specific search term, and the entry with the string has changed.

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

Inserts the @widget into @box at @position.

If a sort function is set, the widget will actually be inserted at the calculated position.

If @position is -1, or larger than the total number of children in the @box, then the @widget will be appended to the end.

val get_selection_mode : t -> Gtk_enums.selectionmode

Gets the selection mode of @box.

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

Creates a list of all selected children.

val get_row_spacing : t -> int

Gets the vertical spacing.

val get_min_children_per_line : t -> int

Gets the minimum number of children per line.

val get_max_children_per_line : t -> int

Gets the maximum number of children per line.

val get_homogeneous : t -> bool

Returns whether the box is homogeneous.

val get_column_spacing : t -> int

Gets the horizontal spacing.

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

Gets the child in the (@x, @y) position.

Both @x and @y are assumed to be relative to the origin of @box.

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

Gets the nth child in the @box.

val get_activate_on_single_click : t -> bool

Returns whether children activate on single clicks.

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

Adds @child to the end of @self.

If a sort function is set, the widget will actually be inserted at the calculated position.

See also: method@Gtk.FlowBox.insert.

val get_accept_unpaired_release : t -> bool

Get property: accept-unpaired-release

val set_accept_unpaired_release : t -> bool -> unit

Set property: accept-unpaired-release

val on_activate_cursor_child : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_child_activated : ?after:bool -> t -> callback: (child: [ `flow_box_child | `widget | `initially_unowned | `object_ ] Gobject.obj -> unit) -> Gobject.Signal.handler_id
val on_move_cursor : ?after:bool -> t -> callback: (step:Gtk_enums.movementstep -> count:int -> extend:bool -> modify:bool -> bool) -> Gobject.Signal.handler_id
val on_select_all : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_selected_children_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_toggle_cursor_child : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_unselect_all : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id