[Gtk-sharp-list] Adding sorting and filtering to nodeview/nodestore
Adam Tauno Williams
awilliam at whitemice.org
Tue May 5 15:53:06 EDT 2009
On Tue, 2009-05-05 at 14:43 -0400, Vladimir Giszpenc wrote:
> Hi Mike and others who can help me,
> I am considering adding filtering and sorting functionality to the
> NodeView/NodeStore and wanted to get some help with the design before
> I get started. I realize that this was a "failed experiment" in the
> eyes of Novell, but I believe it is a very elegant widget that is
> missing some functionality.
Personally I still think the ListView in Hyena
<http://www.mail-archive.com/gtk-sharp-list@lists.ximian.com/msg03669.html> is a better start than NodeView.
> I imagine that once this is added, adding the Gtk.TreeDragSource
> interface should be easy but since I don't need that yet, I will not
> work on it for now.
> My thoughts are based on TreeModelFilter and TreeModelSort
> Create a new NodeStoreFilter.cs
> public class NodeStoreFilter : NodeStore
> public NodeStoreFilter (NodeStore childStore)
> public NodeStoreFilter (NodeStore childStore, ITreeNode rootNode)
> public Gtk.TreeModelFilterVisibleFunc VisibleFunc {set}
> public NodeStore NodeStore {get;}
> public ITreeNode ConvertChildNodeToFilterNode (ITreeNode childNode)
> public ITreeNode ConvertFilterNodeToChildNode (ITreeNode filterNode)
> public void Refilter ()
> and a new NodeStoreSort.cs
> public class NodeStoreSort : NodeStore, Gtk.TreeSortable
> public NodeStoreSort(NodeStore childStore)
> public NodeStore NodeStore {get;}
> public ITreeNode ConvertChildNodeToFilterNode (ITreeNode childNode)
> public ITreeNode ConvertFilterNodeToChildNode (ITreeNode filterNode)
> public void ResetDefaultSortFunc ()
> I don't fully understand the Adapters.
> How do I need to use TreeModelAdapter and TreeSortableAdapter? I want
> to use them to register for events I think.
> What else am I missing?
You are not alone. An the documentation is non-existent (is that
sentence itself a null reference).
> Any help would be appreciated.
> Many thanks and best regards,
More information about the Gtk-sharp-list
mailing list