On 21 Jan, Thomas Mailund Jensen wrote: > > I just stumbled across dia earlier today, and I must say I'm very > impressed. Thanks. > I've been wanting to write a petrinet tool in gtk for some time, but > the lack of a highlevel vector drawing/canvas widget has held me > back. I've done some work on such a widget myself, but I'm nowhere as > far as what I see in dia. I don't know exactly what petrinets are (some kind of neural net isn't it?), but what kind of requirements do you have. Can it be done in the Dia framework? > So of course, I would like to take as much from dia as I possible can, > to avoid re-inventing the wheel, so to speak. I understand. What about gnome-canvas then? It has some similarities with Dia. > Now, what I will need in the application I plan to write, is a widget > behaving somewhat like the grid windows. But as far as I can see from > cat-ing the source before my eyes, this isn't really separated from > the dia application. > > I can see the source is divided in objects/ app/ and lib/, so I wonder > if ther are there any plans for separating the library somewhat from > the application? Making a "diagram drawing" library for use with gtk > applications. Exactly what do you mean by "diagram drawing" library? The current structure is something like this: object/ here are different kinds of diagram objects. Each kind is in an own library that gets dynamically loaded by the application. So you have objects/UML/ for UML objects, objects/standard/ for standard objects etc. Objects are quite separated from the rest of the program. They mainly implement the inteface in lib/object.h. For drawing they use the abstract renderer interface in lib/render.h. They can also use the stuff that's in lib/. There are the interfaces to the rest of the app and convenience functions that makes objects easier to write. The main program resides in app/. Here we have all gui stuff etc. Each Diagram type (app/diagram.c) is a loaded diagram and has several views, called DDisplay's (app/display.c). The DDisplay contains a dialog window which has a GtkDrawingArea where all it's drawing are done. / Alex
