|
From: <tim...@en...> - 2005-06-20 21:35:07
|
Hi ! After a long week to dig into C++, wxwidgets, the C code of gnuplot,=20 threads, etc. , I am pleased to present a first screenshot of the=20 wxwidgets terminal in action : http://tipote.free.fr/wxt.png Today, the terminal has basic functionnality, as you can see : it can=20 draw lines, text, justify it. But an important work was needed to=20 achieve it : * mix C and C++, with proper declarations of functions, and with the=20 help of Makefiles * launch the terminal in a new thread, because every gui is based on an=20 event loop, which doesn't terminate until the window is closed * cope with exotic wxwidgets functions to open windows without building=20 a whole app and its own main()... * be able to communicate with the window in this separate thread * handle properly thread creating on init, window closing on user's=20 call, window opening again later... All of these is working nicely, and I really feel that such a terminal=20 can make gnuplot progress. To resume : - License issue : wxwidgets is LGPL, so it can be used without=20 restriction inside gnuplot - Cross-platform : wxwidgets is ported to UNIX through GTK+, through=20 Windows with its native widgets, and even through MacOS (native too)...=20 All these targets would use the same code in gnuplot, and should have=20 identical behaviours ! (For example, there is a Thread class, which allows to use thread=20 without having to take care of the target.) - All the advantages of a toolkit : it's easy to create toolbars, menus,=20 a statusbar, etc. We can imagine a terminal with its own printing=20 capabilities, (limited but direct) exporting capabilities, a toolbar=20 which makes the mouse mode clearer... I admit that it must not hide=20 gnuplot's own functionnality (printing is well done through the=20 postscript terminal, exporting with corresponding terminals), but I want=20 to try it to see if it can make gnuplot more flexible under special=20 usage (when it's driven by Octave or Maxima for example). In the next days (weeks ?), I will probably finish implementing gnuplot=20 functionnalities. My base is the X11 terminal for mouse interactivity,=20 and the postscript terminal for rendering. Then it will be time to try=20 other ideas (toolbar ...). And even if it never get finished or included anywhere, be sure that I=20 learn of things with such a project ! Thanks to the gnuplot authors and=20 to the current community. Timoth=E9e Lecomte |
|
From: Daniel J S. <dan...@ie...> - 2005-06-21 06:26:10
|
Timoth=E9e Lecomte wrote: > Hi ! >=20 > After a long week to dig into C++, wxwidgets, the C code of gnuplot,=20 > threads, etc. , I am pleased to present a first screenshot of the=20 > wxwidgets terminal in action : >=20 > http://tipote.free.fr/wxt.png Looks good Timoth=E9e. I just wanted to draw your attention to a couple, perhaps unrelated, item= s. First, I just updated a patch that allows attaching an outside x-window t= o=20 gnuplot's x-window driver. (It's patch item #1027032.) A tcl demo is in= cluded=20 so you can compare that and your methodology. I think they are different= =20 approaches even though in the long run similar widgets are being used. Second, I recall another terminal that works with widgets in some way. I= think=20 it is called "tkcanvas". I tried it a while ago and it created sort of=20 "objectified" plots that could be manipulated in a third-party program. = (If I'm=20 remembering correctly.) It seemed very useful in a way, but didn't appea= r to be=20 a full featured terminal. Dan |
|
From: <tim...@en...> - 2005-06-21 18:13:05
|
Daniel J Sebald wrote: > Timoth=E9e Lecomte wrote: > >> Hi ! >> >> After a long week to dig into C++, wxwidgets, the C code of gnuplot,=20 >> threads, etc. , I am pleased to present a first screenshot of the=20 >> wxwidgets terminal in action : >> >> http://tipote.free.fr/wxt.png > > > Looks good Timoth=E9e. > > I just wanted to draw your attention to a couple, perhaps unrelated,=20 > items. > > First, I just updated a patch that allows attaching an outside=20 > x-window to gnuplot's x-window driver. (It's patch item #1027032.) A=20 > tcl demo is included so you can compare that and your methodology. I=20 > think they are different approaches even though in the long run=20 > similar widgets are being used. > > Second, I recall another terminal that works with widgets in some=20 > way. I think it is called "tkcanvas". I tried it a while ago and it=20 > created sort of "objectified" plots that could be manipulated in a=20 > third-party program. (If I'm remembering correctly.) It seemed very=20 > useful in a way, but didn't appear to be a full featured terminal. > > Dan I think there's a problem with last patches (20/06 and 21/06)... I get=20 errors when opening the .patch (after gunzip) with an editor or with the=20 patch commad ("only garbage ..."). But previous ones seem to work. I've seen a terminal in maxima based on tcl/tk. It used a small window=20 to give scale and other options to the user... It was not really=20 pleasant to the eyes, but the idea seemed interesting. I will try your patch as soon as I can open it ! Timoth=E9e |