Le Sat, Apr 13, 2002, à 06:31:10PM +0200, Thorsten Roggendorf a écrit:
> What I need to do is write an extension to dia. I guess I'll have to
> write C-code (I'd be more comfortable with C++, do I have to use C?). I
> need the ability to introduce custom shapes that have properties
> dialogs, that let me set internal parameters, that would mostly only
> effect the xml, not stuff that happens on the dia screen.
> That (and an xml parser which I would have to implement) would give me
> an extremely powerful and easy to use cybernetics/artificial neural
> networks ... simulator.
Could probably be done. Depending on what your exact needs are, it could be
possible to implement everything as plain dia files with custom shapes (in
dia parlance = bits of SVG) and then parse the generated dia files into your
application. Or, you could indeed write full-fledged objects (= C code) to
handle the cases too complex to be handled by simple SVG. It could be
possible to write parts in C++, but you'd still have to provide a complete C
interface, and at this point you'd be spending most of your time converting
between the C API and your C++ stuff -- I can't estimate whether it would be
worth the trouble.
As for the general question:
> So now the question. Can anybody tell me how much work that would be? I
> could not do all the work in xml using the custom shapes importer, could
> I?
it completely depends on your precise requirements.
-- Cyrille
--
Grumpf.