11.133Class GtkTreePath

This structure refers to a row.

Class GtkTreePath
Methods
append_indexAppends a new index to a path.
compareCompares two paths.
copyCreates a new GtkTreePath as a copy of path.
downMoves path to point to the first child of the current path.
get_depthReturns the current depth of path.
get_indicesReturns the current indices of path.
is_ancestorReturns TRUE if descendant is a descendant of path.
is_descendantReturns TRUE if path is a descendant of ancestor.
new_firstCreates a new GtkTreePath. The string representation of this path is "0"
new_from_stringCreates a new GtkTreePath initialized to path.
nextMoves the path to point to the next node at the current depth.
prepend_indexPrepends a new index to a path.
prevMoves the path to point to the previous node at the current depth, if it exists.
to_stringGenerates a string representation of the path.
upMoves the path to point to its parent node, if it has a parent.

Methods

append_index

Appends a new index to a path.

GtkTreePath.append_index( index )
index The index.

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

compare

Compares two paths.

GtkTreePath.compare( b )
b A GtkTreePath to compare with.
ReturnThe relative positions of a and b

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.

copy

Creates a new GtkTreePath as a copy of path.

GtkTreePath.copy()
ReturnA new GtkTreePath.

down

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

GtkTreePath.down()

get_depth

Returns the current depth of path.

GtkTreePath.get_depth()
ReturnThe depth of path

get_indices

Returns the current indices of path.

GtkTreePath.get_indices()
ReturnAn array of the current indices, or NULL.

This is an array of integers, each representing a node in a tree.

is_ancestor

Returns TRUE if descendant is a descendant of path.

GtkTreePath.is_ancestor( descendant )
descendant another GtkTreePath
ReturnTRUE if descendant is contained inside path

is_descendant

Returns TRUE if path is a descendant of ancestor.

GtkTreePath.is_descendant( ancestor )
ancestor another GtkTreePath
ReturnTRUE if ancestor contains path somewhere below it

new_first

Creates a new GtkTreePath. The string representation of this path is "0"

GtkTreePath.new_first()
Returna GtkTreePath

new_from_string

Creates a new GtkTreePath initialized to path.

GtkTreePath.new_from_string( path )
path The string representation of a path.
ReturnA newly-created GtkTreePath, or NULL

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, NULL is returned.

next

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

GtkTreePath.next()

prepend_index

Prepends a new index to a path.

GtkTreePath.prepend_index( index )
index The index

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

prev

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

GtkTreePath.prev()

to_string

Generates a string representation of the path.

GtkTreePath.to_string()
Returna string

This string is a ':' separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.

up

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

GtkTreePath.up()
ReturnTRUE if path has a parent, and the move was made.
Made with http://www.falconpl.org