Class (GI Struct)

Gtk-4.0GtkTreePathDeprecated 4.10

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

since 4.10

Index
$gtype: GType<Gtk.TreePath>
  • Appends a new index to a path.

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

    Parameters

    • Deprecatedindex_: number

      the index

    Returns void

    since 4.10

  • 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.

    Parameters

    Returns number

    the relative positions of a and b

    since 4.10

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

    Returns void

    since 4.10

  • Returns the current depth of path.

    Returns number

    The depth of path

    since 4.10

  • 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.

    Returns number[]

    The current indices

    since 4.10

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

    Returns void

    since 4.10

  • Prepends a new index to a path.

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

    Parameters

    • Deprecatedindex_: number

      the index

    Returns void

    since 4.10

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

    Returns boolean

    true if path has a previous node, and the move was made

    since 4.10

  • 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.

    Returns string

    A newly-allocated string

    since 4.10

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

    Returns boolean

    true if path has a parent, and the move was made

    since 4.10