Re: [gtkmm] custom treemodel



On Fri, 2004-03-05 at 21:40, Sverre Sundsdal wrote:
> Hi
> 
> I am new to gtkmm, so maybe this has been asked before, but I couldn't 
> find anything in the mail archives.  I am using a TreeView to display 
> some constantly changing data. I have a class that contains this data in 
> getset methods. The library i have created takes care of updating the 
> data. Now, what I would like is aTreeView to reflect this data, which is 
> contained in a vector.
> I have some problem figuring out how to proceed.
> All TreeView examples I can find uses a ListStore and copies the data 
> from the datastructure to the liststore. I figure that this requires a 
> thread to copy over the data from the vector to the liststore. Then you 
> would have two copies of the data.
> I don't think this is the correct way to do this, but I don't know how 
> to do this better.  Maybe a custom treemodel? 
> Has anybody out there done this before and has som example code I can see?

gtkmm 2.2.9 has a customtreemodel example, and fixes to allow this to
work. It's not very nice - it's a lot better in gtkmm 2.4, which you can
also try.

-- 
Murray Cumming
www.murrayc.com
murrayc murrayc com




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