]> git.lyx.org Git - features.git/commitdiff
Push latest Andre's changes toward their true direction:
authorAbdelrazak Younes <younes@lyx.org>
Tue, 13 Nov 2007 09:52:28 +0000 (09:52 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 13 Nov 2007 09:52:28 +0000 (09:52 +0000)
* WorkArea.h and LyXView.h: remove unneeded pure virtual interface.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21575 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/frontends/Application.cpp
src/frontends/LyXView.h
src/frontends/WorkArea.h
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiErrorList.cpp
src/frontends/qt4/GuiSpellchecker.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/GuiWorkArea.h

index ce6df25bcc8f1715441fe7cdaabaa556ba0a9ba7..04b68a03dd0e243eadcbbaa786072a00786f796e 100644 (file)
@@ -83,7 +83,6 @@
 #include "frontends/KeySymbol.h"
 #include "frontends/LyXView.h"
 #include "frontends/Selection.h"
-#include "frontends/WorkArea.h"
 
 #include "support/environment.h"
 #include "support/FileFilterList.h"
@@ -186,7 +185,7 @@ bool import(LyXView * lv, FileName const & filename,
                }
                updateLabels(*buf);
                lv->setBuffer(buf);
-               lv->showErrorList("Parse");
+               lv->errors("Parse");
        } else {
                Buffer * const b = newFile(lyxfile.absFilename(), string(), true);
                if (b)
@@ -384,17 +383,6 @@ void LyXFunc::gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer)
 }
 
 
-namespace {
-void restartCursor(LyXView * lv)
-{
-       /* When we move around, or type, it's nice to be able to see
-        * the cursor immediately after the keypress.
-        */
-       if (lv && lv->currentWorkArea())
-               lv->currentWorkArea()->startBlinkingCursor();
-}
-}
-
 void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
 {
        LYXERR(Debug::KEY) << "KeySym is " << keysym.getSymbolName() << endl;
@@ -403,13 +391,13 @@ void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
        if (!keysym.isOK()) {
                LYXERR(Debug::KEY) << "Empty kbd action (probably composing)"
                                   << endl;
-               restartCursor(lyx_view_);
+               lyx_view_->restartCursor();
                return;
        }
 
        if (keysym.isModifier()) {
                LYXERR(Debug::KEY) << "isModifier true" << endl;
-               restartCursor(lyx_view_);
+               lyx_view_->restartCursor();
                return;
        }
 
@@ -479,7 +467,7 @@ void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
                } else {
                        LYXERR(Debug::KEY) << "Unknown, !isText() - giving up" << endl;
                        lyx_view_->message(_("Unknown function."));
-                       restartCursor(lyx_view_);
+                       lyx_view_->restartCursor();
                        return;
                }
        }
@@ -496,7 +484,7 @@ void LyXFunc::processKeySym(KeySymbol const & keysym, KeyModifier state)
                dispatch(func);
        }
 
-       restartCursor(lyx_view_);
+       lyx_view_->restartCursor();
 }
 
 
@@ -1292,7 +1280,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        if (buf) {
                                updateLabels(*buf);
                                lyx_view_->setBuffer(buf);
-                               lyx_view_->showErrorList("Parse");
+                               lyx_view_->errors("Parse");
                        }
                        updateFlags = Update::None;
                        break;
@@ -1438,7 +1426,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        lyx_view_->setBuffer(buf);
                        view()->setCursorFromRow(row);
                        if (loaded)
-                               lyx_view_->showErrorList("Parse");
+                               lyx_view_->errors("Parse");
                        updateFlags = Update::FitCursor;
                        break;
                }
@@ -1654,7 +1642,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                updateLabels(*child->masterBuffer());
                                lyx_view_->setBuffer(child);
                                if (parsed)
-                                       lyx_view_->showErrorList("Parse");
+                                       lyx_view_->errors("Parse");
                        }
 
                        // If a screen update is required (in case where auto_open is false), 
