Commit Graph

60 Commits

Author SHA1 Message Date
Abdelrazak Younes
6186965651 Get rid of Application::initGlobalMenu().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24896 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-23 08:57:41 +00:00
André Pönitz
209b04eaa9 remove InsetWrapMailer class
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23991 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-27 00:07:54 +00:00
Stefan Schimanski
d63821939c * create global menubar on Mac without a parent. It will be shown if no GuiView exists.
* fill global menubar with the normal actions
* capture the keyboard on the menubar if no GuiView exists. This
  enables the shortcuts on Mac in those cases.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23731 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 23:25:11 +00:00
André Pönitz
4b12782854 merge MenuBackend into frontend/Menus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23527 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 00:21:23 +00:00
André Pönitz
e13cc7e90d start moving MenuBackend to the frontend
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23523 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 21:50:27 +00:00
Abdelrazak Younes
7144d5b382 doc update.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23066 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 12:42:49 +00:00
Abdelrazak Younes
8d99df0c93 Transfer some GUI oriented code from core to frontend.
* 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
2008-02-06 23:02:57 +00:00
Abdelrazak Younes
518871a52b Don't pretend we have multiple menu backends: transfer the singleton to GuiApplication.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22303 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-25 22:27:32 +00:00
Abdelrazak Younes
1133419a59 Cleanup LyXFunc::dispatch() following JMarc advice.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21797 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 14:36:50 +00:00
Abdelrazak Younes
49051b32ea Remove unused pure virtual method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21774 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:18:23 +00:00
Abdelrazak Younes
94c0fc55de Getting rid of Application::createView()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21760 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 08:51:11 +00:00
Abdelrazak Younes
662b5dba03 Introducing Application::getStatus() and Application::dispatch(). Transferring some LFUNs to those.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21759 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 07:58:12 +00:00
Abdelrazak Younes
d4b02ad711 simplify window creation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21735 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 09:56:33 +00:00
Abdelrazak Younes
8460c9a072 Introducing Application::resetGui() that will reset all dialogs in all lyx windows (including toolbars and menubars).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21689 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-21 15:12:47 +00:00
Abdelrazak Younes
359ced5e65 Transfer some LFUNs from LyXFunc to GuiView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21681 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-19 20:56:05 +00:00
Abdelrazak Younes
1b147f12b0 Spoiling some fun from Andre': put Application on a diet and remove unnecessary string conversions and method indirections.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21665 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 20:36:52 +00:00
André Pönitz
719a7beb48 make Application slimmer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21659 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 22:37:33 +00:00
André Pönitz
12f435035a move view_ids from Application to GuiApplication
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21658 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 22:25:42 +00:00
André Pönitz
d837643c95 make frontend::Application a bit slimmer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21657 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 22:11:11 +00:00
André Pönitz
1005c166c2 merge frontend::Gui and frontend::Application
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21656 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 20:47:50 +00:00
André Pönitz
72e3177e3d shuffle some code around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21636 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 22:30:16 +00:00
Abdelrazak Younes
79e12182cb cosmetics and comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21630 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 19:46:30 +00:00
Abdelrazak Younes
e5eabfe067 Transfer geometry related session code from LyX::newLyXView() to GuiView::setGeometry().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21606 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-14 13:56:13 +00:00
André Pönitz
0ee7c6e283 remove #includes; cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21588 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 23:00:36 +00:00
Abdelrazak Younes
12ecafd76e Transfer createView() from Application to GuiApplication and get rid of LyXView::setGeometry() pure virtual interface. The goal is to switch to Qt session handling for geometry instead of our own house made one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21585 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 15:29:15 +00:00
André Pönitz
f4e883c475 use strfwd when appropriate
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-08 21:52:09 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
André Pönitz
150b11e953 Why would boost::array<Bullet, 4> be better than Bullet[4]?
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20301 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 23:04:28 +00:00
André Pönitz
50de85396c some remnaming
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20298 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 20:31:50 +00:00
André Pönitz
d348b0183b Rename class socket_callback into SocketCallback; adjust buidl systems;
prevent double deletion of socket notifier


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20296 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 17:47:35 +00:00
Abdelrazak Younes
1356543c45 The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
* 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
2007-08-21 07:33:46 +00:00
Abdelrazak Younes
32268e2632 cosmetics + move frontends/* to frontend namespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19553 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-14 09:54:59 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
André Pönitz
5008ee540f rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 17:34:20 +00:00
Peter Kümmel
38cdcd70c1 fix bug: vert. maximized window is completely maximized after restart
src/frontends/Application.h : enum for maximized
src/frontends/LyXView.h     : enum for maximized
src/frontends/qt4/GuiView.h : enum for maximized
src/frontends/Application.C : enum for maximized
src/lyx_main.C              : enum for maximized
src/frontends/qt4/GuiView.C : restore complete, vert. hor. maximized window



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17463 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-17 12:28:26 +00:00
Abdelrazak Younes
c6e4985a07 * GuiApplication::x11EventFilter(): check for currentView() before using it.
* Application::currentView(): now returns a pointer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16170 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 13:52:02 +00:00
Peter Kümmel
7b2cce9d5d Clean up quit code.
We still need a solution for the Mac.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16135 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 17:39:31 +00:00
Peter Kümmel
67f2a91dcc FIXME: remove global variable theApp
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
2006-11-30 00:04:51 +00:00
Peter Kümmel
1000b8d218 Fix crash on Mac, now the strange part
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
2006-11-29 21:36:39 +00:00
Peter Kümmel
9dfe4a10d3 also support the geometry option on Windows + Qt/Windows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16105 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 16:45:38 +00:00
Peter Kümmel
c7a3620eeb fix wrong toolbar icon size, default value is
in lyx_main.C. Size will be stored in the session
file.

*      src/lyx_main.C              : default value
*      src/frontends/Application.h : restore also icon size
*      src/frontends/LyXView.h     :        "
*      src/frontends/qt4/GuiView.h :        "
*      src/frontends/qt4/GuiView.C :        "
*      src/frontends/Application.C :        "



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16085 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-27 23:35:43 +00:00
Abdelrazak Younes
e6a6548712 * lyx_main.[Ch]
- 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
2006-11-26 02:18:32 +00:00
Abdelrazak Younes
d67e506396 comment clarification.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16010 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-22 14:37:18 +00:00
Abdelrazak Younes
1a0fdcc09f Some documentation on how the MVC separation is achieved in LyX.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16005 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-21 10:37:52 +00:00
Abdelrazak Younes
c2a49b5b0d * Application:
- 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
2006-11-07 17:19:33 +00:00
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