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.
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.
--- The element "Square" with two connectors (input/output)
--- The element "triangle" with three connectors (2 inputs/1 output)
--- Maybe a few variations.
- Drag and drop and connect the elements.
- The elements should be clickable to define some parameters (here, some floats
and ints )
- Saving the elements properties.
- Saving the connectivity of the diagram (ideally) in a boolean matrix
connecting all output to all inputs.
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 ?
However, just in order to give you the full picture, I have to say that this C
or C++ program will become a function to be used within Octave/Matlab.
The function call will open the window and will return the element properties
and the matrix upon closing.
In the unlikely case you are not familiar, transforming a C function into an
Octave/Matlab function can be done via the Mex interface.
This is usually restricted to number crunching C program but, as a preliminary
example, I already converted some simple C examples of gtk into such Octave
functions.
It opens a window with a few clickable elements, I click and the function
return the numbers. so it is possible in principle.
This function will be part of a GPL toolbox for Octave/Matlab and must run on
Linux OSX and Windows.
I know that Matlab provides for simulink, a diagram editor. But there are no
equivalent with Octave and I want to maintain compatibility.
I also know that what I want to do can be done with Dia, directly, but I would
prefer to get what I need without the user to install an extra program.
I don't know if this library scavenging attitude is encouraged. However credit
to dia and dia-lib will be paid of course.
My best Regards,
Julien.
_______________________________________________
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia