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

Module Wrappers.Tree_path

type t = [ `tree_path ] Gobject.obj

An opaque structure representing a path to a row in a model.

val new_ : unit -> t

Create a new TreePath

val new_first : unit -> t

Create a new TreePath

val new_from_indicesv : int array -> Gsize.t -> t

Create a new TreePath

val new_from_string : string -> t

Create a new TreePath

val up : t -> bool

Moves the @path to point to its parent node, if it has a parent.

val to_string : t -> string option

Generates a string representation of the path.

This string is a “:” separated list of numbers. For example, “4:10:0:3” would be an acceptable return value for this string. If the path has depth 0, %NULL is returned.

val prev : t -> bool

Moves the @path to point to the previous node at the current depth, if it exists.

val prepend_index : t -> int -> unit

Prepends a new index to a path.

As a result, the depth of the path is increased.

val next : t -> unit

Moves the @path to point to the next node at the current depth.

val is_descendant : t -> t -> bool

Returns %TRUE if @path is a descendant of @ancestor.

val is_ancestor : t -> t -> bool

Returns %TRUE if @descendant is a descendant of @path.

val get_indices_with_depth : t -> int array option * int

Returns the current indices of @path.

This is an array of integers, each representing a node in a tree. It also returns the number of elements in the array. The array should not be freed.

val get_depth : t -> int

Returns the current depth of @path.

val down : t -> unit

Moves @path to point to the first child of the current path.

val compare : t -> t -> int

Compares two paths.

If @a appears before @b in a tree, then -1 is returned. If @b appears before @a, then 1 is returned. If the two nodes are equal, then 0 is returned.

val append_index : t -> int -> unit

Appends a new index to a path.

As a result, the depth of the path is increased.

val get_type : unit -> Gobject.Type.t