custom TreeModel

danny via gtkmm-list <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
hello all,

can anyone tell me the list of methods to override in order to create a
custom TreeModel?

I currently have these:
  virtual Gtk::TreeModelFlags get_flags_vfunc() const;
   virtual int get_n_columns_vfunc() const;
   virtual GType get_column_type_vfunc(int index) const;
   virtual void get_value_vfunc(const TreeModel::iterator& iter, int
column, Glib::ValueBase& value) const;

   bool iter_next_vfunc(const iterator& iter, iterator& iter_next)
const;

   virtual bool iter_children_vfunc(const iterator& parent, iterator&
iter) const;
   virtual bool iter_has_child_vfunc(const iterator& iter) const;
   virtual int iter_n_children_vfunc(const iterator& iter) const;
   virtual int iter_n_root_children_vfunc() const;
   virtual bool iter_nth_child_vfunc(const iterator& parent, int n,
iterator& iter) const;
   virtual bool iter_nth_root_child_vfunc(int n, iterator& iter) const;
   virtual bool iter_parent_vfunc(const iterator& child, iterator&
iter) const;
   virtual Path get_path_vfunc(const iterator& iter) const;
   virtual bool get_iter_vfunc(const Path& path, iterator& iter) const;

but I keep getting this when I try to set the model in the treeview:
(gtkmm-demo:6627): GLib-GObject-WARNING **: attempting to add an
interface (GtkTreeModel) to class
(gtkmm__CustomObject_16Memory_TreeModel) after class_init
(gtkmm-demo:6627): Gtk-CRITICAL **: gtk_tree_view_set_model: assertion
'model == NULL || GTK_IS_TREE_MODEL (model)' failed

regards, danny.

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.