]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
redraw fix 1.
[lyx.git] / src / BufferView.C
index 3a2388f2eaa7f3c276a647062c78b3e658bf5beb..d9d6e37774f8d42d76914d441c697f46f911a643 100644 (file)
@@ -1,12 +1,11 @@
-/* This file is part of
- * ====================================================== 
- * 
- *           LyX, The Document Processor
- *        
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
+/**
+ * \file BufferView.C
+ * Copyright 1995-2002 the LyX Team
+ * Read the file COPYING
  *
- * ====================================================== */
+ * \author unknown
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
 
 #include <config.h>
 
@@ -17,7 +16,8 @@
 #include "BufferView.h"
 #include "BufferView_pimpl.h"
 #include "lyxtext.h"
-#include "lyxscreen.h"
+#include "frontends/screen.h"
+#include "frontends/WorkArea.h"
 
 
 BufferView::BufferView(LyXView * o, int xpos, int ypos,
@@ -41,9 +41,9 @@ Buffer * BufferView::buffer() const
 }
 
 
-LyXScreen * BufferView::screen() const
+LyXScreen & BufferView::screen() const
 {
-       return pimpl_->screen_.get();
+       return pimpl_->screen();
 }
 
 
@@ -53,13 +53,7 @@ LyXView * BufferView::owner() const
 }
 
 
-void BufferView::pushIntoUpdateList(Inset * i)
-{
-       pimpl_->updatelist.push(i);
-}
-
-
-Painter & BufferView::painter() 
+Painter & BufferView::painter() const
 {
        return pimpl_->painter();
 }
@@ -71,27 +65,21 @@ void BufferView::buffer(Buffer * b)
 }
 
 
-void BufferView::resize(int xpos, int ypos, int width, int height)
-{
-       pimpl_->resize(xpos, ypos, width, height);
-}
-
-
 void BufferView::resize()
 {
-       pimpl_->resize();
+       pimpl_->resizeCurrentBuffer();
 }
 
 
-void BufferView::redraw()
+void BufferView::repaint()
 {
-       pimpl_->redraw();
+       pimpl_->repaint();
 }
 
 
-void BufferView::fitCursor(LyXText * text)
+bool BufferView::fitCursor()
 {
-       pimpl_->fitCursor(text);
+       return pimpl_->fitCursor();
 }
 
 
@@ -107,16 +95,15 @@ void BufferView::updateScrollbar()
 }
 
 
-void BufferView::scrollCB(double value)
+void BufferView::scrollDocView(int value)
 {
-       pimpl_->scrollCB(value);
+       pimpl_->scrollDocView(value);
 }
 
 
-Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
-                                 unsigned int button)
+Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y)
 {
-       return pimpl_->checkInsetHit(text, x, y, button);
+       return pimpl_->checkInsetHit(text, x, y);
 }
 
 
@@ -126,12 +113,6 @@ void BufferView::redoCurrentBuffer()
 }
 
 
-int BufferView::resizeCurrentBuffer()
-{
-       return pimpl_->resizeCurrentBuffer();
-}
-
-
 void BufferView::cursorPrevious(LyXText * text)
 {
        pimpl_->cursorPrevious(text);
@@ -186,51 +167,15 @@ void BufferView::setState()
 }
 
 
-void BufferView::insetSleep()
-{
-       pimpl_->insetSleep();
-}
-
-
-void BufferView::insetWakeup()
-{
-       pimpl_->insetWakeup();
-}
-
-
 void BufferView::insetUnlock()
 {
        pimpl_->insetUnlock();
 }
 
 
-bool BufferView::focus() const
-{
-       return pimpl_->focus();
-}
-
-
-void BufferView::focus(bool f)
-{
-       pimpl_->focus(f);
-}
-
-
-bool BufferView::active() const
-{
-       return pimpl_->active();
-}
-
-
 int BufferView::workWidth() const
 {
-    return pimpl_->workarea_.workWidth();
-}
-
-
-bool BufferView::belowMouse() const 
-{
-       return pimpl_->belowMouse();
+       return pimpl_->workarea().workWidth();
 }
 
 
@@ -258,7 +203,7 @@ void BufferView::toggleToggle()
 }
 
 
-void BufferView::center() 
+void BufferView::center()
 {
        pimpl_->center();
 }
@@ -272,7 +217,7 @@ void BufferView::pasteClipboard(bool asPara)
 
 string const BufferView::getClipboard() const
 {
-       return pimpl_->workarea_.getClipboard();
+       return pimpl_->workarea().getClipboard();
 }