Re: using dia-lib for a simple program



At 16.03.2012 13:00, julienjavaloyes yahoo fr wrote:


dear Dia developer,

I would need to make a small specific C (or C++) program.
Depending if I take the good or the bad path, I can have this done in 2 years or 2 weeks.

Sorry, I don't get these estimations.
  Good -> 2 years -> implemented everything yourself?
  Bad -> 2 weeks -> using what? An exisiting library providing
    everything you want in an easy consumable fashion?

This is why I would greatly appreciate your advices.


The program must do the following.ï

- Open a main window with a simple toolbar containing a few elements.

I don't think any of the Dia code could help here.

--- The element "Square" with two connectors (input/output)

objects/standard/box.c ?

--- The element "triangle" with three connectors (2 inputs/1 output)
objects/standard/polygon.c ?

--- Maybe a few variations.

- Drag and drop and connect the elements.
app/disp_callbacks.c (and more)

- The elements should be clickable to define some parameters (here, some floats and ints )

app/display.c (and more)

- Savingï the elements properties.
- Saving the connectivity of the diagram (ideally) in a boolean matrix connecting all output to all inputs.

Dia's native format is assembled in app/load_save.c and that's currently the only file format preserving connections.

I am happy to get comments only at the level of the C program. How to do that ?

So far, my best bet is to use GTK and dia-lib. Is is a good idea ? Is it possible to use dia-lib ?

If you are asking for a simple SDK version managed by us, see:
http://mail.gnome.org/archives/dia-list/2012-January/msg00071.html

In short: there is no single dia-lib which could provide what you listed.
If you decide to split the useful bits from Dia's code base you would be on your own.


However, just in order to give you the full picture,
[...]
I don't know if this library scavenging attitude is encouraged.
I'd say it is neither encouraged nor discouraged - the GPL allows
to do that and that fine. Of course Dia would benefit much more
from contributions than from reusing parts.

Howevercredit to dia and dia-lib will be paid of course.

Maybe you should take a closer look at Dia's architecture - at least I don't quite get the split you are making between Dia and dia/lib ...

Regards,
        Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]