|
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 |