Commit Graph

15 Commits

Author SHA1 Message Date
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Abdelrazak Younes
1f8fe29384 This commit transfers the singletons defined in the Application class to the private LyX::Singletons implementation. It also put the session_ member and top_level_keymap global variable into this Singleton structure.
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
2006-10-19 07:20:32 +00:00
Abdelrazak Younes
83ffa28e77 This commit is purely mechanical and get rid of lyx_gui.[Ch].
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
2006-10-12 14:10:13 +00:00
Abdelrazak Younes
3b21b04e9c * LyX class (lyx_main.[Ch]):
- 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
2006-10-11 22:30:31 +00:00
Abdelrazak Younes
205096733a This commit introduces the FontLoader interface class. In the future, I intend to extend it with a proper encapsulation of font metrics.
* frontends/FontLoader.h: new interface class.
* frontends/Application.h: new FontLoader() pure virtual method
* frontends/lyx_gui: update_fonts() and font_available() methods deleted

* [qt3/qt4/gtk]/GuiApplication: implement the new interface

* qt4/GuiFontLoader:
  - renamed from FontLoader
  - now derives from FontLoader
  - now in the lyx::frontend namespace

* qt3/qfont_loader
  - now derives from FontLoader

* gtk/xftFontLoader
  - now derives from FontLoader



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15220 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-03 16:17:32 +00:00
Abdelrazak Younes
f1d2dfadbc Put back doxygen comments deleted from lyx_gui.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15212 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-03 13:59:01 +00:00
Abdelrazak Younes
63ad5449fb This commit creates a new "frontends/lyx_gui.C" that contains all functions that are not frontend dependent any more. It also creates 3 new pure virtual methods in Application:
virtual std::string const romanFontName() = 0;
virtual std::string const sansFontName() = 0;
virtual std::string const typewriterFontName() = 0;

My goal is to transfer all of "frontends/*/lyx_gui.C" to "frontends/lyx_gui.C". When this is done, "frontends/lyx_gui.C" can go altogether as its functions will then be replaced with direct calls to theApp->XXX().

* frontends/lyx_gui.C: new file with code transfered from [qt3,qt4,gtk]/lyx_gui.C

* frontends/Application: 3 new font related pure virtual methods

* [qt3,qt4,gtk]/GuiApplication: implement the above method with code transfered from lyx_gui.C


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15208 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-03 10:34:10 +00:00
Abdelrazak Younes
315d394338 Some cleanup
* Application.h: pimpl_ is now private

* GuiApplication.C: headers cleanup.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15185 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-29 23:21:03 +00:00
Abdelrazak Younes
3a1f656e4e * Application: new createView() method
* 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
2006-09-29 23:10:17 +00:00
Abdelrazak Younes
ca5411f913 This commit introduces Application_pimpl and cleanup the header includes of the affected .C files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15182 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-29 22:06:28 +00:00
Abdelrazak Younes
1396c73262 replace global variable bufferlist with Application class member access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15161 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-27 10:24:13 +00:00
Georg Baum
577f9fca6f fix eol-style
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15127 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-22 17:50:33 +00:00
Georg Baum
48bd3057a8 Add virtual destructor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15126 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-22 17:47:15 +00:00
Abdelrazak Younes
12a82dd4f2 This commit replaces BufferView->LyXView->Gui->[selection,clipboard] with theApp->[selection,clipboard]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15125 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-22 15:02:41 +00:00
Abdelrazak Younes
3f0fadc48a This commit introduces frontends/Application.[Ch] and makes qt4/GuiApplication (renamed from qt4/Application) derive from it. Most of the code in qt4/lyx_gui.C has been transferred either to Application or to qt4/GuiApplication. Application handles unique instances of LyXFunc, LyXServer and LyXServerSocket.
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
2006-09-22 09:47:39 +00:00