[Gtk-sharp-list] Adding sorting and filtering to nodeview/nodestore
Vladimir Giszpenc
vladimir.giszpenc at gmail.com
Tue May 5 14:43:09 EDT 2009
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.
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?
Any help would be appreciated.
Many thanks and best regards,
Vlad
More information about the Gtk-sharp-list
mailing list