This commit also modifies the LyXFunc class. A LyXView is not needed any more at construction. Neither is the top level keymap. The LyXFunc key sequences are initialized only if we are in GUI mode (lyx::use_gui = true).
The next step is to rename LyXFunc::owner to LyXFunc::lyx_view_ and to put some BOOST_ASSERT. A classification between Gui and Kernel oriented LFUNs would also be welcome.
*LyX/lyx_main.[Ch]:
- LyX::Singletons: new private structure containing all the singletons (except the main LyX one of course).
- buffer_list_, top_level_keymap, session_: transfered to the LyX::Singletons structure.
* LyXFunc:
- LyXFunc: default constructor does not need any arguments.
- setupLocalKeymap(): deleted (was not used anywhere).
- initKeySequences(): new public method called from lyx_main.C, useful only in lyx::use_gui mode.
- new private member accessor methods
* Application:
- Application_pimpl: deleted (transfered to LyX)
- global singleton accessors: transfered to lyx_main.C
- start(): code transfered to LyX::priv_exec()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15367 a592a061-630c-0410-9148-cb99ea01b6c8
* lyx_main.h: define "extern bool lyx::use_gui" here.
* NoGuiFontMetrics.h: new class for command-line LyX
* NoGuiFontLoader.h: new class for command-line LyX
* Application.C:
- theFontMetrics(): returns the above dummy FontMetrics when use_gui is false.
- theFontLoader(): returns the above dummy FontLoader when use_gui is false.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15339 a592a061-630c-0410-9148-cb99ea01b6c8
Only qt4 is guaranted to compile and work. I did not remove gtk and qt3 lyx_gui.C because they might be needed for reference to complete the header declarations in "GuiApplication.C".
- lyx_gui::use_gui transfered to lyx::use_gui in lyx_main.C
- all remaining lyx_gui functions transfered to Application and corresponding GuiApplication implementations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15306 a592a061-630c-0410-9148-cb99ea01b6c8
- new buffer_list_ member and accessors
- implementation of theBufferList() extern function
* Application: remove everything related to BufferList
* lyx_cb.C: test for lyx::use_gui before using theApp.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15303 a592a061-630c-0410-9148-cb99ea01b6c8
* lyxfunc.h:
- theLyXFunc(): new function in the global namespace.
- lyx::dispatch(): new function in the lyx namespace.
- lyx::getStatus(): new function in the lyx namespace.
* bufferlist.h:
- theBufferList(): new function in the global namespace.
* Clipboard.h:
- theClipboard(): new function in the global namespace.
* Selection.h:
- theSelection(): new function in the global namespace.
* FontLoader.h:
- theFontLoader(): new function in the global namespace.
* FontMetrics.h:
- theFontMetrics(LyXFont const &): new function in the global namespace.
* Application.C: implements the functions defined above.
* LyXView.h:
- getLyXFunc(): deleted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15298 a592a061-630c-0410-9148-cb99ea01b6c8
* gtk/qt3/qt4/GuiApplication: createView() method deleted
* LyXView:
- init(): is now a pure virtual method. autoSave code transferred to constructor and updates to the frontends.
- setGeometry(): new pure virtual method
* gtk/GView, qt3/QtView, qt4/GuiView: adapted to above change
- setGeometry(): code transfered from GuiApplication
* lyx_main.C: call LyX::ref().addLyXView() in there instead of in Application::createView()
*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15183 a592a061-630c-0410-9148-cb99ea01b6c8
Most of qt3 and gtk should stay compilable except for LyXView.h because the LyXFunc instance has been transferred to Application.
* frontends/Application: new class aimed to be the one unique interface between the frontend and the kernel. Contains one global pointer to the unique instanciation theApp.
* frontends/qt4/GuiApplication: renamed from qt4/Application, the qt4 specialisation of the Application class. Contains one global pointer to the unique instanciation guiApp (equal to theApp but pointing to a GuiApplication instead).
* frontends/qt4/lyx_gui.C: most of the code has been moved to Application and GuiApplication
All other file: adapted to new API.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15114 a592a061-630c-0410-9148-cb99ea01b6c8