#[repr(transparent)]pub struct TreePath { /* private fields */ }
Expand description
An opaque structure representing a path to a row in a model.
Deprecated since 4.10
Implementations§
source§impl TreePath
impl TreePath
sourcepub fn as_ptr(&self) -> *mut GtkTreePath
pub fn as_ptr(&self) -> *mut GtkTreePath
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const *const GtkTreePath
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const GtkTreePath ) -> &'a Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut *mut GtkTreePath
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut *mut GtkTreePath ) -> &'a mut Self
Borrows the underlying C value mutably.
source§impl TreePath
impl TreePath
sourcepub fn new_first() -> TreePath
👎Deprecated: Since 4.10
pub fn new_first() -> TreePath
Creates a new TreePath
.
The string representation of this path is “0”.
Deprecated since 4.10
Returns
A new TreePath
sourcepub fn from_indices(indices: &[i32]) -> TreePath
👎Deprecated: Since 4.10
pub fn from_indices(indices: &[i32]) -> 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
sourcepub fn from_string(path: &str) -> Option<TreePath>
👎Deprecated: Since 4.10
pub fn from_string(path: &str) -> Option<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
sourcepub fn append_index(&mut self, index_: i32)
👎Deprecated: Since 4.10
pub fn append_index(&mut self, index_: i32)
Appends a new index to a path.
As a result, the depth of the path is increased.
Deprecated since 4.10
index_
the index
sourcepub fn down(&mut self)
👎Deprecated: Since 4.10
pub fn down(&mut self)
Moves @self to point to the first child of the current path.
Deprecated since 4.10
sourcepub fn is_ancestor(&self, descendant: &TreePath) -> bool
👎Deprecated: Since 4.10
pub fn is_ancestor(&self, descendant: &TreePath) -> bool
Returns true
if @descendant is a descendant of @self.
Deprecated since 4.10
descendant
another TreePath
Returns
true
if @descendant is contained inside @self
sourcepub fn is_descendant(&self, ancestor: &TreePath) -> bool
👎Deprecated: Since 4.10
pub fn is_descendant(&self, ancestor: &TreePath) -> bool
sourcepub fn next(&mut self)
👎Deprecated: Since 4.10
pub fn next(&mut self)
Moves the @self to point to the next node at the current depth.
Deprecated since 4.10
sourcepub fn prepend_index(&mut self, index_: i32)
👎Deprecated: Since 4.10
pub fn prepend_index(&mut self, index_: i32)
Prepends a new index to a path.
As a result, the depth of the path is increased.
Deprecated since 4.10
index_
the index
sourcepub fn prev(&mut self) -> bool
👎Deprecated: Since 4.10
pub fn prev(&mut self) -> bool
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
sourcepub fn to_str(&self) -> Option<GString>
👎Deprecated: Since 4.10
pub fn to_str(&self) -> Option<GString>
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
source§impl TreePath
impl TreePath
sourcepub fn indices(&self) -> Slice<i32>
👎Deprecated: Since 4.10
pub fn indices(&self) -> Slice<i32>
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§
source§impl HasParamSpec for TreePath
impl HasParamSpec for TreePath
source§impl Ord for TreePath
impl Ord for TreePath
source§impl PartialEq<TreePath> for TreePath
impl PartialEq<TreePath> for TreePath
source§impl PartialOrd<TreePath> for TreePath
impl PartialOrd<TreePath> for TreePath
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for TreePath
impl StaticType for TreePath
source§fn static_type() -> Type
fn static_type() -> Type
Self
.