To: discussions about usage and development of dia <dia-list gnome org>
Subject: Re: Making plugins
Date: Thu, 17 Mar 2005 19:49:35 -0800
On Thu, 2005-03-17 at 11:44 +0100, clement begue wrote:
> Hi everyone!
> I am actually trying to see how to make plugins in Dia.
> The type of plugins I need to make is (tell me if those things are not
> to be done this way) :
> - Import plugins (generating a diagram from the output of a program we
> have here)
Look at the xfig plugin for a good example of that.
> - Shapes with a specific dialog and attributes.
>
> I read in this mailing list that I should not use the UML attributes
> dialog as an example, so what should I base my work on?
> The kind of shape I need to make would be somewhat dynamic.
> I mean, I put the shape (the shape is a kind of electronic board) on the
> diagram, open properties, and then I want to be able to add connectors
> (rectangles with a name) on the border of the board that would set in
> the right place directly (the first on upper left and then the
> connectors are added all around the board and not over a previous
> connector, enlarging the board if it is needed).
> Am I dreaming of something that isn't possible? I would love to do such
> thing much better than 200 shapes for all kind of boards and number of
> connectors!
An extendable board is doable, though probably a bit tricky. Chronogram
should show you some of the ropes. You may consider using the parenting
system for the connectors, if they're always to be inside the board.
Though I don't think the parent gets notified of children being added.
Could you do a quick mock-up of what this would look like in use, that'd
give me a much better idea of where you want to look.
-Lars
--
Lars Clausen <lars raeder dk>