]> git.lyx.org Git - features.git/commitdiff
Today is a sad day, LyXView has passed over... long live GuiView!
authorAbdelrazak Younes <younes@lyx.org>
Tue, 9 Feb 2010 17:06:40 +0000 (17:06 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 9 Feb 2010 17:06:40 +0000 (17:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33393 a592a061-630c-0410-9148-cb99ea01b6c8

14 files changed:
development/scons/scons_manifest.py
src/Buffer.cpp
src/LyX.h
src/Server.cpp
src/frontends/Application.h
src/frontends/LyXView.h [deleted file]
src/frontends/Makefile.am
src/frontends/WorkArea.h
src/frontends/qt4/Dialog.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h
src/frontends/qt4/GuiWorkArea.h

index 0846246f765d422f62a66e520b8270c678504fa6..61161b9533f88f9d0e15373b168305e7f23c50ce 100644 (file)
@@ -653,7 +653,6 @@ src_frontends_header_files = Split('''
     FontMetrics.h
     KeyModifier.h
     KeySymbol.h
-    LyXView.h
     mouse_state.h
     Painter.h
     Selection.h
index c2072f87165704e309c38fba32902c9480809812..b2b0be18365feb273d6208c1a0cd6d6ebaf2649f 100644 (file)
@@ -971,7 +971,7 @@ Buffer::ReadStatus Buffer::readFile(Lexer & lex, FileName const & filename,
 }
 
 
-// Should probably be moved to somewhere else: BufferView? LyXView?
+// Should probably be moved to somewhere else: BufferView? GuiView?
 bool Buffer::save() const
 {
        // We don't need autosaves in the immediate future. (Asger)
index e9843eb39937050b3c47873c0d1808cf2480f3f7..f4b7a62241f5a7bb4e56b9fb3648a31462b8f18e 100644 (file)
--- a/src/LyX.h
+++ b/src/LyX.h
@@ -38,7 +38,6 @@ extern bool use_gui;
 
 namespace frontend {
 class Application;
-class LyXView;
 }
 
 namespace graphics {
@@ -55,9 +54,6 @@ public:
        /// Execute LyX.
        int exec(int & argc, char * argv[]);
 
-       ///
-       frontend::LyXView * newLyXView();
-
 private:
        /// noncopyable
        LyX(LyX const &);
index decea8ba622aed8969fa0e1bbab3563d7784543e..7f514f19b3c1c9ea4505e6df26f93c9db75bb76c 100644 (file)
@@ -1110,7 +1110,7 @@ void Server::callback(string const & msg)
                        // The correct solution would be to have a
                        // specialized (non-gui) BufferView. But how do
                        // we do it now? Probably we should just let it
-                       // connect to the lyxfunc in the single LyXView we
+                       // connect to the lyxfunc in the single GuiView we
                        // support currently. (Lgb)
 
                        FuncRequest const fr(lyxaction.lookupFunc(cmd), arg);
index 763bbeac679eb4a8563dc07b87f424be5f879172..5e1a12cdca33b1a0b835effa94ec519b8bc21c5c 100644 (file)
@@ -39,8 +39,6 @@ namespace frontend {
 
 class Clipboard;
 class FontLoader;
-class Gui;
-class LyXView;
 class Selection;
 
 /// The main application class
@@ -59,7 +57,7 @@ initialisation should be done before the instanciation of this class.
 
  Application (this is the frontend really, should probably be renamed).
    |
-   LyXView-1 (one or more in case of split-view mode).
+   GuiView-1 (one or more in case of split-view mode).
    |  |
    |  <tab-widget-1-1> 
    |  |  |
@@ -77,7 +75,7 @@ initialisation should be done before the instanciation of this class.
    |  |
    |  <tab-widget-1-2> 
    |
-   LyXView-2 (one or more in case of split-view mode).
+   GuiView-2 (one or more in case of split-view mode).
    |  |
    |  <tab-widget-2-1>
    |  |  |
@@ -136,14 +134,14 @@ initialisation should be done before the instanciation of this class.
  - etc.
 
 
- 4) The Window: \c LyXView (and its qt4 specialisation \c GuiView)
+ 4) The Window: \c GuiView
 
  This is a full window containing a menubar, toolbars and a central
- widget. A LyXView is in charge of creating and closing a View for a
+ widget. A GuiView is in charge of creating and closing a View for a
  given Buffer.
  In the qt4 specialisation, \c GuiView, the central widget is a tab
  widget. Each tab is reverved to the visualisation of one Buffer and
- contains one WorkArea. In the qt4 frontend, one LyXView thus contains
+ contains one WorkArea. In the qt4 frontend, one GuiView thus contains
  multiple WorkAreas but this number can limited to one for another
  frontend. The idea is that the kernel should not know how a Buffer
  is displayed on screen; it's the frontend business.
@@ -171,8 +169,6 @@ public:
        Application() {}
        ///
        virtual ~Application() {}
-       ///
-       virtual LyXView * currentWindow() = 0;
 
        /// LyX dispatcher: executes lyx actions and does necessary
        /// screen updates depending on results.
diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h
deleted file mode 100644 (file)
index 49d3619..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*- C++ -*-
-/**
- * \file LyXView.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- * \author John Levon
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef LYXVIEW_H
-#define LYXVIEW_H
-
-#include "support/strfwd.h"
-
-namespace lyx {
-
-namespace support { class FileName; }
-
-class Buffer;
-class BufferView;
-class Cursor;
-class DispatchResult;
-class FuncStatus;
-class FuncRequest;
-class Inset;
-
-namespace frontend {
-
-/**
- * LyXView - main LyX window
- *
- * This class represents the main LyX window and provides
- * accessor functions to its content.
- *
- * The eventual intention is that LyX will support a number
- * of containing LyXViews. Currently a lot of code still
- * relies on there being a single top-level view.
- *
- * Additionally we would like to support multiple views
- * in a single LyXView.
- */
-class LyXView
-{
-public:
-       ///
-       virtual ~LyXView() {}
-
-       /// \name Generic accessor functions
-       //@{
-       /// The current BufferView refers to the BufferView that has the focus,
-       /// including for example the one that is created when you use the
-       /// advanced search and replace pane.
-       /// \return the currently selected buffer view.
-       virtual BufferView * currentBufferView() = 0;
-       virtual BufferView const * currentBufferView() const = 0;
-
-       /// The document BufferView always refers to the view's main document
-       /// BufferView. So, even if the BufferView in e.g., the advanced
-       /// search and replace pane has the focus.
-       /// \return the current document buffer view.
-       virtual BufferView * documentBufferView() = 0;
-       virtual BufferView const * documentBufferView() const = 0;
-       //@}
-
-       /// display a message in the view
-       virtual void message(docstring const &) = 0;
-
-       ///
-       virtual bool getStatus(FuncRequest const & cmd, FuncStatus & flag) = 0;
-       /// dispatch command.
-       /// \return true if the \c FuncRequest has been dispatched.
-       virtual void dispatch(FuncRequest const & cmd, DispatchResult & dr) = 0;
-
-       ///
-       virtual void restartCursor() = 0;
-
-       /// Update the completion popup and the inline completion state.
-       /// If \c start is true, then a new completion might be started.
-       /// If \c keep is true, an active completion will be kept active
-       /// even though the cursor moved. The update flags of \c cur might
-       /// be changed.
-       virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // LYXVIEW_H
index 7dedcda8b6a25bb91bf4079734927376373ea61f..ea0f09793f6272a189b96579ea359be56aaffa36 100644 (file)
@@ -16,7 +16,6 @@ liblyxfrontends_a_SOURCES = \
        Delegates.h \
        KeyModifier.h \
        KeySymbol.h \
-       LyXView.h \
        Painter.h \
        Clipboard.h \
        Selection.h \
index c5aadfef6fb5b944a0e77eb2ce9de78e198cb43f..8e459ca37524f3aa11240b1947f81ca1d4d00591 100644 (file)
@@ -15,7 +15,6 @@
 #define BASE_WORKAREA_H
 
 #include "frontends/KeyModifier.h"
-#include "frontends/LyXView.h"
 
 namespace lyx {
 
index 304cd7d56bdf1a4dc7d12147a86a8ff976722601..1fd0500636d8709d174340d58a3bc3166d006401 100644 (file)
@@ -287,7 +287,7 @@ protected:
 
 private:
        /** The Dialog's name is the means by which a dialog identifies
-        *  itself to the LyXView.
+        *  itself to the GuiView.
         */
        QString const name_;
        ///
index 8d7ce812b145d01060b9c38979b9c7e5a595f5b9..9b205ad09b2e9516a9e7a1de19dba4748959ff42 100644 (file)
@@ -826,12 +826,6 @@ docstring GuiApplication::iconName(FuncRequest const & f, bool unknown)
 }
 
 
-LyXView * GuiApplication::currentWindow() 
-{
-       return current_view_;
-}
-
-
 FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
 {
        FuncStatus flag;
@@ -857,7 +851,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
        switch (cmd.action) {
 
        // This could be used for the no-GUI version. The GUI version is handled in
-       // LyXView::getStatus(). See above.
+       // GuiView::getStatus(). See above.
        /*
        case LFUN_BUFFER_WRITE:
        case LFUN_BUFFER_WRITE_AS: {
@@ -1082,7 +1076,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
 
 void GuiApplication::gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer)
 {
-       LyXView * lv = current_view_;
+       GuiView * lv = current_view_;
        LASSERT(lv, /**/);
        if (!theSession().bookmarks().isValid(idx))
                return;
@@ -1551,7 +1545,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        if (lv == 0)
                return;
 
-       // Let the current LyXView dispatch its own actions.
+       // Let the current GuiView dispatch its own actions.
        lv->dispatch(cmd, dr);
        if (dr.dispatched() && lv )
                return;
index bc4cc17754807d5b94559d8248397a6051e67842..5355f9bd85e2592e4564a95b4c09c2b81af6dbf2 100644 (file)
@@ -33,7 +33,6 @@ class KeySymbol;
 namespace frontend {
 
 class GuiView;
-class LyXView;
 class GlobalMenuBar;
 class GuiWorkArea;
 class Menus;
@@ -61,7 +60,6 @@ public:
        void dispatch(FuncRequest const &);
        void dispatch(FuncRequest const &, DispatchResult & dr);
        FuncStatus getStatus(FuncRequest const & cmd) const;
-       LyXView * currentWindow();
        void dispatchDelayed(FuncRequest const &);
        void resetGui();
        void restoreGuiSession();
@@ -161,7 +159,7 @@ private:
        ///
        void setGuiLanguage();
 
-       /// This LyXView is the one receiving Clipboard and Selection
+       /// This GuiView is the one receiving Clipboard and Selection
        /// events
        GuiView * current_view_;
 
index 110ce63f111666b779fd977d6cb5459fe08eb86a..5b3b72d6bc4fd7f45cc61ebc0590e73fe2a20c73 100644 (file)
@@ -3272,7 +3272,7 @@ bool isValidName(string const & name)
 
 void GuiView::resetDialogs()
 {
-       // Make sure that no LFUN uses any LyXView.
+       // Make sure that no LFUN uses any GuiView.
        guiApp->setCurrentView(0);
        saveLayout();
        menuBar()->clear();
index 6b1416e34152a1983dbe7ace2e0bf19bf2164389..b77c3ad131577bcad5f8926a0ef3d142bf175915 100644 (file)
@@ -16,7 +16,6 @@
 #define GUI_VIEW_H
 
 #include "frontends/Delegates.h"
-#include "frontends/LyXView.h"
 
 #include "support/strfwd.h"
 
@@ -31,7 +30,15 @@ class QShowEvent;
 
 namespace lyx {
 
+namespace support { class FileName; }
+
+class Buffer;
+class BufferView;
 class Cursor;
+class DispatchResult;
+class FuncStatus;
+class FuncRequest;
+class Inset;
 
 namespace frontend {
 
@@ -44,15 +51,16 @@ class TocModels;
 class ToolbarInfo;
 
 /**
- * GuiView - Qt4 implementation of LyXView
+ * GuiView - Qt4 main LyX window
  *
- * qt4-private implementation of the main LyX window.
+ * This class represents the main LyX window and provides
+ * accessor functions to its content.
  *
  * Note: a QObject emits a destroyed(QObject *) Qt signal when it
  * is deleted. This might be useful for closing other dialogs
  * depending on a given GuiView.
  */
-class GuiView : public QMainWindow, public LyXView, public GuiBufferViewDelegate,
+class GuiView : public QMainWindow, public GuiBufferViewDelegate,
        public GuiBufferDelegate
 {
        Q_OBJECT
@@ -62,28 +70,50 @@ public:
 
        ~GuiView();
 
-       /// \name LyXView inherited methods.
-       //@{
        int id() const { return id_; }
+
        void setBusy(bool);
+
+       /// \name Generic accessor functions
+       //@{
+       /// The current BufferView refers to the BufferView that has the focus,
+       /// including for example the one that is created when you use the
+       /// advanced search and replace pane.
+       /// \return the currently selected buffer view.
        BufferView * currentBufferView();
        BufferView const * currentBufferView() const;
+
+       /// The document BufferView always refers to the view's main document
+       /// BufferView. So, even if the BufferView in e.g., the advanced
+       /// search and replace pane has the focus.
+       /// \return the current document buffer view.
        BufferView * documentBufferView();
        BufferView const * documentBufferView() const;
+
        void newDocument(std::string const & filename,
                bool fromTemplate);
 
+       /// display a message in the view
        /// could be called from any thread
        void message(docstring const &);
        /// must be called from GUI thread
        void updateMessage(QString const & str);
 
        bool getStatus(FuncRequest const & cmd, FuncStatus & flag);
+       /// dispatch command.
+       /// \return true if the \c FuncRequest has been dispatched.
        void dispatch(FuncRequest const & cmd, DispatchResult & dr);
+
        void restartCursor();
+       /// Update the completion popup and the inline completion state.
+       /// If \c start is true, then a new completion might be started.
+       /// If \c keep is true, an active completion will be kept active
+       /// even though the cursor moved. The update flags of \c cur might
+       /// be changed.
        void updateCompletion(Cursor & cur, bool start, bool keep);
+
+       ///
        void setFocus();
-       //@}
 
        ///
        void focusInEvent(QFocusEvent * e);
index 4ec0af11a9fbd320b0bea301543a3b64563d9f06..d4a081898f30a7dc52ac8636450199f20fd75250 100644 (file)
@@ -117,7 +117,7 @@ public:
        void setGuiView(GuiView &);
        ///
        void setFullScreen(bool full_screen);
-       /// is LyXView in fullscreen mode?
+       /// is GuiView in fullscreen mode?
        bool isFullScreen();
        ///
        void scheduleRedraw() { schedule_redraw_ = true; }