pub trait TreeModelExt: IsA<TreeModel> + 'static {
Show 22 methods
// Provided methods
fn foreach<P: FnMut(&TreeModel, &TreePath, &TreeIter) -> bool>(
&self,
func: P,
) { ... }
fn column_type(&self, index_: i32) -> Type { ... }
fn flags(&self) -> TreeModelFlags { ... }
fn iter(&self, path: &TreePath) -> Option<TreeIter> { ... }
fn iter_first(&self) -> Option<TreeIter> { ... }
fn iter_from_string(&self, path_string: &str) -> Option<TreeIter> { ... }
fn n_columns(&self) -> i32 { ... }
fn path(&self, iter: &TreeIter) -> TreePath { ... }
fn string_from_iter(&self, iter: &TreeIter) -> Option<GString> { ... }
fn iter_children(&self, parent: Option<&TreeIter>) -> Option<TreeIter> { ... }
fn iter_has_child(&self, iter: &TreeIter) -> bool { ... }
fn iter_n_children(&self, iter: Option<&TreeIter>) -> i32 { ... }
fn iter_nth_child(
&self,
parent: Option<&TreeIter>,
n: i32,
) -> Option<TreeIter> { ... }
fn iter_parent(&self, child: &TreeIter) -> Option<TreeIter> { ... }
fn row_changed(&self, path: &TreePath, iter: &TreeIter) { ... }
fn row_deleted(&self, path: &TreePath) { ... }
fn row_has_child_toggled(&self, path: &TreePath, iter: &TreeIter) { ... }
fn row_inserted(&self, path: &TreePath, iter: &TreeIter) { ... }
fn connect_row_changed<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_row_deleted<F: Fn(&Self, &TreePath) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_row_has_child_toggled<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_row_inserted<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Since 4.10
Expand description
Trait containing all TreeModel methods.
§Implementors
ListStore, TreeModelFilter, TreeModelSort, TreeModel, TreeSortable, TreeStore
Provided Methods§
Sourcefn foreach<P: FnMut(&TreeModel, &TreePath, &TreeIter) -> bool>(&self, func: P)
👎Deprecated: Since 4.10
fn foreach<P: FnMut(&TreeModel, &TreePath, &TreeIter) -> bool>(&self, func: P)
Since 4.10
Sourcefn column_type(&self, index_: i32) -> Type
👎Deprecated: Since 4.10
fn column_type(&self, index_: i32) -> Type
Since 4.10
Sourcefn flags(&self) -> TreeModelFlags
👎Deprecated: Since 4.10
fn flags(&self) -> TreeModelFlags
Since 4.10
Sourcefn iter_first(&self) -> Option<TreeIter>
👎Deprecated: Since 4.10
fn iter_first(&self) -> Option<TreeIter>
Since 4.10
Sourcefn iter_from_string(&self, path_string: &str) -> Option<TreeIter>
👎Deprecated: Since 4.10
fn iter_from_string(&self, path_string: &str) -> Option<TreeIter>
Since 4.10
Sourcefn string_from_iter(&self, iter: &TreeIter) -> Option<GString>
👎Deprecated: Since 4.10
fn string_from_iter(&self, iter: &TreeIter) -> Option<GString>
Since 4.10
Sourcefn iter_children(&self, parent: Option<&TreeIter>) -> Option<TreeIter>
👎Deprecated: Since 4.10
fn iter_children(&self, parent: Option<&TreeIter>) -> Option<TreeIter>
Since 4.10
Sets @iter to point to the first child of @parent.
If @parent has no children, false is returned and @iter is
set to be invalid. @parent will remain a valid node after this
function has been called.
If @parent is None returns the first node, equivalent to
gtk_tree_model_get_iter_first (tree_model, iter);
§Deprecated since 4.10
§parent
the TreeIter
§Returns
true, if @iter has been set to the first child
§iter
the new TreeIter to be set to the child
Sourcefn iter_has_child(&self, iter: &TreeIter) -> bool
👎Deprecated: Since 4.10
fn iter_has_child(&self, iter: &TreeIter) -> bool
Since 4.10
Sourcefn iter_n_children(&self, iter: Option<&TreeIter>) -> i32
👎Deprecated: Since 4.10
fn iter_n_children(&self, iter: Option<&TreeIter>) -> i32
Since 4.10
Sourcefn iter_nth_child(&self, parent: Option<&TreeIter>, n: i32) -> Option<TreeIter>
👎Deprecated: Since 4.10
fn iter_nth_child(&self, parent: Option<&TreeIter>, n: i32) -> Option<TreeIter>
Since 4.10
Sets @iter to be the child of @parent, using the given index.
The first index is 0. If @n is too big, or @parent has no children,
@iter is set to an invalid iterator and false is returned. @parent
will remain a valid node after this function has been called. As a
special case, if @parent is None, then the @n-th root node
is set.
§Deprecated since 4.10
§parent
the TreeIter to get the child from
§n
the index of the desired child
§Returns
true, if @parent has an @n-th child
§iter
the TreeIter to set to the nth child
Sourcefn iter_parent(&self, child: &TreeIter) -> Option<TreeIter>
👎Deprecated: Since 4.10
fn iter_parent(&self, child: &TreeIter) -> Option<TreeIter>
Since 4.10
Sets @iter to be the parent of @child.
If @child is at the toplevel, and doesn’t have a parent, then
@iter is set to an invalid iterator and false is returned.
@child will remain a valid node after this function has been
called.
@iter will be initialized before the lookup is performed, so @child and @iter cannot point to the same memory location.
§Deprecated since 4.10
§child
the TreeIter
§Returns
true, if @iter is set to the parent of @child
§iter
the new TreeIter to set to the parent
Sourcefn row_changed(&self, path: &TreePath, iter: &TreeIter)
👎Deprecated: Since 4.10
fn row_changed(&self, path: &TreePath, iter: &TreeIter)
Since 4.10
Sourcefn row_deleted(&self, path: &TreePath)
👎Deprecated: Since 4.10
fn row_deleted(&self, path: &TreePath)
Since 4.10
Emits the ::row-deleted signal on @self.
See row-deleted.
This should be called by models after a row has been removed. The location pointed to by @path should be the location that the row previously was at. It may not be a valid location anymore.
Nodes that are deleted are not unreffed, this means that any outstanding references on the deleted node should not be released.
§Deprecated since 4.10
§path
a TreePath pointing to the previous location of
the deleted row
Sourcefn row_has_child_toggled(&self, path: &TreePath, iter: &TreeIter)
👎Deprecated: Since 4.10
fn row_has_child_toggled(&self, path: &TreePath, iter: &TreeIter)
Since 4.10
Sourcefn row_inserted(&self, path: &TreePath, iter: &TreeIter)
👎Deprecated: Since 4.10
fn row_inserted(&self, path: &TreePath, iter: &TreeIter)
Since 4.10
Sourcefn connect_row_changed<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_row_changed<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 4.10
Sourcefn connect_row_deleted<F: Fn(&Self, &TreePath) + 'static>(
&self,
f: F,
) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_row_deleted<F: Fn(&Self, &TreePath) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 4.10
This signal is emitted when a row has been deleted.
Note that no iterator is passed to the signal handler, since the row is already deleted.
This should be called by models after a row has been removed. The location pointed to by @path should be the location that the row previously was at. It may not be a valid location anymore.
§path
a TreePath identifying the row
Sourcefn connect_row_has_child_toggled<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_row_has_child_toggled<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 4.10
Sourcefn connect_row_inserted<F: Fn(&Self, &TreePath, &TreeIter) + 'static>(
&self,
f: F,
) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_row_inserted<F: Fn(&Self, &TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 4.10
This signal is emitted when a new row has been inserted in the model.
Note that the row may still be empty at this point, since it is a common pattern to first insert an empty row, and then fill it with the desired values.
§path
a TreePath identifying the new row
§iter
a valid TreeIter pointing to the new row
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".