@@ -2272,7 +2260,7 @@ void LyXFunc::open(string const & fname)
        if (buf) {
                updateLabels(*buf);
                lyx_view_->setBuffer(buf);
-               lyx_view_->showErrorList("Parse");
+               lyx_view_->errors("Parse");
                str2 = bformat(_("Document %1$s opened."), disp_fn);
        } else {
                str2 = bformat(_("Could not open document %1$s"), disp_fn);
@@ -2387,7 +2375,7 @@ void LyXFunc::reloadBuffer()
        if (buf) {
                updateLabels(*buf);
                lyx_view_->setBuffer(buf);
-               lyx_view_->showErrorList("Parse");
+               lyx_view_->errors("Parse");
                str = bformat(_("Document %1$s reloaded."), disp_fn);
        } else {
                str = bformat(_("Could not reload document %1$s"), disp_fn);
index 06b5af18abf6b867e9ebc79f10703f6560d96a0d..ec010f4df8aa51bbe2e666d485c16ed31a1d3684 100644 (file)
@@ -18,7 +18,6 @@
 #include "frontends/FontMetrics.h"
 #include "frontends/Gui.h"
 #include "frontends/LyXView.h"
-#include "frontends/WorkArea.h"
 
 #include "FuncRequest.h"
 #include "FuncStatus.h"
index 51008ea6fd35bb4e6aee7fd3145ee19142a960f7..06d46ee1dcae2b3c1144bc85d3b0824adab94de4 100644 (file)
@@ -31,7 +31,6 @@ class ToolbarInfo;
 namespace frontend {
 
 class Dialogs;
-class WorkArea;
 
 /**
  * LyXView - main LyX window
@@ -53,7 +52,7 @@ public:
        ///
        LyXView(int id) : id_(id) {}
        ///
-       virtual ~LyXView();
+       virtual ~LyXView() {}
        ///
        int id() const { return id_; }
        ///
@@ -61,20 +60,6 @@ public:
        ///
        virtual void setFocus() = 0;
 
-       ///
-       virtual WorkArea * workArea(Buffer & buffer) = 0;
-       ///
-       virtual WorkArea * addWorkArea(Buffer & buffer) = 0;
-       ///
-       virtual void setCurrentWorkArea(WorkArea * work_area) = 0;
-       ///
-       virtual void removeWorkArea(WorkArea * work_area) = 0;
-       /// return the current WorkArea (the one that has the focus).
-       virtual WorkArea const * currentWorkArea() const = 0;
-       /// FIXME: This non-const access is needed because of
-       /// a mis-designed \c ControlSpellchecker.
-       virtual WorkArea * currentWorkArea() = 0;
-
        /**
         * This is called after the concrete view has been created.
         * We have to have the toolbar and the other stuff created
@@ -98,9 +83,6 @@ public:
                unsigned int iconSizeXY,
                const std::string & geometryArg) = 0;
 
-       /// save the geometry state in the session manager.
-       virtual void saveGeometry() = 0;
-
        /// show busy cursor
        virtual void setBusy(bool) = 0;
 
@@ -152,9 +134,6 @@ public:
        /// clear any temporary message and replace with current status
        virtual void clearMessage() = 0;
 
-       /// reset autosave timer
-       virtual void resetAutosaveTimer() = 0;
-
        /// dispatch to current BufferView
        virtual void dispatch(FuncRequest const & cmd) = 0;
 
@@ -166,28 +145,14 @@ public:
        /// returns true if this view has the focus.
        virtual bool hasFocus() const = 0;
 
-       /// show the error list to the user
-       virtual void showErrorList(std::string const &) = 0;
 
+       ///
+       virtual void restartCursor() = 0;
        
        //
        // GuiBufferDelegate
        //
-       /// This function is called when the buffer structure is changed.
-       virtual void structureChanged() = 0;
-       /// This function is called when some parsing error shows up.
-       void errors(std::string const & err) { showErrorList(err); }
-       /// Reset autosave timers for all users.
-       void resetAutosaveTimers() { resetAutosaveTimer(); }
-
-       /// connect to signals in the given BufferView
-       virtual void connectBufferView(BufferView & bv) = 0;
-       /// disconnect from signals in the given BufferView
-       virtual void disconnectBufferView() = 0;
-       /// connect to signals in the given buffer
-       virtual void connectBuffer(Buffer & buf) = 0;
-       /// disconnect from signals in the given buffer
-       virtual void disconnectBuffer() = 0;
+       virtual void errors(std::string const &) = 0;
 
 private:
        /// noncopyable
index b4d9f9ee199b249ae3f44841fdbebe79faf7b9fd..eef1d018f574a578c2c6f0e1c6b2d98f33e5a318 100644 (file)
@@ -36,41 +36,10 @@ public:
        ///
        WorkArea() {}
        ///
-       virtual ~WorkArea();
-
-       ///
-       virtual BufferView & bufferView() = 0;
-       ///
-       virtual BufferView const & bufferView() const = 0;
-
-       /// return true if has the keyboard input focus.
-       virtual bool hasFocus() const = 0;
-
-       /// return true if has this WorkArea is visible.
-       virtual bool isVisible() const = 0;
-
-       /// return the width of the work area in pixels
-       virtual int width() const = 0;
-
-       /// return the height of the work area in pixels
-       virtual int height() const = 0;
-
-       /**
-        * Update the scrollbar.
-        * @param height the total document height in pixels
-        * @param pos the current position in the document, in pixels
-        * @param line_height the line-scroll amount, in pixels
-        */
-       virtual void setScrollbarParams(int height, int pos, int line_height) = 0;
-
-       ///
-       virtual void scheduleRedraw() = 0;
+       virtual ~WorkArea() {}
 
        /// redraw the screen, without using existing pixmap
        virtual void redraw() = 0;
-       ///
-       virtual void stopBlinkingCursor() = 0;
-       virtual void startBlinkingCursor() = 0;
 
        /// Process Key pressed event.
        /// This needs to be public because it is accessed externally by GuiView.
index f095f5c0af6b1090c756096fe6972a7f2b1d28a0..a1617053b2306873701b15ad9c08a341bf909b03 100644 (file)
 #include "TextClassList.h"
 #include "Validator.h"
 
-
-// FIXME: those two headers are needed because of the
-// WorkArea::redraw() call below.
-#include "frontends/LyXView.h"
-#include "frontends/WorkArea.h"
-
 #include "insets/InsetListingsParams.h"
 
 #include "support/lstrings.h"
index e9d213443aef9144d59fa4497174f5fdc7255979..54a035f006fa4302362ea02d850b624f20c41a44 100644 (file)
 
 #include "qt_helpers.h"
 
-// FIXME: those two headers are needed because of the
-// WorkArea::redraw() call below.
-#include "frontends/LyXView.h"
-#include "frontends/WorkArea.h"
-
 #include "support/lstrings.h"
 
 #include <QListWidget>
index 45359ca18260cebcdb9ad8f4906489e0802a800e..f942304e08894afda4c27515d0be3da1372ed60b 100644 (file)
 #endif
 
 #include "frontends/alert.h"
-// FIXME: those two headers are needed because of the
-// WorkArea::redraw() call below.
-#include "frontends/LyXView.h"
-#include "frontends/WorkArea.h"
 
 using std::advance;
 using std::distance;
index 857b736913d9a10ab13aab0911a7b9f826a4b425..f29bbdceb008af7f568043b7ad5c2a3a4ed80757 100644 (file)
@@ -22,7 +22,6 @@
 #include "GuiToolbar.h"
 #include "GuiToolbars.h"
 #include "Dialogs.h"
-#include "WorkArea.h"
 #include "Gui.h"
 
 #include "qt_helpers.h"
@@ -30,7 +29,6 @@
 #include "frontends/Application.h"
 #include "frontends/Dialogs.h"
 #include "frontends/Gui.h"
-#include "frontends/WorkArea.h"
 
 #include "support/filetools.h"
 #include "support/convert.h"
@@ -270,10 +268,6 @@ public:
 unsigned int GuiView::GuiViewPrivate::lastIconSize = 0;
 
 
-/// FIXME
-LyXView::~LyXView() {}
-
-
 GuiView::GuiView(int id)
        : QMainWindow(), LyXView(id),
          d(*new GuiViewPrivate),
@@ -869,7 +863,7 @@ GuiToolbar * GuiView::makeToolbar(ToolbarInfo const & tbinfo, bool newline)
 }
 
 
-WorkArea * GuiView::workArea(Buffer & buffer)
+GuiWorkArea * GuiView::workArea(Buffer & buffer)
 {
        for (int i = 0; i != d.splitter_->count(); ++i) {
                GuiWorkArea * wa = d.tabWorkArea(i)->workArea(buffer);
@@ -880,7 +874,7 @@ WorkArea * GuiView::workArea(Buffer & buffer)
 }
 
 
-WorkArea * GuiView::addWorkArea(Buffer & buffer)
+GuiWorkArea * GuiView::addWorkArea(Buffer & buffer)
 {
        GuiWorkArea * wa = new GuiWorkArea(buffer, *this);
        wa->setUpdatesEnabled(false);
@@ -912,19 +906,19 @@ void GuiView::addTabWorkArea()
 }
 
 
-WorkArea * GuiView::currentWorkArea()
+GuiWorkArea * GuiView::currentWorkArea()
 {
        return d.current_work_area_;
 }
 
 
-WorkArea const * GuiView::currentWorkArea() const
+GuiWorkArea const * GuiView::currentWorkArea() const
 {
        return d.current_work_area_;
 }
 
 
-void GuiView::setCurrentWorkArea(WorkArea * work_area)
+void GuiView::setCurrentWorkArea(GuiWorkArea * work_area)
 {
        BOOST_ASSERT(work_area);
 
@@ -941,7 +935,7 @@ void GuiView::setCurrentWorkArea(WorkArea * work_area)
 }
 
 
-void GuiView::removeWorkArea(WorkArea * work_area)
+void GuiView::removeWorkArea(GuiWorkArea * work_area)
 {
        BOOST_ASSERT(work_area);
        GuiWorkArea * gwa = static_cast<GuiWorkArea *>(work_area);
@@ -962,7 +956,7 @@ void GuiView::removeWorkArea(WorkArea * work_area)
                        // Not found in this tab group.
                        continue;
 
-               // We found and removed the WorkArea.
+               // We found and removed the GuiWorkArea.
                if (twa->count()) {
                        // No more WorkAreas in this tab group, so delete it.
                        delete twa;
@@ -970,10 +964,10 @@ void GuiView::removeWorkArea(WorkArea * work_area)
                }
 
                if (d.current_work_area_)
-                       // This means that we are not closing the current WorkArea;
+                       // This means that we are not closing the current GuiWorkArea;
                        break;
 
-               // Switch to the next WorkArea in the found TabWorkArea.
+               // Switch to the next GuiWorkArea in the found TabWorkArea.
                d.current_work_area_ = twa->currentWorkArea();
                break;
        }
@@ -1072,18 +1066,16 @@ void GuiView::toggleToolbarState(string const & name, bool allowauto)
 
 Buffer * GuiView::buffer()
 {
-       WorkArea * work_area = currentWorkArea();
-       if (work_area)
-               return &work_area->bufferView().buffer();
+       if (d.current_work_area_)
+               return &d.current_work_area_->bufferView().buffer();
        return 0;
 }
 
 
 Buffer const * GuiView::buffer() const
 {
-       WorkArea const * work_area = currentWorkArea();
-       if (work_area)
-               return &work_area->bufferView().buffer();
+       if (d.current_work_area_)
+               return &d.current_work_area_->bufferView().buffer();
        return 0;
 }
 
@@ -1093,7 +1085,7 @@ void GuiView::setBuffer(Buffer * newBuffer)
        BOOST_ASSERT(newBuffer);
        setBusy(true);
 
-       WorkArea * wa = workArea(*newBuffer);
+       GuiWorkArea * wa = workArea(*newBuffer);
        if (wa == 0) {
                updateLabels(*newBuffer->masterBuffer());
                wa = addWorkArea(*newBuffer);
@@ -1122,7 +1114,7 @@ Buffer * GuiView::loadLyXFile(FileName const & filename, bool tolastfiles)
                return 0;
        }
 
-       WorkArea * wa = workArea(*newBuffer);
+       GuiWorkArea * wa = workArea(*newBuffer);
        if (wa == 0)
                wa = addWorkArea(*newBuffer);
 
@@ -1151,8 +1143,8 @@ void GuiView::connectBuffer(Buffer & buf)
 
 void GuiView::disconnectBuffer()
 {
-       if (WorkArea * work_area = currentWorkArea())
-               work_area->bufferView().setGuiDelegate(0);
+       if (d.current_work_area_)
+               d.current_work_area_->bufferView().setGuiDelegate(0);
 }
 
 
@@ -1164,12 +1156,12 @@ void GuiView::connectBufferView(BufferView & bv)
 
 void GuiView::disconnectBufferView()
 {
-       if (WorkArea * work_area = currentWorkArea())
-               work_area->bufferView().setGuiDelegate(0);
+       if (d.current_work_area_)
+               d.current_work_area_->bufferView().setGuiDelegate(0);
 }
 
 
-void GuiView::showErrorList(string const & error_type)
+void GuiView::errors(string const & error_type)
 {
        ErrorList & el = buffer()->errorList(error_type);
        if (!el.empty())
@@ -1205,8 +1197,7 @@ void GuiView::updateDialog(string const & name, string const & data)
 
 BufferView * GuiView::view()
 {
-       WorkArea * wa = currentWorkArea();
-       return wa ? &wa->bufferView() : 0;
+       return d.current_work_area_ ? &d.current_work_area_->bufferView() : 0;
 }
 
 
@@ -1231,7 +1222,7 @@ void GuiView::autoSave()
 }
 
 
-void GuiView::resetAutosaveTimer()
+void GuiView::resetAutosaveTimers()
 {
        if (lyxrc.autosave)
                autosave_timeout_->restart();
@@ -1254,15 +1245,23 @@ void GuiView::dispatch(FuncRequest const & cmd)
 
 Buffer const * GuiView::updateInset(Inset const * inset)
 {
-       WorkArea * work_area = currentWorkArea();
-       if (!work_area)
+       if (!d.current_work_area_)
                return 0;
 
-       if (inset) {
-               BOOST_ASSERT(work_area);
-               work_area->scheduleRedraw();
-       }
-       return &work_area->bufferView().buffer();
+       if (inset)
+               d.current_work_area_->scheduleRedraw();
+
+       return &d.current_work_area_->bufferView().buffer();
+}
+
+
+void GuiView::restartCursor()
+{
+       /* When we move around, or type, it's nice to be able to see
+        * the cursor immediately after the keypress.
+        */
+       if (d.current_work_area_)
+               d.current_work_area_->startBlinkingCursor();
 }
 
 } // namespace frontend
index 2c4daad81c4e1cdc13736aea3ea98f46dc827d6c..95d34fb5fdf89796e290580e7417e95a0b467897 100644 (file)
@@ -65,6 +65,7 @@ public:
                int maximized,
                unsigned int iconSizeXY,
                const std::string & geometryArg);
+       /// save the geometry state in the session manager.
        virtual void saveGeometry();
        virtual void setBusy(bool);
        /// add toolbar, if newline==true, add a toolbar break before the toolbar
@@ -122,6 +123,8 @@ public Q_SLOTS:
        void bigSizedIcons();
 
 private:
+       friend GuiWorkArea;
+
        /// make sure we quit cleanly
        virtual void closeEvent(QCloseEvent * e);
        ///
@@ -131,31 +134,39 @@ private:
 
        /// \return the \c Workarea associated to \p  Buffer
        /// \retval 0 if no \c WorkArea is found.
-       WorkArea * workArea(Buffer & buffer);
+       GuiWorkArea * workArea(Buffer & buffer);
 
        /// Add a \c WorkArea 
        /// \return the \c Workarea associated to \p  Buffer
        /// \retval 0 if no \c WorkArea is found.
-       WorkArea * addWorkArea(Buffer & buffer);
-       void setCurrentWorkArea(WorkArea * work_area);
-       void removeWorkArea(WorkArea * work_area);
-       WorkArea const * currentWorkArea() const;
-       WorkArea * currentWorkArea();
-
+       GuiWorkArea * addWorkArea(Buffer & buffer);
        ///
-       void resetAutosaveTimer();
-       ///
-       void showErrorList(std::string const & error_type);
+       void setCurrentWorkArea(GuiWorkArea * work_area);
        ///
+       void removeWorkArea(GuiWorkArea * work_area);
+       /// return the current WorkArea (the one that has the focus).
+       GuiWorkArea const * currentWorkArea() const;
+       /// FIXME: This non-const access is needed because of
+       /// a mis-designed \c ControlSpellchecker.
+       GuiWorkArea * currentWorkArea();
+
+       /// GuiBufferDelegate.
+       ///@{
+       void resetAutosaveTimers();
+       void errors(std::string const &);
        void structureChanged() { updateToc(); }
-       ///
-       void connectBuffer(Buffer & buf);
-       ///
-       void disconnectBuffer();
-       ///
+       ///@}
+
+
+       /// connect to signals in the given BufferView
        void connectBufferView(BufferView & bv);
-       ///
+       /// disconnect from signals in the given BufferView
        void disconnectBufferView();
+       /// connect to signals in the given buffer
+       void connectBuffer(Buffer & buf);
+       /// disconnect from signals in the given buffer
+       void disconnectBuffer();
+
        ////
        void showDialog(std::string const & name);
        void showDialogWithData(std::string const & name,
@@ -201,6 +212,8 @@ private:
         *  visible. If successful return a pointer to the owning Buffer.
         */
        Buffer const * updateInset(Inset const *);
+       ///
+       void restartCursor();
 
 
 private:
index 06e1d824cf5f37d00d9855e93cf7156dd6949553..29be5d68acc287f2c1976cfe951f703544a0b417 100644 (file)
@@ -25,6 +25,7 @@
 #include "GuiApplication.h"
 #include "GuiKeySymbol.h"
 #include "GuiPainter.h"
+#include "GuiView.h"
 #include "KeySymbol.h"
 #include "Language.h"
 #include "LyXFunc.h"
@@ -42,7 +43,6 @@
 #include "frontends/Application.h"
 #include "frontends/Dialogs.h"  // only used in setReadOnly
 #include "frontends/FontMetrics.h"
-#include "frontends/LyXView.h"
 #include "frontends/WorkAreaManager.h"
 
 #include <QInputContext>
@@ -199,11 +199,8 @@ SyntheticMouseEvent::SyntheticMouseEvent()
 
 static boost::signals::connection timecon;
 
-// HACK: FIXME
-WorkArea::~WorkArea() {}
 
-
-GuiWorkArea::GuiWorkArea(Buffer & buffer, LyXView & lv)
+GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & lv)
        : buffer_view_(new BufferView(buffer)), lyx_view_(&lv),
          cursor_visible_(false), cursor_timeout_(400),
     need_resize_(false), schedule_redraw_(false),
index 19e0d6e31bfaec0051f8e36af1d6aa30459ba505..004d26042044c56de5cc96ca98c6db5741280569 100644 (file)
@@ -44,7 +44,7 @@ class Buffer;
 
 namespace frontend {
 
-class LyXView;
+class GuiView;
 
 /// types of cursor in work area
 enum CursorShape {
@@ -106,22 +106,19 @@ class GuiWorkArea : public QAbstractScrollArea, public WorkArea
 
 public:
        ///
-       GuiWorkArea(Buffer & buffer, LyXView & lv);
+       GuiWorkArea(Buffer & buffer, GuiView & lv);
        ///
        ~GuiWorkArea();
 
+       /**
+        * Update the scrollbar.
+        * @param height the total document height in pixels
+        * @param pos the current position in the document, in pixels
+        * @param line_height the line-scroll amount, in pixels
+        */
+       void setScrollbarParams(int height, int pos, int line_height);
        ///
-       bool hasFocus() const { return QAbstractScrollArea::hasFocus(); }
-       bool isVisible() const { return QAbstractScrollArea::isVisible(); }
-
-       /// return the width of the content pane
-       virtual int width() const { return viewport()->width(); }
-       /// return the height of the content pane
-       virtual int height() const { return viewport()->height(); }
-       ///
-       virtual void setScrollbarParams(int height, int pos, int line_height);
-       ///
-       virtual void scheduleRedraw() { schedule_redraw_ = true; }
+       void scheduleRedraw() { schedule_redraw_ = true; }
 
        /// update the passed area.
        void update(int x, int y, int w, int h);
@@ -144,7 +141,8 @@ public:
        void stopBlinkingCursor();
        ///
        void startBlinkingCursor();
-       ///
+       /// Process Key pressed event.
+       /// This needs to be public because it is accessed externally by GuiView.
        void processKeySym(KeySymbol const & key, KeyModifier mod);
 
 public Q_SLOTS:
@@ -217,7 +215,7 @@ private:
        ///
        BufferView * buffer_view_;
        ///
-       LyXView * lyx_view_;
+       GuiView * lyx_view_;
        /// is the cursor currently displayed
        bool cursor_visible_;