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 Sep 30, 2014 11:57 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Is there a widget for drawing n-ary trees?
PostPosted: Mon Nov 21, 2005 9:35 am 
Offline
Familiar Face

Joined: Mon Nov 21, 2005 9:31 am
Posts: 5
Hi all,

I'm looking for a widget that draws n-ary tree structures (please have a look at the example: http://www.pasture.de/tree.jpg). The nodes themselves also contain widgets.

I don't have much experience with GTK. Is there a widget I can use or inherit or do I have to start from scratch with drawing arrows and rectangles?

Thank you very much in advance for any suggestions. And let me know in case I should give more detailed information.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 6:45 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
I would just recommend a GtkDrawingArea or the Gnome canvas if you are using the Gnome UI libraries.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 11:51 am 
Offline
Familiar Face

Joined: Mon Nov 21, 2005 9:31 am
Posts: 5
Thanks for your message.

It should be possible to launch the application with MinGW, so I guess I cannot use Gnome UI libraries, or am I wrong?

As for the GTKDrawingArea, I also had that idea. However, I think it will be difficult to realize. Whenever the structure of my tree changes, I have to recalculate the position of all the node widgets. And of course, I have to know the size of all the node widgets in order to do that.

It would be great if there was an easier way, but I don't have much hope. :(


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 30, 2005 12:52 pm 
Offline
Familiar Face

Joined: Mon Nov 21, 2005 9:31 am
Posts: 5
I had another idea. Maybe I can use the Graphviz APIs to calculate the coordinates of each node.

At least, if I find out how to use the APIs. But I guess this is the wrong place to ask about that.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group