GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Jul 29, 2014 2:44 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Best way to store a constant link to a Treeview item/node?
PostPosted: Thu Mar 28, 2013 2:01 am 
Offline
Familiar Face

Joined: Thu Aug 23, 2012 4:50 am
Posts: 11
Hi,

I'm writing a 3D modelling application using Gtk+ 2.24 on Windows and have everything worked out except one essential requirement. I need a way to link a 3d object in my scene to a corresponding item in the Treeview. Iter's, TreePath's and Tree References won't work because when I move a node in the tree, these values( and sometimes other items in the tree too) are changed.

I'm attaching a data pointer of my 3d model to the tree item, so I can always get the model from the TreeView node, but can't work out how to do it the other way round. The only solution I've thought of is to store a unique Id with the treeview item and in the 3d object, then when I click on the object I can get the id and loop through the whole tree to find that node. Before I implement this, does anyone know of another/better method I could try?

For those interested, here's a link to some screenshots of the app I posted on another forum:

http://forums.nuclearglory.com/index.php?tid=4255

Thanks
6


Top
 Profile  
 
 Post subject: Re: Best way to store a constant link to a Treeview item/nod
PostPosted: Thu Apr 04, 2013 10:23 pm 
Offline
Familiar Face

Joined: Thu Aug 23, 2012 4:50 am
Posts: 11
I guess the lack of responses mean's that getting a permanent handle to node isn't possible, but that's ok as I didn't think there was a way. I'll start on the work around I described then.

Cheers
6


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group