Re: custom TreeModel



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 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 <gtkmm-list gnome org> 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.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]