Re: Resource for building custom models
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Resource for building custom models
- Date: Thu, 26 Jun 2008 20:46:51 +0200
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.
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
Gtk2::TreeModelSort.
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
<http://scentric.net/tutorial/sec-custom-models.html>.
--
Bye,
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]