pub trait TreeModelFilterExt: IsA<TreeModelFilter> + 'static {
// Provided methods
fn clear_cache(&self) { ... }
fn convert_child_iter_to_iter(
&self,
child_iter: &TreeIter,
) -> Option<TreeIter> { ... }
fn convert_child_path_to_path(
&self,
child_path: &TreePath,
) -> Option<TreePath> { ... }
fn convert_iter_to_child_iter(&self, filter_iter: &TreeIter) -> TreeIter { ... }
fn convert_path_to_child_path(
&self,
filter_path: &TreePath,
) -> Option<TreePath> { ... }
fn model(&self) -> Option<TreeModel> { ... }
fn refilter(&self) { ... }
fn set_visible_column(&self, column: i32) { ... }
fn set_visible_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
&self,
func: P,
) { ... }
fn child_model(&self) -> Option<TreeModel> { ... }
}Expand description
Provided Methods§
Sourcefn clear_cache(&self)
fn clear_cache(&self)
This function should almost never be called. It clears the self
of any cached iterators that haven’t been reffed with
gtk_tree_model_ref_node(). This might be useful if the child model
being filtered is static (and doesn’t change often) and there has been
a lot of unreffed access to nodes. As a side effect of this function,
all unreffed iters will be invalid.
Sourcefn convert_child_iter_to_iter(&self, child_iter: &TreeIter) -> Option<TreeIter>
fn convert_child_iter_to_iter(&self, child_iter: &TreeIter) -> Option<TreeIter>
Sets filter_iter to point to the row in self that corresponds to the
row pointed at by child_iter. If filter_iter was not set, false is
returned.
§child_iter
A valid TreeIter pointing to a row on the child model.
§Returns
true, if filter_iter was set, i.e. if child_iter is a
valid iterator pointing to a visible row in child model.
§filter_iter
An uninitialized TreeIter.
Sourcefn convert_child_path_to_path(&self, child_path: &TreePath) -> Option<TreePath>
fn convert_child_path_to_path(&self, child_path: &TreePath) -> Option<TreePath>
Converts child_path to a path relative to self. That is, child_path
points to a path in the child model. The rerturned path will point to the
same row in the filtered model. If child_path isn’t a valid path on the
child model or points to a row which is not visible in self, then None
is returned.
§child_path
A TreePath to convert.
§Returns
Sourcefn convert_iter_to_child_iter(&self, filter_iter: &TreeIter) -> TreeIter
fn convert_iter_to_child_iter(&self, filter_iter: &TreeIter) -> TreeIter
Sourcefn convert_path_to_child_path(&self, filter_path: &TreePath) -> Option<TreePath>
fn convert_path_to_child_path(&self, filter_path: &TreePath) -> Option<TreePath>
Converts filter_path to a path on the child model of self. That is,
filter_path points to a location in self. The returned path will
point to the same location in the model not being filtered. If filter_path
does not point to a location in the child model, None is returned.
§filter_path
A TreePath to convert.
§Returns
Sourcefn refilter(&self)
fn refilter(&self)
Emits ::row_changed for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not.
Sourcefn set_visible_column(&self, column: i32)
fn set_visible_column(&self, column: i32)
Sets column of the child_model to be the column where self should
look for visibility information. columns should be a column of type
G_TYPE_BOOLEAN, where true means that a row is visible, and false
if not.
Note that set_visible_func() or
set_visible_column() can only be called
once for a given filter model.
§column
A gint which is the column containing the visible information
Sourcefn set_visible_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
&self,
func: P,
)
fn set_visible_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>( &self, func: P, )
strcmp (str, “HI”) == 0) visible = TRUE; g_free (str);
return visible; } ]|
Note that set_visible_func() or
set_visible_column() can only be called
once for a given filter model.
§func
A GtkTreeModelFilterVisibleFunc, the visible function
fn child_model(&self) -> Option<TreeModel>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".