Gnome::Gtk4::N-TreePath
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Description
An opaque structure representing a path to a row in a model.
=end rakudoc
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Class initialization
Note: The native version of this class is deprecated in gtk4-lib() since version 4.10
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-treepath
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::N-TreePath This refers to a row.
method new-treepath ( --> Gnome::Gtk4::TreePath )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-first
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::N-TreePath.
The string representation of this path is β0β.
method new-first ( --> Gnome::Gtk4::TreePath )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-from-indices
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new path with $first-index and $varargs as indices.
method new-from-indices ( Int() $first-index, β¦ --> Gnome::Gtk4::TreePath )
$first-index; first integer.
β¦; β¦. Note that each argument must be specified as a type followed by its value!
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-from-indicesv
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new path with the given $indices array of $length.
method new-from-indicesv ( Array[Int] $indices, Int() $length --> Gnome::Gtk4::TreePath )
$indices; array of indices.
$length; length of
$indicesarray.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-from-string
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::N-TreePath 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, undefined is returned.
method new-from-string ( Str $path --> Gnome::Gtk4::TreePath )
$path; The string representation of a path.
=end rakudoc
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Methods =end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
append-index
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Appends a new index to a path.
As a result, the depth of the path is increased.
method append-index ( Int() $index )
$index; the index.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
compare
Note: The native version of this routine is deprecated in gtk4-lib() since version 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.
method compare ( N-Object $b --> Int )
$b; a Gnome::Gtk4::N-TreePath to compare with
Return value; the relative positions of $a and $b.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
copy
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::N-TreePath as a copy of $path.
method copy (--> N-Object )
Return value; a new Gnome::Gtk4::N-TreePath.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
down
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves $path to point to the first child of the current path.
method down ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
free
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Frees $path. If $path is undefined, it simply returns.
method free ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-depth
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the current depth of $path.
method get-depth (--> Int )
Return value; The depth of $path.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-indices
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the current indices of $path.
This is an array of integers, each representing a node in a tree. This value should not be freed.
The length of the array can be obtained with .get-depth().
method get-indices (--> Array[Int] )
Return value; The current indices.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-indices-with-depth
Note: The native version of this routine is deprecated in gtk4-lib() since version 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.
method get-indices-with-depth ( Array[Int] $depth --> Array[Int] )
$depth; (transfer ownership: full) return location for number of elements returned in the integer array.
Return value; The current indices.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
is-ancestor
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns True if $descendant is a descendant of $path.
method is-ancestor ( N-Object $descendant --> Bool )
$descendant; another Gnome::Gtk4::N-TreePath
Return value; True if $descendant is contained inside $path.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
is-descendant
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns True if $path is a descendant of $ancestor.
method is-descendant ( N-Object $ancestor --> Bool )
$ancestor; another Gnome::Gtk4::N-TreePath
Return value; True if $ancestor contains $path somewhere below it.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
next
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves the $path to point to the next node at the current depth.
method next ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
prepend-index
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Prepends a new index to a path.
As a result, the depth of the path is increased.
method prepend-index ( Int() $index )
$index; the index.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
prev
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves the $path to point to the previous node at the
current depth, if it exists.
method prev (--> Bool )
Return value; True if $path has a previous node, and
the move was made.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
to-string
Note: The native version of this routine is deprecated in gtk4-lib() since version 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, undefined is returned.
method to-string (--> Str )
Return value; A newly-allocated string.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
up
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves the $path to point to its parent node, if it has a parent.
method up (--> Bool )
Return value; True if $path has a parent, and the move was made.
=end rakudoc