Re: custom TreeModel
Kjell Ahlstedt via gtkmm-list <[email protected]>
| Newsgroups | gmane.comp.gnome.gtkmm |
|---|---|
| Message-ID | <[email protected]> |
An alternative would be to add this in a new gtkmm-documentation/examples/book/custom/custom_treemodel directory in the gtkmm tutorial. And a description in a new section in the /Custom Widgets/ chapter (which should then be renamed). Isn't this kind of custom class that implements one or more interfaces quite unusual? And a bit more complicated than most of the demos? There is no corresponding program in gtk/demos. All existing C++ demos in gtkmm correspond to C demos in gtk. Kjell On 2019-12-22 11:06, danny via gtkmm-list wrote: > hello gtkmm, > > so how do I continue with this? I feel that it would be really handy > to add an example such as the one below to the gtkmm demos subdir. > > I was struggling with this myself some years ago for a gtk2 program > where the data were already established (and constantly changing) > outside the gui in a separate structure. > > Copying the data into the treeview model, as the existing demo > programs do, is obviously not the ideal solution. > > the other example in gtkmm-documentation > <https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/gtkmm-3-24/examples/others/treemodelcustom> > keeps is very helpful, but it does not show subdirs... > > regards, Danny. > > On Mon, Dec 16, 2019 at 2:10 PM danny via gtkmm-list > <[email protected] <mailto:[email protected]>> wrote: >> hi >> >> well, actually, I did not find the example you are referring to. I >> probably did when I was working with the original gtk2 program, though. >> >> so I have come up with this: >> (gtkmm-3.22.3/demos) >> >> -------------------------------------------------------------- >> /* Tree View/Tree Store >> * >> * The GtkTreeStore is used to store data in tree form, to be >> * used later on by a GtkTreeView to display it. This demo builds >> * a simple list of nodes in memory and displays it in the GtkTreeStore. >> * >> */ >> >> ... >> -------------------------------------------------------------- >> >> I'm not sure, though, if I really understand the purpose of >> virtual bool Gtk::TreeModel::iter_parent_vfunc ( >> >> >> this function finds a parent for the given child, right? but why >> would that be needed, if a child can only be arrived at from a parent >> node in the first place? >> >> regards, Danny. >> > > > _______________________________________________ > gtkmm-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/gtkmm-list _______________________________________________ gtkmm-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtkmm-list