-// -*- 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.
*
* ====================================================== */
#include "BufferView.h"
#include "BufferView_pimpl.h"
#include "lyxtext.h"
-#include "WorkArea.h"
#include "lyxscreen.h"
: pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
{
text = 0;
- inset_slept = false;
}
LyXScreen * BufferView::screen() const
{
- return pimpl_->screen_;
-}
-
-
-WorkArea * BufferView::workarea() const
-{
- return pimpl_->workarea_;
+ return pimpl_->screen_.get();
}
}
-void BufferView::fitCursor(LyXText * text)
+void BufferView::fitCursor()
{
- pimpl_->fitCursor(text);
+ pimpl_->fitCursor();
}
}
+void BufferView::scrollCB(double value)
+{
+ pimpl_->scrollCB(value);
+}
+
+
Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
unsigned int button)
{
}
-#if 0
-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)
-{
- pimpl_->workAreaMotionNotify(x, y, state);
-}
-
-
-/// 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()
-{
- pimpl_->workAreaExpose();
-}
-#endif
-
-
void BufferView::cursorPrevious(LyXText * text)
{
pimpl_->cursorPrevious(text);
}
-void BufferView::beforeChange()
+void BufferView::beforeChange(LyXText * text)
{
- pimpl_->beforeChange();
+ pimpl_->beforeChange(text);
}
}
-void BufferView::update(UpdateCodes f)
+void BufferView::update(LyXText * text, UpdateCodes f)
{
- pimpl_->update(f);
+ pimpl_->update(text, f);
}
int BufferView::workWidth() const
{
- return pimpl_->workarea_->workWidth();
+ return pimpl_->workarea_.workWidth();
}
}
+string const BufferView::getClipboard() const
+{
+ return pimpl_->workarea_.getClipboard();
+}
+
+
void BufferView::stuffClipboard(string const & stuff) const
{
pimpl_->stuffClipboard(stuff);
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);
+}