Commit Graph

58 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
fb1ffecd0c This commits cuts down LyX::exec2 into two new methods (execBatchCommands() and restoreGuiSession()) and introduce a number of helper private function to sanitize the initialization and exit process; quitLyx() is replaced with LyX::quit(). The Application starting and reset is done directly in priv_exec().
* lyx_cb.[Ch]: delete quitLyX()

* lyx_main.[Ch]
  - lyx_exit(): moved to LyX::earlyExit()
  - prepareExit(), quit(), earlyExit(), execBatchCommands(), initGuiFont(): new LyX methods.
  - LyX::priv_exec(): restructured with above helper methods.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15353 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 08:36:04 +00:00
Abdelrazak Younes
c7e365365e This commit saves the need to check for lyx::use_gui in a number of places.
* 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
2006-10-15 21:47:29 +00:00
Abdelrazak Younes
53bbb6ed7a * GuiApplication.C: align Windows with other platform. No more static trick!
* lyx_main:
  - LyX::application_ : new scoped_ptr member containing the Application instance.
  - LyX::priv_exec(): initialize application_.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15316 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 22:02:45 +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
Georg Baum
da9cdaf218 Reduce calls of ::exit()
* src/main.C
	(main): return LyX::exec()

	* src/frontends/{gtk,qt3,qt4}/lyx_gui.C
	(lyx_gui::exec): Change return value to int
	(lyx_gui::start): ditto

	* src/frontends/qt[3,4]/lyx_gui.C
	(lyx_gui::exit): Call QApplication::exit instead of ::exit, this
	hack is not needed anymore

	* src/frontends/lyx_gui.h
	(lyx_gui::exec): Change return value to int
	(lyx_gui::start): ditto

	* src/lyxtextclasslist.[Ch]
	(LyXSetStyle): SChange return value to bool and don't call ::exit

	* src/lyx_main.C
	(showFileError): Don't exit anymore

	* src/lyx_main.[Ch]
	(LyX::exec): Change return value to int
	(LyX::priv_exec): ditto
	(LyX::exec2): ditto
	(LyX::init): Change return value to bool
	(LyX::readRcFile): ditto
	(LyX::readUIFile): ditto



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14339 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-05 17:01:26 +00:00
Abdelrazak Younes
3287c44f33 GUI API Cleanup step 2: merge of the "younes" branch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14231 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-26 16:55:35 +00:00
Peter Kümmel
04cfa65a96 fix: qt3/qt4 save/restore of the window geometry and maximize status
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14166 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-21 10:30:32 +00:00
Georg Baum
042d5a0242 Fix crash on exit (bug 2549) by correct usage of QApplication
* src/lyx_cb.C
	(quitLyX): lyx_gui::exit takes now an argument

	* src/frontends/{gtk,xforms}/lyx_gui.C
	(lyx_gui::parse_init): rename to lyx_gui::exec and call LyX::exec2
	(void lyx_gui::exit): add exit status argument

	* src/frontends/qt{3,4}/lyx_gui.C
	(cleanup): new function for pointer cleanup
	(lyx_gui::parse_init): rename to lyx_gui::exec and call LyX::exec2,
	turn static variables into automatic variables
	(void lyx_gui::exit): add exit status argument
	(start): Use cleanup()
	(exit): ditto

	* src/frontends/lyx_gui.h
	(parse_init): remove
	(exec): new
	(exit): Take exist status argument

	* src/lyx_main.[Ch]
	(LyX::priv_exec): split into LyX::priv_exec and LyX::exec2

	* src/lyx_main.C
	(lyx_exit): New, choose the right exit function
	(showFileError): call lyx_exit
	(LyX::queryUserLyXDir): ditto
	(LyX::init): ditto
	(LyX::priv_exec): ditto
	(LyX::priv_exec): Replace want_gui by lyx_gui::use_gui
	(LyX::priv_exec): replace lyx_gui::parse_init by lyx_gui::exec and
	exec2
	(LyX::init): Replace gui argument by lyx_gui::use_gui


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14036 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-07 20:08:37 +00:00
Lars Gullik Bjønnes
b2effebe20 2006-04-06 Bo Peng <ben.bob@gmail.com>
session support that
    * handle recent opened files (previously lastfile)
    * save/load bookmarks when quit lyx
    * save/load buffer cursor location whan a file is closed
    * save/load windows position and size when a file is closed
    * add rc entries load_session, use_lastfilepos,
      screen_geometry_height, screen_geometry_width,
      screen_geometry_xysaved.
    * trigger LFUN_QUIT when Alt-F4 or close-button is used to close lyx.
    * remove lastfile.h lastfile.C (merged in session.h, session.C)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13561 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 22:56:18 +00:00
