Re: Resource for building custom models

Jeff Hallock wrote:
I have a custom TreeView in which I want to implement both a filter and 
sorting functionality. Unfortunately Gtk2::TreeStore does not implement 

Gtk2::TreeModelFilter is not an interface that objects can implement.
Gtk2::TreeModelFilter is itself a Gtk2::TreeModel with the sole purpose of
wrapping another model for the purpose of filtering.  Similarly for

Currently, I get around this by overriding the following routine in my
custom TreeView.

sub set_model { ... }

I think that's exactly how Gtk2::TreeModelFilter and Gtk2::TreeModelSort are
supposed to be used.

I would like to create a custom model so I don't need to use this hack. I 
have looked around for information on this - but it is sparse - and that I 
do find is not all that informative. Does anyone know of a resource that I 
can use to learn how to do this?

For implementing custom tree models, see `perldoc Gtk2::TreeModel' and


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]