]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
no log...
[lyx.git] / src / BufferView.C
index 88cbba5f8f7f927f7b276d664dd3f2ce37eedb85..1e7db9e20b2b39d0dc69d57a2001c3ae1c6820ac 100644 (file)
@@ -27,7 +27,6 @@ BufferView::BufferView(LyXView * o, int xpos, int ypos,
        : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
 {
        text = 0;
-       the_locking_inset = 0;
        inset_slept = false;
 }
 
@@ -47,13 +46,13 @@ Buffer * BufferView::buffer() const
 
 LyXScreen * BufferView::screen() const
 {
-       return pimpl_->screen_;
+       return pimpl_->screen_.get();
 }
 
 
 WorkArea * BufferView::workarea() const
 {
-       return pimpl_->workarea_;
+       return &pimpl_->workarea_;
 }
 
 
@@ -117,6 +116,12 @@ void BufferView::updateScrollbar()
 }
 
 
+void BufferView::scrollCB(double value)
+{
+       pimpl_->scrollCB(value);
+}
+
+
 Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
                                  unsigned int button)
 {
@@ -136,77 +141,15 @@ int BufferView::resizeCurrentBuffer()
 }
 
 
-void BufferView::gotoError()
-{
-       pimpl_->gotoError();
-}
-
-
-void BufferView::enterView()
-{
-       pimpl_->enterView();
-}
-
-
-void BufferView::leaveView()
+void BufferView::cursorPrevious(LyXText * text)
 {
-       pimpl_->leaveView();
-}
-
-
-// Callback for scrollbar slider
-void BufferView::scrollCB(double value)
-{
-       pimpl_->scrollCB(value);
+       pimpl_->cursorPrevious(text);
 }
 
 
-void BufferView::workAreaMotionNotify(int x, int y, unsigned int state)
+void BufferView::cursorNext(LyXText * text)
 {
-       pimpl_->workAreaMotionNotify(x, y, state);
-}
-
-
-///  Single-click on work area
-void BufferView::workAreaButtonPress(int xpos, int ypos, unsigned int button)
-{
-       pimpl_->workAreaButtonPress(xpos, ypos, button);
-}
-
-
-void BufferView::doubleClick(int x, int y, unsigned int button) 
-{
-       pimpl_->doubleClick(x, y, button);
-}
-
-
-void BufferView::tripleClick(int x, int y, unsigned int button)
-{
-       pimpl_->tripleClick(x, y, button);
-}
-
-
-void BufferView::workAreaButtonRelease(int x, int y, unsigned int button)
-{
-       pimpl_->workAreaButtonRelease(x, y, button);
-}
-
-
-void BufferView::workAreaExpose()
-{
-       pimpl_->workAreaExpose();
-}
-
-
-void BufferView::cursorPrevious()
-{
-       pimpl_->cursorPrevious();
-}
-
-
-void BufferView::cursorNext()
-{
-       pimpl_->cursorNext();
+       pimpl_->cursorNext(text);
 }
 
 
@@ -216,33 +159,33 @@ bool BufferView::available() const
 }
 
 
-void BufferView::beforeChange()
+void BufferView::beforeChange(LyXText * text)
 {
-       pimpl_->beforeChange();
+       pimpl_->beforeChange(text);
 }
 
 
-void BufferView::savePosition()
+void BufferView::savePosition(unsigned int i)
 {
-       pimpl_->savePosition();
+       pimpl_->savePosition(i);
 }
 
 
-void BufferView::restorePosition()
+void BufferView::restorePosition(unsigned int i)
 {
-       pimpl_->restorePosition();
+       pimpl_->restorePosition(i);
 }
 
 
-bool BufferView::NoSavedPositions()
+bool BufferView::isSavedPosition(unsigned int i)
 {
-       return pimpl_->NoSavedPositions();
+       return pimpl_->isSavedPosition(i);
 }
 
 
-void BufferView::update(UpdateCodes f)
+void BufferView::update(LyXText * text, UpdateCodes f)
 {
-       pimpl_->update(f);
+       pimpl_->update(text, f);
 }
 
 
@@ -290,7 +233,7 @@ bool BufferView::active() const
 
 int BufferView::workWidth() const
 {
-    return pimpl_->workarea_->workWidth();
+    return pimpl_->workarea_.workWidth();
 }
 
 
@@ -348,3 +291,8 @@ BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
        return static_cast<BufferView::UpdateCodes>
                (static_cast<int>(uc1) | static_cast<int>(uc2));
 }
+
+bool BufferView::Dispatch(kb_action action, string const & argument)
+{
+    return pimpl_->Dispatch(action, argument);
+}