Gtk.TreePath¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gtk.TreePath(*args, **kwargs)¶
- classmethod new()[source]¶
- Returns:
A newly created
Gtk.TreePath
-struct.- Return type:
Creates a new
Gtk.TreePath
-struct. This refers to a row.
- classmethod new_first()[source]¶
- Returns:
A new
Gtk.TreePath
-struct- Return type:
Creates a new
Gtk.TreePath
-struct.The string representation of this path is “0”.
- classmethod new_from_indices(indices)[source]¶
- Parameters:
indices ([
int
]) – array of indices- Returns:
A newly created
Gtk.TreePath
-struct- Return type:
Creates a new path with the given indices array of length.
New in version 3.12.
- classmethod new_from_string(path)[source]¶
- Parameters:
path (
str
) – The string representation of a path- Returns:
A newly-created
Gtk.TreePath
-struct, orNone
- Return type:
Creates a new
Gtk.TreePath
-struct 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.
- append_index(index_)[source]¶
- Parameters:
index (
int
) – the index
Appends a new index to a path.
As a result, the depth of the path is increased.
- compare(b)[source]¶
- Parameters:
b (
Gtk.TreePath
) – aGtk.TreePath
-struct to compare with- Returns:
the relative positions of self and b
- Return type:
Compares two paths.
If self appears before b in a tree, then -1 is returned. If b appears before self, then 1 is returned. If the two nodes are equal, then 0 is returned.
- copy()[source]¶
- Returns:
a new
Gtk.TreePath
-struct- Return type:
Creates a new
Gtk.TreePath
-struct as a copy of self.
- get_indices()[source]¶
-
Returns the current indices of self.
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.
New in version 3.0.
- is_ancestor(descendant)[source]¶
- Parameters:
descendant (
Gtk.TreePath
) – anotherGtk.TreePath
-struct- Returns:
True
if descendant is contained inside self- Return type:
Returns
True
if descendant is a descendant of self.
- is_descendant(ancestor)[source]¶
- Parameters:
ancestor (
Gtk.TreePath
) – anotherGtk.TreePath
-struct- Returns:
True
if ancestor contains self somewhere below it- Return type:
Returns
True
if self is a descendant of ancestor.
- prepend_index(index_)[source]¶
- Parameters:
index (
int
) – the index
Prepends a new index to a path.
As a result, the depth of the path is increased.