* Application/GuiApplication:
- restoreGuiSession(): new method for session restoration.
* LyXView/GuiView
- loadDocument(): new pure virtual interface
* lyxFunc:
- loadAndViewFile(): transfered to GuiView::loadDocument()
- openDocument(): transfered to GuiView.
* LyX.h
- Impl::files_to_load_ : now a simple vector<string>.
- restoreGuiSession(): removed.
- execBatchCommands(): simplified and make use of Application::restoreGuiSession().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22816 a592a061-630c-0410-9148-cb99ea01b6c8
* Buffer:
- get rid of cursor_ and anchor_
- ~Buffer(): update the labels of its master buffer before closing
- closing(): pass the Buffer address.
* BufferView():
- BufferView(): needs a valid Buffer (should be const in the future.
- most of the change is about removing all test of buffer_ nullity.
- resize(): deleted.
- setBuffer(): deleted.
* Application:
- newLyXView(): simplification
- updated design description in Application.h
* Gui/GuiImplementation: remove all WorkAreas and BufferView creation/Deletion. Workareas are directly handled by LyXView/GuiView and BufferView is created/delete by WorkArea.
* LyXView/GuiView: implement the new design
What is not working yet:
- the close tab button: it is implemented but does not show up.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19686 a592a061-630c-0410-9148-cb99ea01b6c8
This pointer was one reason for the Mac crashes because it not always had
the same value as the application_ smart pointer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16119 a592a061-630c-0410-9148-cb99ea01b6c8
Part 2: avoid pure virtual function,
if (theApp)
theApp->unregisterSocketCallback(fd_);
does not help, we've tested it!
Without a Mac it is hard to find a better solution
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16110 a592a061-630c-0410-9148-cb99ea01b6c8
- 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
- setBufferView(): deleted
- currentView(), setCurrentView(): new method to set the current LyXView
* GuiApplication::x11EventFilter(): use currentView().view() to get the current BufferView. This should solves the X11 selection bug.
* WorkArea:
- dispatch(): redraw only if needRedraw in preparation for the painting optimization patch. Show the cursor immediately on mouse click.
- setBufferView(): remove call to Application::setBufferView()
* GuiWorkArea:
- focusInEvent(): update only if we changed LyXView
- focusInEvent(): stop the cursor only if we changed LyXView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15783 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
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
* 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
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
* 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