]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
citation patch from Angus
[lyx.git] / src / BufferView.C
index bfe5dc237b9f02d9af0200f66733648179031b72..e244fb46b3605ecf6fb2eab451fe532f30a01f8d 100644 (file)
@@ -18,6 +18,8 @@
 #include "BufferView.h"
 #include "BufferView_pimpl.h"
 #include "lyxtext.h"
+#include "WorkArea.h"
+#include "lyxscreen.h"
 
 
 BufferView::BufferView(LyXView * o, int xpos, int ypos,
@@ -43,6 +45,18 @@ Buffer * BufferView::buffer() const
 }
 
 
+LyXScreen * BufferView::screen() const
+{
+       return pimpl_->screen_;
+}
+
+
+WorkArea * BufferView::workarea() const
+{
+       return pimpl_->workarea_;
+}
+
+
 LyXView * BufferView::owner() const
 {
        return pimpl_->owner_;
@@ -103,6 +117,13 @@ void BufferView::updateScrollbar()
 }
 
 
+Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
+                                 unsigned int button)
+{
+       return pimpl_->checkInsetHit(text, x, y, button);
+}
+
+
 void BufferView::redoCurrentBuffer()
 {
        pimpl_->redoCurrentBuffer();
@@ -121,14 +142,6 @@ void BufferView::gotoError()
 }
 
 
-extern "C" {
-       void C_BufferView_CursorToggleCB(FL_OBJECT * ob, long buf)
-       {
-               BufferView::cursorToggleCB(ob, buf);
-       }
-}
-
-
 void BufferView::enterView()
 {
        pimpl_->enterView();
@@ -185,22 +198,6 @@ void BufferView::workAreaExpose()
 }
 
 
-//  // Callback for cursor timer
-void BufferView::cursorToggleCB(FL_OBJECT * ob, long )
-{
-       BufferView * view = static_cast<BufferView*>(ob->u_vdata);
-       view->pimpl_->cursorToggle();
-}
-
-
-#ifndef XFORMS_CLIPBOARD
-void BufferView::workAreaSelectionNotify(Window win, XEvent * event)
-{
-       pimpl_->workAreaSelectionNotify(win, event);
-}
-#endif
-
-
 void BufferView::cursorPrevious()
 {
        pimpl_->cursorPrevious();
@@ -237,7 +234,13 @@ void BufferView::restorePosition()
 }
 
 
-void BufferView::update(signed char f)
+bool BufferView::NoSavedPositions()
+{
+       return pimpl_->NoSavedPositions();
+}
+
+
+void BufferView::update(UpdateCodes f)
 {
        pimpl_->update(f);
 }
@@ -285,9 +288,9 @@ bool BufferView::active() const
 }
 
 
-unsigned short BufferView::paperWidth() const
+int BufferView::workWidth() const
 {
-    return text->paperWidth();
+    return pimpl_->workarea_->workWidth();
 }
 
 
@@ -327,9 +330,21 @@ void BufferView::center()
 }
 
 
-#ifdef XFORMS_CLIPBOARD
-void BufferView::pasteSelection(bool asPara)
+void BufferView::pasteClipboard(bool asPara)
 {
-       pimpl_->pasteSelection(asPara);
+       pimpl_->pasteClipboard(asPara);
+}
+
+
+void BufferView::stuffClipboard(string const & stuff) const
+{
+       pimpl_->stuffClipboard(stuff);
+}
+
+
+BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
+                                 BufferView::UpdateCodes uc2)
+{
+       return static_cast<BufferView::UpdateCodes>
+               (static_cast<int>(uc1) | static_cast<int>(uc2));
 }
-#endif