Angus Leeming
3f938d4dbf The LyXRC::prepend_path patch as tested on the Mac by Andreas.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9485 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-16 21:01:41 +00:00
Angus Leeming
671aab6377 Preview fiddling (preparing the way for mathed previews).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8647 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-13 13:10:33 +00:00
Angus Leeming
50257b8690 Turn LyX into a singleton class. Kill the BufferView cache.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7922 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-14 21:30:23 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Angus Leeming
0705dae8a3 Finish the task of removing all cruft from the header files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7703 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-07 21:25:37 +00:00
Angus Leeming
236ea81bc5 Replace LString.h with support/std_string.h,
Lsstream.h with support/std_sstream.h,
support/LIstream.h with support/std_istream.h,
support/LOstream.h with support/std_ostream.h.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7685 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 17:23:11 +00:00
Angus Leeming
1dffc5cfe4 Move #includes out of header files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7659 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-04 03:54:04 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
Angus Leeming
cd16abc0fd Flying high and free...
The user_lyxdir is also now a function.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7399 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-27 22:13:29 +00:00
Angus Leeming
eee532a581 Learing to fly...
system_lyxdir is now a function too.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7396 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-27 21:04:02 +00:00
Angus Leeming
8f90cc97a6 Replace occurances of system_tempdir with os::getTmpDir().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7365 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-26 18:25:29 +00:00
Alfredo Braunstein
ffb610695f added a parseError signal to Buffer and use it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7200 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-20 23:03:43 +00:00
John Levon
1423bdb7a7 remove defaults stuff, let Qt handle no toolbar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6685 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-02 18:08:05 +00:00
Lars Gullik Bjønnes
99d1627a47 dont use pragma impementation and interface anymore
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6138 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-13 16:53:15 +00:00
Lars Gullik Bjønnes
13349032cb ws changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5758 a592a061-630c-0410-9148-cb99ea01b6c8
2002-12-01 22:59:25 +00:00
John Levon
ba29fec6bf some small cleanups
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4895 a592a061-630c-0410-9148-cb99ea01b6c8
2002-08-07 23:43:38 +00:00
Lars Gullik Bjønnes
043298544c Rename strip to rtrim
Rename frontStrip to ltrim
Add new trim function.

modify source for this change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4801 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-28 22:50:13 +00:00
John Levon
9699643848 New lyx_gui namespace. Some working out to be done still ..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4377 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-12 09:47:10 +00:00
John Levon
ab5f0efdcb Some minor cleanup + use of scoped_ptr instead of raw pointer,
to reduce diff size


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4374 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-12 02:54:19 +00:00
Lars Gullik Bjønnes
482c04ecca use more specific smart_ptr headers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4183 a592a061-630c-0410-9148-cb99ea01b6c8
2002-05-22 01:16:37 +00:00
Lars Gullik Bjønnes
8283e978f8 ws cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3803 a592a061-630c-0410-9148-cb99ea01b6c8
2002-03-21 17:27:08 +00:00
Lars Gullik Bjønnes
a45afb24a4 no change logs, sorry
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3232 a592a061-630c-0410-9148-cb99ea01b6c8
2001-12-18 03:30:35 +00:00
Jean-Marc Lasgouttes
159544464a insertlabel.diff, kbnmod.diff, lyx_main.patch, and part of compile.patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3181 a592a061-630c-0410-9148-cb99ea01b6c8
2001-12-10 15:59:20 +00:00
Jean-Marc Lasgouttes
8488e475a6 lyxserver cleanup patch + andre's small patches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2901 a592a061-630c-0410-9148-cb99ea01b6c8
2001-10-19 15:13:49 +00:00
Lars Gullik Bjønnes
85a5ea7bfc change a lot of methods to begin with small char
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2150 a592a061-630c-0410-9148-cb99ea01b6c8
2001-06-28 10:25:20 +00:00
Lars Gullik Bjønnes
83acbbd523 update copyright year
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2072 a592a061-630c-0410-9148-cb99ea01b6c8
2001-05-30 13:53:44 +00:00
Jean-Marc Lasgouttes
cdcb9b2cc0 os:: patch from Ruurd + bindings display fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2005 a592a061-630c-0410-9148-cb99ea01b6c8
2001-05-17 15:11:01 +00:00
Lars Gullik Bjønnes
0b98ee5f2e inherit privately from noncopyable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1926 a592a061-630c-0410-9148-cb99ea01b6c8
2001-04-17 14:00:20 +00:00
Jean-Marc Lasgouttes
399d1b73cf fix stupid typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1906 a592a061-630c-0410-9148-cb99ea01b6c8
2001-04-06 13:32:46 +00:00
Lars Gullik Bjønnes
a27892b6c8 one small private fix in mathed, put noncopyable and tie into boost namespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1774 a592a061-630c-0410-9148-cb99ea01b6c8
2001-03-15 16:04:46 +00:00
Jean-Marc Lasgouttes
bd659b25fb Dekel language/encoding patch + a few fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1096 a592a061-630c-0410-9148-cb99ea01b6c8
2000-10-10 12:36:36 +00:00
Lars Gullik Bjønnes
da003742d9 small patch from Dekel, begin introducing the real boost framework, get rid of the parts of boost that were located in support (block and utility)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1063 a592a061-630c-0410-9148-cb99ea01b6c8
2000-10-02 00:55:02 +00:00
Lars Gullik Bjønnes
797d87b451 make doc++ able to generate the source documentation for lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@956 a592a061-630c-0410-9148-cb99ea01b6c8
2000-08-07 20:58:24 +00:00
Lars Gullik Bjønnes
db47e6bc77 patch from Angus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@944 a592a061-630c-0410-9148-cb99ea01b6c8
2000-08-01 17:33:32 +00:00
Lars Gullik Bjønnes
4d3288c95b more NEW_INSETS changes, define NEW_MANUBAR as default some other changes, read ChangeLog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@915 a592a061-630c-0410-9148-cb99ea01b6c8
2000-07-24 21:49:58 +00:00
Jean-Marc Lasgouttes
4b2a999762 GUI-indep toolbar and menus mostly work !
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@913 a592a061-630c-0410-9148-cb99ea01b6c8
2000-07-24 13:53:19 +00:00
Jean-Marc Lasgouttes
a0911c75d0 Small fixes to compile with compaq cxx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@812 a592a061-630c-0410-9148-cb99ea01b6c8
2000-06-13 10:33:57 +00:00
Jean-Marc Lasgouttes
e9af311f5f New -userdir command line option. A few command line parsing tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@778 a592a061-630c-0410-9148-cb99ea01b6c8
2000-05-29 15:29:50 +00:00