octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connecting Octave to the GUI


From: John W. Eaton
Subject: Connecting Octave to the GUI
Date: Wed, 03 Apr 2013 18:48:57 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

For background info about what follows, please see the comments
attached to this patch tracker entry:

  https://savannah.gnu.org/patch/index.php?7990

Dan, I agree that the add/remove_X_hook functions are ugly.

I checked in two changes that I hope will explain what I would like to
do instead.  They are here:

  http://hg.savannah.gnu.org/hgweb/octave/rev/70032fc70bee
  http://hg.savannah.gnu.org/hgweb/octave/rev/169f71c9d9c8

The idea in those patches is to use the octave_link class more the way
I think it was intended.  Octave calls methods from this class to
allow the GUI to handle things that happen in the interpreter like
gathering input, entering/exiting the debugger, or calling the edit
function at the command line.  Since the octave_link class has pure
virtual functions, it can't work by itself.  So the GUI needs to
provide some concrete implementation of those functions and we have
the calls to the GUI that we need.  By using this class, we have a
clear definition of what Octave can ask the GUI to do.

My plan is to replace the remaining hook functions that are registered
in the octave_main_thread function with octave_link::calls instead.
Then I'll add new methods for the dialog functions so specialized
GUI versions can be called from the corresponding .m files.  I still
think it makes sense to do the argument decoding in the .m files.

It would also be great if we can eliminate the octave_event_listener
class (or at least reduce its usage to to whatever is really
required for handling events while readline is waiting for input).

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]