Struct gtk4::TreePath

source ·
#[repr(transparent)]
pub struct TreePath { /* private fields */ }
Expand description

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

Implementations§

Return the inner pointer to the underlying C value.

Creates a new TreePath This refers to a row.

Deprecated since 4.10
Returns

A newly created TreePath.

Creates a new TreePath.

The string representation of this path is “0”.

Deprecated since 4.10
Returns

A new TreePath

Creates a new path with the given @indices array of @length.

Deprecated since 4.10
indices

array of indices

Returns

A newly created TreePath

Creates a new 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, None is returned.

Deprecated since 4.10
path

The string representation of a path

Returns

A newly-created TreePath

Appends a new index to a path.

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

Deprecated since 4.10
index_

the index

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

Deprecated since 4.10

Returns the current depth of @self.

Deprecated since 4.10
Returns

The depth of @self

Returns true if @descendant is a descendant of @self.

Deprecated since 4.10
descendant

another TreePath

Returns

true if @descendant is contained inside @self

Returns true if @self is a descendant of @ancestor.

Deprecated since 4.10
ancestor

another TreePath

Returns

true if @ancestor contains @self somewhere below it

Moves the @self to point to the next node at the current depth.

Deprecated since 4.10

Prepends a new index to a path.

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

Deprecated since 4.10
index_

the index

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

Deprecated since 4.10
Returns

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

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.

Deprecated since 4.10
Returns

A newly-allocated string

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

Deprecated since 4.10
Returns

true if @self has a parent, and the move was made

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.

Deprecated since 4.10
Returns

The current indices

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Returns the type identifier of Self.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Ensures that the type has been registered with the type system.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.