]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
redraw fix 1.
[lyx.git] / src / BufferView.C
index 1baf3d769b1da8184528e04db95f2da85175e323..d9d6e37774f8d42d76914d441c697f46f911a643 100644 (file)
@@ -1,13 +1,11 @@
-// -*- C++ -*-
-/* This file is part of
- * ====================================================== 
- * 
- *           LyX, The Document Processor
- *        
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 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>
 
@@ -18,8 +16,8 @@
 #include "BufferView.h"
 #include "BufferView_pimpl.h"
 #include "lyxtext.h"
-#include "WorkArea.h"
-#include "lyxscreen.h"
+#include "frontends/screen.h"
+#include "frontends/WorkArea.h"
 
 
 BufferView::BufferView(LyXView * o, int xpos, int ypos,
@@ -27,7 +25,6 @@ BufferView::BufferView(LyXView * o, int xpos, int ypos,
        : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
 {
        text = 0;
-       inset_slept = false;
 }
 
 
@@ -44,15 +41,9 @@ Buffer * BufferView::buffer() const
 }
 
 
-LyXScreen * BufferView::screen() const
+LyXScreen & BufferView::screen() const
 {
-       return pimpl_->screen_.get();
-}
-
-
-WorkArea * BufferView::workarea() const
-{
-       return &pimpl_->workarea_;
+       return pimpl_->screen();
 }
 
 
@@ -62,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();
 }
@@ -80,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();
 }
 
 
@@ -116,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);
 }
 
 
@@ -135,12 +113,6 @@ void BufferView::redoCurrentBuffer()
 }
 
 
-int BufferView::resizeCurrentBuffer()
-{
-       return pimpl_->resizeCurrentBuffer();
-}
-
-
 void BufferView::cursorPrevious(LyXText * text)
 {
        pimpl_->cursorPrevious(text);
@@ -195,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();
 }
 
 
@@ -267,7 +203,7 @@ void BufferView::toggleToggle()
 }
 
 
-void BufferView::center() 
+void BufferView::center()
 {
        pimpl_->center();
 }
@@ -279,6 +215,12 @@ void BufferView::pasteClipboard(bool asPara)
 }
 
 
+string const BufferView::getClipboard() const
+{
+       return pimpl_->workarea().getClipboard();
+}
+
+
 void BufferView::stuffClipboard(string const & stuff) const
 {
        pimpl_->stuffClipboard(stuff);