Subject: Re: New Shapeset -- What Will I Need To Do...?
Date: Thu, 29 Aug 2002 21:11:12 +0200
Tim,
Le Thu, Aug 29, 2002, à 11:54:03AM -0400, Tim Ellis a écrit:
> Now, I know things change quickly in the Open Source world, so I'm willing
> to revisit this, but I'd like to get some advice from the GTK hackers
> here.
> Once I have my GTK program, I have clue 0 about how to convert this into
> dialogues and interfaces to Dia.
> Oh, and just asking this question terrifies me. Please be gentle.
I've got very good news for you: writing new objects (if you're not aiming
for an UML Class look-alike) is not that difficulty; StdProp objects contain
zero GTK and zero libXML code. "all" you have to do is to build a property
description list, hand that over to the StdProp core; then you (still ;-) )
need to write the actual drawing (and mouse handling) code, using dia's own
interfaces.
I suggest you take the source of one object relatively close to what you
want to do, play a bit of search-and-replace, then experiment with the
PropDescriptors on one hand, and the rendering on the other. Any object
should be a rather good example nowadays (if you see any gtk or libxml stuff
inside, run away. If you see UML Class, dd if=/dev/zero of=/dev/hda)
I wish you a lot of fun!
-- Cyrille
--
Grumpf.