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

Module Wrappers.Cell_layout

type t = [ `cell_layout ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val reorder : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj -> int -> unit

Re-inserts @cell at @position.

Note that @cell has already to be packed into @cell_layout for this to function properly.

val pack_start : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj -> bool -> unit

Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE, then the @cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which @expand is %TRUE.

Note that reusing the same cell renderer is not supported.

val pack_end : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj -> bool -> unit

Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the @cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which @expand is %TRUE.

Note that reusing the same cell renderer is not supported.

val get_cells : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj list

Returns the cell renderers which have been added to @cell_layout.

val get_area : t -> [ `cell_area | `initially_unowned | `object_ ] Gobject.obj option

Returns the underlying `GtkCellArea` which might be @cell_layout if called on a `GtkCellArea` or might be %NULL if no `GtkCellArea` is used by @cell_layout.

val clear_attributes : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj -> unit

Clears all existing attributes previously set with gtk_cell_layout_set_attributes().

val clear : t -> unit

Unsets all the mappings on all renderers on @cell_layout and removes all renderers from @cell_layout.

val add_attribute : t -> [ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj -> string -> int -> unit

Adds an attribute mapping to the list in @cell_layout.

The @column is the column of the model to get a value from, and the @attribute is the property on @cell to be set from that value. So for example if column 2 of the model contains strings, you could have the “text” attribute of a `GtkCellRendererText` get its values from column 2. In this context "attribute" and "property" are used interchangeably.