- execBatchCommands(): split in loadFiles() and execBatchCommands().
- exec(): enable batch command to be processed from GUI.
* Application:
- start(): deleted.
* GuiApplication:
- execBatchCommands(): new method
* GuiWorkArea::update(): call viewport()->repaint() instead of viewport()->update(), this enable to update the screen immediately when asked by a batch command.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16051 a592a061-630c-0410-9148-cb99ea01b6c8
- merge exec() and priv_exec()
- LyX constructor is now public.
- there is no global singleton_ object anymore, only a pointer.
- IconvProcessor(): new utf8 to ucs4 convertor.
* main.C: instantiate a LyX object and exec() it. No more use of static methods.
* docstring.C: use utf8ToUcs4() instead of a static variable.
* unicode.h: declare extern utf8ToUcs4().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15967 a592a061-630c-0410-9148-cb99ea01b6c8
* qt4/Alert_pimpl.C: make sure the proper Qt attributes are set.
* GuiApplication::quitLyx(): add the "force" argument to the funcRequest.
* GuiImplementation:
- GuiImplementation(): remove the signal connection. This was triggered after the LastWindowClosed signal so was not useful.
- cleanupViews(): renamed to unregisterView() and handle the WorkAreas as well.
- closeAll(): new method (from LyXView).
* GuiView.C
- clean up the includes order.
- closeEvent(): make sure that theBufferList().quitWriteAll() is called if last window closed.
* lyx_main.C / LyX::quit():
- remove noAsk argument
- delete bufferList::quitWriteAll() call (this is handled in the frontend).
- delete Session stuff (ditto)
* LyXFunc::dispatch()
- LFUN_LYX_EXIT: close all window before exiting from user command (as opposed to last window closed).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15535 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXFunc:
- dispatch(): transfer assertion on lyx_view_ to each LFUN on a case by case basis.
- dispatch(): new LFUN_WINDOW_CLOSE
- getStatus(): special treatment for LFUN_LYX_QUIT
* LyX:
- views_, addLyXView(): deleted
- quit(): call saveGeometry() on each LyXView before exiting.
* GuiApplication:
- is now a QObject.
- quitLyX(): new Qt slot for lastWindowClosed signal.
* Gui.h:
- destroyView(), destroyWorkArea(): deleted
- viewIds(): new method
* GuiImplementation:
- implement above changes.
- GuiImplementation is now a QObject
- cleanupViews(): new private slot.
- buildViewIds(): new helper method
- views_ and work_areas_ are now maps of raw pointers instead of schared_ptr.
* LyXView
- now stores its id.
- dispatch(): special treatment for LFUN_WINDOW_CLOSE.
- workAreaIds(): new method.
- close(): new pure virtual method.
- saveGeometry(): new pure virtual method.
* GuiView:
- implements above changes.
- GuiView(): set WA_DeleteOnClose and Qt::WA_QuitOnClose to let Qt manage the destruction on close().
- closeEvent(): session stuff transfered to saveGeometry()
* WorkArea
- now store its id.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15514 a592a061-630c-0410-9148-cb99ea01b6c8
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
* 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
* 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
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
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
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