4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
10 * \author André Pönitz
12 * Full author contact details are available in file CREDITS.
19 #include "KeySequence.h"
21 #include "support/docstring.h"
38 /** This class encapsulates all the LyX command operations.
39 This is the class of the LyX's "high level event handler".
40 Every user command is processed here, either invocated from
41 keyboard or from the GUI. All GUI objects, including buttons and
42 menus should use this class and never call kernel functions directly.
50 /// LyX dispatcher: executes lyx actions and returns result.
51 void dispatch(FuncRequest const &, DispatchResult &);
53 /// LyX dispatcher: executes lyx actions and does necessary
54 /// screen updates depending on results.
55 void dispatch(FuncRequest const &);
58 FuncStatus getStatus(FuncRequest const & action) const;
61 /// openFile: whether or not open a file if the file is not opened
62 /// switchToBuffer: whether or not switch to buffer if the buffer is
63 /// not the current buffer
64 void gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer);
66 /// cursor x position before dispatch started
67 int cursorBeforeDispatchX() const { return cursorPosBeforeDispatchX_; }
68 /// cursor y position before dispatch started
69 int cursorBeforeDispatchY() const { return cursorPosBeforeDispatchY_; }
72 /// cursor position before dispatch started
73 int cursorPosBeforeDispatchX_;
74 int cursorPosBeforeDispatchY_;
77 /// Implementation is in LyX.cpp
78 extern LyXFunc & theLyXFunc();
80 /// Implementation is in LyX.cpp
81 extern FuncStatus getStatus(FuncRequest const & action);
83 /// Implementation is in LyX.cpp
84 extern void dispatch(FuncRequest const & action);
86 /// Implementation is in LyX.cpp
87 extern void dispatch(FuncRequest const & action, DispatchResult & dr);