Gtk2::T...elFilter(3)
π Gtk2::TreeModelFilter β the wrapper for GtkTreeModelFilter π
okay so bestie, this is the perl binding for GtkTreeModelFilter, from the Gtk2 module β it's the little icon that sits on top of another model and goes "mmm, no, not you" to some rows and "yes queen, come through" to others π
π HIERARCHY
Glib::Object
+----Gtk2::TreeModelFilter
it's giving nepo baby β Glib::Object is literally its parent π
π¦ INTERFACES
Gtk2::TreeModelGtk2::TreeDragSource
so it's a model and it can be dragged from. versatile. main character energy fr fr β¨
π METHODS
treemodelfilter = Gtk2::TreeModelFilter->new ($child_model, $root=undef)
builds you a fresh filter π and here's what you hand it:
$child_model(Gtk2::TreeModel)$root(Gtk2::TreePath or undef)
$filter->clear_cache
wipes the cache. that's it, that's the whole vibe π§Ή
treeiter = $filter->convert_child_iter_to_iter ($child_iter)
$child_iter(Gtk2::TreeIter)
treepath or undef = $filter->convert_child_path_to_path ($child_path)
$child_path(Gtk2::TreePath)
note the or undef bestie β sometimes there's just nothing to give you π
treeiter = $filter->convert_iter_to_child_iter ($filter_iter)
$filter_iter(Gtk2::TreeIter)
treepath or undef = $path->convert_path_to_child_path ($filter_path)
$filter_path(Gtk2::TreePath)
(yeah, it's called as $path->... up in here β that's exactly how it's written, don't come for me π)
treemodel = $filter->get_model
returns the model. no args. no drama. slay π«Ά
$filter->set_modify_func ($types, $func=undef, $data=undef)
$types(scalar) β type name string for one column, or an arrayref of type names for multiple columns$func(scalar)$data(scalar)
and func gets called like this, okay:
sub myfunc {
my ($filter, $iter, $column_num, $data) = @_;
...
}
and it should return the value from the filtered model at that iter row and column number. that's the assignment, bestie βοΈ
$filter->refilter
re-runs the filter. like refreshing your for you page but for rows π₯
$filter->set_visible_column ($column)
$column(integer)
$filter->set_visible_func ($func, $data=undef)
$func(scalar)$data(scalar)
β¨ PROPERTIES β¨
'child-model'(Gtk2::TreeModel : default undef : readable / writable / construct-only / private / static-nick / static-blurb) β The model for the filtermodel to filter'virtual-root'(Gtk2::TreePath : default undef : readable / writable / construct-only / private / static-nick / static-blurb) β The virtual root (relative to the child model) for this filtermodel
heads up: both of these areconstruct-onlyandprivate, so set them when you build the thing, not after. the door locks behind you πͺπ
π SEE ALSO
Gtk2, Glib::Object
π COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
and that's the whole page bestie π this was user contributed perl documentation, Gtk2::T...elFilter(3), and honestly? the perl version stamped on it is v5.42.0 with a date of 2025-07-25. iconic. no cap. go forth and filter π¦β¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms