X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView.C;h=1e8a987d60337628d1e5f5823fc678dc5bdf32ff;hb=27652900a60fd078f161ce866ddaed21dba21eff;hp=e1a72466a66283132143ed775c2186a578867369;hpb=7390104c74c57b5b464939a73da9e4f36f7ab441;p=lyx.git diff --git a/src/BufferView.C b/src/BufferView.C index e1a72466a6..1e8a987d60 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -1,11 +1,10 @@ -// -*- C++ -*- /* This file is part of * ====================================================== * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ @@ -18,7 +17,6 @@ #include "BufferView.h" #include "BufferView_pimpl.h" #include "lyxtext.h" -#include "WorkArea.h" #include "lyxscreen.h" @@ -27,8 +25,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,7 +43,7 @@ Buffer * BufferView::buffer() const LyXScreen * BufferView::screen() const { - return pimpl_->screen_; + return pimpl_->screen_.get(); } @@ -111,97 +107,39 @@ void BufferView::updateScrollbar() } -void BufferView::redoCurrentBuffer() -{ - pimpl_->redoCurrentBuffer(); -} - - -int BufferView::resizeCurrentBuffer() -{ - return pimpl_->resizeCurrentBuffer(); -} - - -void BufferView::gotoError() -{ - pimpl_->gotoError(); -} - - -void BufferView::enterView() -{ - pimpl_->enterView(); -} - - -void BufferView::leaveView() -{ - pimpl_->leaveView(); -} - - -// Callback for scrollbar slider void BufferView::scrollCB(double value) { pimpl_->scrollCB(value); } -void BufferView::workAreaMotionNotify(int x, int y, unsigned int state) +Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y) { - pimpl_->workAreaMotionNotify(x, y, state); + return pimpl_->checkInsetHit(text, x, y); } -/// 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() +void BufferView::redoCurrentBuffer() { - pimpl_->workAreaExpose(); + pimpl_->redoCurrentBuffer(); } -// // Callback for cursor timer -void BufferView::cursorToggleCB(void * ob) +int BufferView::resizeCurrentBuffer() { - BufferView * view = static_cast(ob); - view->pimpl_->cursorToggle(); + return pimpl_->resizeCurrentBuffer(); } -void BufferView::cursorPrevious() +void BufferView::cursorPrevious(LyXText * text) { - pimpl_->cursorPrevious(); + pimpl_->cursorPrevious(text); } -void BufferView::cursorNext() +void BufferView::cursorNext(LyXText * text) { - pimpl_->cursorNext(); + pimpl_->cursorNext(text); } @@ -211,33 +149,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); } @@ -285,7 +223,7 @@ bool BufferView::active() const int BufferView::workWidth() const { - return pimpl_->workarea_->workWidth(); + return pimpl_->workarea_.workWidth(); } @@ -331,6 +269,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); @@ -343,3 +287,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); +}