Gtk.TreePath¶
record (struct)
:::warning Deprecated since 4.10 This API is deprecated. :::
An opaque structure representing a path to a row in a model.
Constructors¶
new¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkTreePath
This refers to a row.
new_first¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkTreePath.
The string representation of this path is “0”.
new_from_indicesv¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new path with the given indices array of length.
Parameters:
indices— array of indices
new_from_string¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkTreePath initialized to path.
path is expected to be a colon separated list of numbers.
For example, the string “10:4:0” would create a path of depth
3 pointing to the 11th child of the root node, the 5th
child of that 11th child, and the 1st child of that 5th child.
If an invalid path string is passed in, None is returned.
Parameters:
path— The string representation of a path
Methods¶
append_index¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Appends a new index to a path.
As a result, the depth of the path is increased.
Parameters:
index_— the index
compare¶
:::warning Deprecated since 4.10 This API is deprecated. :::
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:
b— aGtkTreePathto compare with
copy¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkTreePath as a copy of path.
down¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Moves path to point to the first child of the current path.
free¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Frees path. If path is None, it simply returns.
get_depth¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns the current depth of path.
get_indices¶
:::warning Deprecated since 4.10 This API is deprecated. :::
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.
is_ancestor¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns True if descendant is a descendant of path.
Parameters:
descendant— anotherGtkTreePath
is_descendant¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns True if path is a descendant of ancestor.
Parameters:
ancestor— anotherGtkTreePath
next¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Moves the path to point to the next node at the current depth.
prepend_index¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Prepends a new index to a path.
As a result, the depth of the path is increased.
Parameters:
index_— the index
prev¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Moves the path to point to the previous node at the
current depth, if it exists.
to_string¶
:::warning Deprecated since 4.10 This API is deprecated. :::
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, None is returned.
up¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Moves the path to point to its parent node, if it has a parent.