|
|
| Author |
Message |
|
|
pasture Familiar Face
Joined: 21 Nov 2005 Posts: 5
|
Posted: Mon Nov 21, 2005 9:35 am Post subject: Is there a widget for drawing n-ary trees? |
|
|
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. |
|
| Back to top |
|
 |
openldev Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 387 Location: Fairfax, Virginia
|
Posted: Mon Nov 21, 2005 6:45 pm Post subject: |
|
|
| I would just recommend a GtkDrawingArea or the Gnome canvas if you are using the Gnome UI libraries. |
|
| Back to top |
|
 |
pasture Familiar Face
Joined: 21 Nov 2005 Posts: 5
|
Posted: Tue Nov 22, 2005 11:51 am Post subject: |
|
|
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. :( |
|
| Back to top |
|
 |
pasture Familiar Face
Joined: 21 Nov 2005 Posts: 5
|
Posted: Wed Nov 30, 2005 12:52 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|