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

Module Wrappers.Tree_list_row

type t = [ `tree_list_row | `object_ ] Gobject.obj
val set_expanded : t -> bool -> unit

Expands or collapses a row.

If a row is expanded, the model of calling the callback@Gtk.TreeListModelCreateModelFunc for the row's item will be inserted after this row. If a row is collapsed, those items will be removed from the model.

If the row is not expandable, this function does nothing.

val is_expandable : t -> bool

Checks if a row can be expanded.

This does not mean that the row is actually expanded, this can be checked with method@Gtk.TreeListRow.get_expanded.

If a row is expandable never changes until the row is removed from its model at which point it will forever return %FALSE.

val get_position : t -> int

Returns the position in the `GtkTreeListModel` that @self occupies at the moment.

val get_parent : t -> t option

Gets the row representing the parent for @self.

That is the row that would need to be collapsed to make this row disappear.

If @self is a row corresponding to the root model, %NULL is returned.

The value returned by this function never changes until the row is removed from its model at which point it will forever return %NULL.

val get_item : t -> [ `object_ ] Gobject.obj option

Gets the item corresponding to this row,

val get_expanded : t -> bool

Gets if a row is currently expanded.

val get_depth : t -> int

Gets the depth of this row.

Rows that correspond to items in the root model have a depth of zero, rows corresponding to items of models of direct children of the root model have a depth of 1 and so on.

The depth of a row never changes until the row is removed from its model at which point it will forever return 0.

val get_children : t -> Ocgtk_gio.Gio.Wrappers.List_model.t option

If the row is expanded, gets the model holding the children of @self.

This model is the model created by the callback@Gtk.TreeListModelCreateModelFunc and contains the original items, no matter what value property@Gtk.TreeListModel:passthrough is set to.

val get_child_row : t -> int -> t option

If @self is not expanded or @position is greater than the number of children, %NULL is returned.

val get_expandable : t -> bool

Get property: expandable