]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
citation patch from Angus
[lyx.git] / src / BufferView.C
index c54820c3b19e8a95d77c1ab3e07753a7b336e412..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,15 +142,6 @@ void BufferView::gotoError()
 }
 
 
-#if 0
-extern "C" {
-       void C_BufferView_CursorToggleCB(FL_OBJECT * ob, long buf)
-       {
-               BufferView::cursorToggleCB(ob, buf);
-       }
-}
-#endif
-
 void BufferView::enterView()
 {
        pimpl_->enterView();
@@ -186,14 +198,6 @@ void BufferView::workAreaExpose()
 }
 
 
-//  // Callback for cursor timer
-void BufferView::cursorToggleCB(void * ob)
-{
-       BufferView * view = static_cast<BufferView*>(ob);
-       view->pimpl_->cursorToggle();
-}
-
-
 void BufferView::cursorPrevious()
 {
        pimpl_->cursorPrevious();
@@ -236,7 +240,7 @@ bool BufferView::NoSavedPositions()
 }
 
 
-void BufferView::update(signed char f)
+void BufferView::update(UpdateCodes f)
 {
        pimpl_->update(f);
 }
@@ -284,9 +288,9 @@ bool BufferView::active() const
 }
 
 
-unsigned short BufferView::paperWidth() const
+int BufferView::workWidth() const
 {
-    return text->paperWidth();
+    return pimpl_->workarea_->workWidth();
 }
 
 
@@ -336,3 +340,11 @@ 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));
+}