|
From: <tim...@en...> - 2005-06-12 11:15:37
|
Hans-Bernhard Broeker wrote: > Timoth=C3=A9e Lecomte wrote: > >> In order to make it more user friendly (but it already is, with a litt= le >> practice), I thought to write a terminal to wxwidgets=20 >> (hhtp://www.wxwidgets.org), a gui toolkit.=20 > > > Somebody else had the same idea recently. But there's a significant=20 > obstacle, esp. in the way you plan on doing it: licensing. wxwidgets=20 > is GPLed, gnuplot's license is deemed not sufficiently compatible with=20 > GPL to allow linking GPLed libraries into it. At least not in=20 > distributed binaries, by the interpretation of the legalese as seen by=20 > the Debian team. Oh no ! I was aware of the non-GPL licence of gnuplot, but I have not=20 taken it into account when thinking of a wxwidgets terminal. So is there=20 any hope to use one of these wonderful gui toolkits like wxwidgets, gtk,=20 qt, etc. as terminals ? > >> be something interesting to make 3rd-party software (like Octave, >> or Maxima) reach a higher level of usablility. > > > I don't think that adding a GUI to gnuplot will make it any more easy=20 > to use by external programs, who want to control gnuplot themselves,=20 > rather than let the user do it. They already have enough control over=20 > gnuplot as it is --- the only major exception being that they can't=20 > swallow the gnuplot graph window into their own GUI yet, and that the=20 > Windows version offers no access to its command line output channel. You're right when you say that external programs want first to control=20 gnuplot themselves. However, I think the user would be pleased to have a=20 little more interaction with the terminal without having to send a new=20 plot command with modified options. That's precisely what you've added=20 with the mouse support. I was dreaming of a terminal with other options... In fact, I must admit that I had used gnuplot for months before=20 discovering the mouse support (in octave, it's not activated by default,=20 as explained in the gnuplot faq) ! That's why I want to design a more=20 intuitive terminal, regarding this point (toolbar, etc). When reading the terminal readme and the corresponding API, I have been=20 impressed by its simplicity. As far as I understand, gnuplot owns an=20 entire abstract layer which give really simple drawing commands. It is=20 really ideal to use it with a gui library like wxwidgets. > >> But I have a question : wxwidgets is a library for C++, and gnuplot >> is written in C. So, can I write a terminal for gnuplot in C++ ? > > > Not really. At least the actual terminal API functions (i.e. those=20 > that go into the termentry struct) have to be C functions, i.e. they=20 > have to be qualified 'extern "C"', in C++ terms. It's precisely what I've learned on other pages. So the mix between C=20 and C++ should not be a problem, provided the extern "C" magic words. > Trying to compile genuine, non-trivial C code with a C++ compiler is=20 > generally impossible, dangerous, or both. It would cause a boatload=20 > of pain in the lower back to translate gnuplot to "C/C++", the strict=20 > common subset of both languages. Ok, I understand. I hope we could continue this discussion to find a solution, especially=20 about the license problem. Timoth=C3=A9e Lecomte |