1 2@c %start of fragment 3 4@deftp Class <gtk-tree-model-filter> 5Derives from @code{<gtk-tree-model>}, @code{<gtk-tree-drag-source>}, 6@code{<gobject>}. 7 8This class defines the following slots: 9 10@table @code 11@item child-model 12The model for the filtermodel to filter 13 14@item virtual-root 15The virtual root (relative to the child model) for this filtermodel 16 17@end table 18 19@end deftp 20 21@deffn Function gtk-tree-model-filter-new (self@tie{}@code{<gtk-tree-model>}) (root@tie{}@code{<gtk-tree-path>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-model>}) 22@deffnx Method filter-new 23Creates a new @code{<gtk-tree-model>}, with @var{child-model} as the child_model 24and @var{root} as the virtual root. 25 26@table @var 27@item child-model 28A @code{<gtk-tree-model>}. 29 30@item root 31A @code{<gtk-tree-path>} or @samp{@code{#f}}. 32 33@item ret 34A new @code{<gtk-tree-model>}. 35 36@end table 37 38Since 2.4 39 40@end deffn 41 42@deffn Function gtk-tree-model-filter-get-model (self@tie{}@code{<gtk-tree-model-filter>}) @result{}@tie{} (ret@tie{}@code{<gtk-tree-model>}) 43@deffnx Method get-model 44Returns a pointer to the child model of @var{filter}. 45 46@table @var 47@item filter 48A @code{<gtk-tree-model-filter>}. 49 50@item ret 51A pointer to a @code{<gtk-tree-model>}. 52 53@end table 54 55Since 2.4 56 57@end deffn 58 59@deffn Function gtk-tree-model-filter-refilter (self@tie{}@code{<gtk-tree-model-filter>}) 60@deffnx Method refilter 61Emits ::row_changed for each row in the child model, which causes the filter to 62re-evaluate whether a row is visible or not. 63 64@table @var 65@item filter 66A @code{<gtk-tree-model-filter>}. 67 68@end table 69 70Since 2.4 71 72@end deffn 73 74@deffn Function gtk-tree-model-filter-clear-cache (self@tie{}@code{<gtk-tree-model-filter>}) 75@deffnx Method clear-cache 76This function should almost never be called. It clears the @var{filter} of any 77cached iterators that haven't been reffed with @code{gtk-tree-model-ref-node}. 78This might be useful if the child model being filtered is static (and doesn't 79change often) and there has been a lot of unreffed access to nodes. As a side 80effect of this function, all unreffed iters will be invalid. 81 82@table @var 83@item filter 84A @code{<gtk-tree-model-filter>}. 85 86@end table 87 88Since 2.4 89 90@end deffn 91 92 93@c %end of fragment 94