writing 'mouse interactive' routines to extend draw, plot2d, etc.



Hello,

  I am interested in writing some maxima or lisp routines which give
plot windows with mouse interaction.  For instance, the gnuplot
interface to draw.lisp allows one to show the coordinates of points in a
2d graphic display.  Pressing the middle button at a point will print
the coordinates on the screen.  I would like to be able to print the
coordinates to a file, and to have various keyboard combinations do
other things--e.g. open new graphic windows, etc.  Since gnuplot is so
well developed, I would like to use that as the main engine for these
purposes.  So, I have been reading
Mario's 'draw.lisp'.  I noticed that there are variables
   datastorage
   cmdstorage
   datapath

But, I don't know where there files are kept and how gnuplot accesses them.

Would it be easier with openmath?

 I would greatly appreciate it any hints for this process.  

TIA,
 -sen