]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
ws changes mostly
[lyx.git] / src / BufferView.C
index 8a74a8d42fc15f071bd52ee6b70e03e051694d33..ecc66f0e05e8c4a1aee8cb3c8ced8de450c16f7d 100644 (file)
@@ -21,6 +21,7 @@
 #include "bufferparams.h"
 #include "BufferView_pimpl.h"
 #include "CutAndPaste.h"
+#include "coordcache.h"
 #include "debug.h"
 #include "funcrequest.h"
 #include "FuncStatus.h"
@@ -141,9 +142,9 @@ bool BufferView::fitCursor()
 }
 
 
-void BufferView::update()
+void BufferView::update(bool fitcursor, bool forceupdate)
 {
-       pimpl_->update();
+       pimpl_->update(fitcursor, forceupdate);
 }
 
 
@@ -159,12 +160,6 @@ void BufferView::scrollDocView(int value)
 }
 
 
-void BufferView::redoCurrentBuffer()
-{
-       pimpl_->redoCurrentBuffer();
-}
-
-
 bool BufferView::available() const
 {
        return pimpl_->available();
@@ -213,18 +208,6 @@ void BufferView::center()
 }
 
 
-int BufferView::top_y() const
-{
-       return pimpl_->top_y();
-}
-
-
-void BufferView::top_y(int y)
-{
-       pimpl_->top_y(y);
-}
-
-
 string const BufferView::getClipboard() const
 {
        return pimpl_->workarea().getClipboard();
@@ -307,8 +290,7 @@ void BufferView::hideCursor()
        screen().hideCursor();
 }
 
-
-LyXText * BufferView::getLyXText() const
+LyXText * BufferView::getLyXText()
 {
        LyXText * text = cursor().innerText();
        BOOST_ASSERT(text);
@@ -316,6 +298,14 @@ LyXText * BufferView::getLyXText() const
 }
 
 
+LyXText const * BufferView::getLyXText() const
+{
+       LyXText const * text = cursor().innerText();
+       BOOST_ASSERT(text);
+       return text;
+}
+
+
 void BufferView::haveSelection(bool sel)
 {
        pimpl_->workarea().haveSelection(sel);
@@ -336,16 +326,13 @@ LyXText * BufferView::text() const
 
 void BufferView::setCursor(ParIterator const & par, lyx::pos_type pos)
 {
-       int const last = par.size();
-       for (int i = 0; i < last; ++i)
+       for (int i = 0, n = par.size(); i < n; ++i)
                par[i].inset().edit(cursor(), true);
 
        cursor().setCursor(makeDocIterator(par, pos));
        cursor().selection() = false;
-       par.bottom().text()->redoParagraph(par.bottom().pit());
 }
 
-
 void BufferView::putSelectionAt(DocIterator const & cur,
                                int length, bool backwards)
 {
@@ -375,3 +362,15 @@ LCursor const & BufferView::cursor() const
 {
        return pimpl_->cursor_;
 }
+
+
+lyx::pit_type BufferView::anchor_ref() const
+{
+       return pimpl_->anchor_ref_;
+}
+
+
+int BufferView::offset_ref() const
+{
+       return pimpl_->offset_ref_;
+}