On 02/03/2010 11:50 AM, Jean-Marc Lasgouttes wrote:
Abdelrazak Younes<you...@lyx.org> writes:
As far as dispatch is concerned, my goal was to make
GuiApp::dispatch() the first entry in the dispatch machinery instead
of LyXFunc::dispatch() which should basically disappear... At the end,
all the virtual interface in "src/frontend/" should disappear too.
I could not care less about where is the main entry point as long as
there is a main entry point and everybody is not directly invoking
individual dispatch function.
Good we agree on that point at least.
About putting it in GuiApp, why not, although most of the code there is
non-gui code.
Some of this code will probably integrate back the non-gui code in forms
of helper functions or methods. This is similar to what we did when I
created GuiView::dispatch(), I move out a lot of code there and then a
lot of code did return back to src/.
What could/should probably move is the default: case of
the big switch.
Yes.
Note that, with my latest changes, LyXFunc only has two member variables
left (those for saving cursor x/y). I would propose to move these
variables into Cursor (savedX, savedY). Would somebody object to that?
Not from me. But I think there is already something similar in Cursor
(Cursor saves its pre and post dispatch() state IIRC).
Then there would not be a LyXFunc object anymore, but functions (or
static members).
Yes.
Abdel.