]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
partial framebox support
[lyx.git] / src / BufferView.C
index 170a348c657ed62e6daf2f91164ad4355403218a..53e1ffd55cfcd67d5f1e1096f905767b406834d9 100644 (file)
 #include "lyxtext.h"
 #include "frontends/screen.h"
 #include "frontends/WorkArea.h"
+#include "frontends/LyXView.h"
 
 
-BufferView::BufferView(LyXView * o, int xpos, int ypos,
+BufferView::BufferView(LyXView * owner, int xpos, int ypos,
                       int width, int height)
-       : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
+       : pimpl_(new Pimpl(this, owner, xpos, ypos, width, height))
 {
        text = 0;
 }
@@ -47,6 +48,12 @@ LyXScreen & BufferView::screen() const
 }
 
 
+WorkArea & BufferView::workarea() const
+{
+       return pimpl_->workarea();
+}
+
+
 LyXView * BufferView::owner() const
 {
        return pimpl_->owner_;
@@ -67,13 +74,15 @@ void BufferView::buffer(Buffer * b)
 
 void BufferView::resize()
 {
-       pimpl_->resizeCurrentBuffer();
+       if (pimpl_->buffer_) {
+               pimpl_->resizeCurrentBuffer();
+       }
 }
 
 
-void BufferView::redraw()
+void BufferView::repaint()
 {
-       pimpl_->redraw();
+       pimpl_->repaint();
 }
 
 
@@ -101,30 +110,12 @@ void BufferView::scrollDocView(int value)
 }
 
 
-Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y)
-{
-       return pimpl_->checkInsetHit(text, x, y);
-}
-
-
 void BufferView::redoCurrentBuffer()
 {
        pimpl_->redoCurrentBuffer();
 }
 
 
-void BufferView::cursorPrevious(LyXText * text)
-{
-       pimpl_->cursorPrevious(text);
-}
-
-
-void BufferView::cursorNext(LyXText * text)
-{
-       pimpl_->cursorNext(text);
-}
-
-
 bool BufferView::available() const
 {
        return pimpl_->available();
@@ -161,9 +152,9 @@ void BufferView::update(LyXText * text, UpdateCodes f)
 }
 
 
-void BufferView::setState()
+void BufferView::switchKeyMap()
 {
-       pimpl_->setState();
+       pimpl_->switchKeyMap();
 }
 
 
@@ -209,12 +200,6 @@ void BufferView::center()
 }
 
 
-void BufferView::pasteClipboard(bool asPara)
-{
-       pimpl_->pasteClipboard(asPara);
-}
-
-
 string const BufferView::getClipboard() const
 {
        return pimpl_->workarea().getClipboard();
@@ -234,7 +219,14 @@ BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
                (static_cast<int>(uc1) | static_cast<int>(uc2));
 }
 
-bool BufferView::Dispatch(kb_action action, string const & argument)
+
+bool BufferView::dispatch(FuncRequest const & ev)
+{
+       return pimpl_->dispatch(ev);
+}
+
+
+int BufferView::scroll(long time)
 {
-       return pimpl_->Dispatch(action, argument);
+       return pimpl_->scroll(time);
 }