wxwidgets terminal on the road

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

wxwidgets terminal on the road

Timothée Lecomte
Hi !

After a long week to dig into C++, wxwidgets, the C code of gnuplot,
threads, etc. , I am pleased to present a first screenshot of the
wxwidgets terminal in action :

http://tipote.free.fr/wxt.png

Today, the terminal has basic functionnality, as you can see : it can
draw lines, text, justify it. But an important work was needed to
achieve it :

* mix C and C++, with proper declarations of functions, and with the
help of Makefiles
* launch the terminal in a new thread, because every gui is based on an
event loop, which doesn't terminate until the window is closed
* cope with exotic wxwidgets functions to open windows without building
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
call, window opening again later...

All of these is working nicely, and I really feel that such a terminal
can make gnuplot progress.

To resume :

- License issue : wxwidgets is LGPL, so it can be used without
restriction inside gnuplot

- Cross-platform : wxwidgets is ported to UNIX through GTK+, through
Windows with its native widgets, and even through MacOS (native too)...
All these targets would use the same code in gnuplot, and should have
identical behaviours !
(For example, there is a Thread class, which allows to use thread
without having to take care of the target.)

- All the advantages of a toolkit : it's easy to create toolbars, menus,
a statusbar, etc. We can imagine a terminal with its own printing
capabilities, (limited but direct) exporting capabilities, a toolbar
which makes the mouse mode clearer... I admit that it must not hide
gnuplot's own functionnality (printing is well done through the
postscript terminal, exporting with corresponding terminals), but I want
to try it to see if it can make gnuplot more flexible under special
usage (when it's driven by Octave or Maxima for example).

In the next days (weeks ?), I will probably finish implementing gnuplot
functionnalities. My base is the X11 terminal for mouse interactivity,
and the postscript terminal for rendering. Then it will be time to try
other ideas (toolbar ...).

And even if it never get finished or included anywhere, be sure that I
learn of things with such a project ! Thanks to the gnuplot authors and
to the current community.

Timothée Lecomte


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
gnuplot-beta mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|

Re: wxwidgets terminal on the road

Daniel J Sebald
Timothée Lecomte wrote:
> Hi !
>
> After a long week to dig into C++, wxwidgets, the C code of gnuplot,
> threads, etc. , I am pleased to present a first screenshot of the
> wxwidgets terminal in action :
>
> http://tipote.free.fr/wxt.png

Looks good Timothée.

I just wanted to draw your attention to a couple, perhaps unrelated, items.

First, I just updated a patch that allows attaching an outside x-window to
gnuplot's x-window driver.  (It's patch item #1027032.)  A tcl demo is included
so you can compare that and your methodology.  I think they are different
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
it is called "tkcanvas".  I tried it a while ago and it created sort of
"objectified" plots that could be manipulated in a third-party program.  (If I'm
remembering correctly.)  It seemed very useful in a way, but didn't appear to be
a full featured terminal.

Dan


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
gnuplot-beta mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|

Re: wxwidgets terminal on the road

Timothée Lecomte
Daniel J Sebald wrote:

> Timothée Lecomte wrote:
>
>> Hi !
>>
>> After a long week to dig into C++, wxwidgets, the C code of gnuplot,
>> threads, etc. , I am pleased to present a first screenshot of the
>> wxwidgets terminal in action :
>>
>> http://tipote.free.fr/wxt.png
>
>
> Looks good Timothée.
>
> I just wanted to draw your attention to a couple, perhaps unrelated,
> items.
>
> First, I just updated a patch that allows attaching an outside
> x-window to gnuplot's x-window driver.  (It's patch item #1027032.)  A
> tcl demo is included so you can compare that and your methodology.  I
> think they are different 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 it is called "tkcanvas".  I tried it a while ago and it
> created sort of "objectified" plots that could be manipulated in a
> third-party program.  (If I'm remembering correctly.)  It seemed very
> 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
errors when opening the .patch (after gunzip) with an editor or with the
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
to give scale and other options to the user... It was not really
pleasant to the eyes, but the idea seemed interesting.

I will try your patch as soon as I can open it !

Timothée




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
gnuplot-beta mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta