]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / BufferView.C
index 99474cf9d804111bcc72c274028dfac75e5bd51f..4caf746d9521d7ed8ba3cd41aae0ae0818339e50 100644 (file)
@@ -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.
  *
  * ====================================================== */
 
@@ -27,7 +26,6 @@ BufferView::BufferView(LyXView * o, int xpos, int ypos,
        : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
 {
        text = 0;
-       inset_slept = false;
 }
 
 
@@ -46,13 +44,7 @@ Buffer * BufferView::buffer() const
 
 LyXScreen * BufferView::screen() const
 {
-       return pimpl_->screen_;
-}
-
-
-WorkArea * BufferView::workarea() const
-{
-       return pimpl_->workarea_;
+       return pimpl_->screen_.get();
 }
 
 
@@ -116,6 +108,12 @@ void BufferView::updateScrollbar()
 }
 
 
+void BufferView::scrollCB(double value)
+{
+       pimpl_->scrollCB(value);
+}
+
+
 Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
                                  unsigned int button)
 {
@@ -227,7 +225,7 @@ bool BufferView::active() const
 
 int BufferView::workWidth() const
 {
-    return pimpl_->workarea_->workWidth();
+    return pimpl_->workarea_.workWidth();
 }
 
 
@@ -273,6 +271,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);
@@ -285,3 +289,8 @@ BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
        return static_cast<BufferView::UpdateCodes>
                (static_cast<int>(uc1) | static_cast<int>(uc2));
 }
+
+bool BufferView::Dispatch(kb_action action, string const & argument)
+{
+       return pimpl_->Dispatch(action, argument);
+}