X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView.C;h=1e7db9e20b2b39d0dc69d57a2001c3ae1c6820ac;hb=3eea90dbbc24f9dafc6c0a42d5b14fe213dbcd6a;hp=88cbba5f8f7f927f7b276d664dd3f2ce37eedb85;hpb=74a46e047411135aa83e77fe5be9e9f320cc9b7b;p=lyx.git diff --git a/src/BufferView.C b/src/BufferView.C index 88cbba5f8f..1e7db9e20b 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -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 (static_cast(uc1) | static_cast(uc2)); } + +bool BufferView::Dispatch(kb_action action, string const & argument) +{ + return pimpl_->Dispatch(action, argument); +}