-/* This file is part of
- * ======================================================
+/**
+ * \file BufferView.C
+ * Copyright 1995-2002 the LyX Team
+ * Read the file COPYING
*
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * \author unknown
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
#include <config.h>
#include "lyxtext.h"
#include "frontends/screen.h"
#include "frontends/WorkArea.h"
+#include "frontends/LyXView.h"
-BufferView::BufferView(LyXView * o, int xpos, int ypos,
+BufferView::BufferView(LyXView * owner, int xpos, int ypos,
int width, int height)
- : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
+ : pimpl_(new Pimpl(this, owner, xpos, ypos, width, height))
{
text = 0;
}
}
-LyXScreen * BufferView::screen() const
+LyXScreen & BufferView::screen() const
{
- return pimpl_->screen_.get();
+ return pimpl_->screen();
+}
+
+
+WorkArea & BufferView::workarea() const
+{
+ return pimpl_->workarea();
}
}
-Painter & BufferView::painter()
+Painter & BufferView::painter() const
{
return pimpl_->painter();
}
}
-void BufferView::resize(int xpos, int ypos, int width, int height)
-{
- pimpl_->resize(xpos, ypos, width, height);
-}
-
-
void BufferView::resize()
{
- pimpl_->resize();
+ if (pimpl_->buffer_) {
+ pimpl_->resizeCurrentBuffer();
+ }
}
-void BufferView::redraw()
+void BufferView::repaint()
{
- pimpl_->redraw();
+ pimpl_->repaint();
}
}
-void BufferView::scrollCB(double value)
-{
- pimpl_->scrollCB(value);
-}
-
-
-Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y)
+void BufferView::scrollDocView(int value)
{
- return pimpl_->checkInsetHit(text, x, y);
+ pimpl_->scrollDocView(value);
}
}
-int BufferView::resizeCurrentBuffer()
-{
- return pimpl_->resizeCurrentBuffer();
-}
-
-
-void BufferView::cursorPrevious(LyXText * text)
-{
- pimpl_->cursorPrevious(text);
-}
-
-
-void BufferView::cursorNext(LyXText * text)
-{
- pimpl_->cursorNext(text);
-}
-
-
bool BufferView::available() const
{
return pimpl_->available();
}
-void BufferView::setState()
+void BufferView::switchKeyMap()
{
- pimpl_->setState();
+ pimpl_->switchKeyMap();
}
-#if 0
-void BufferView::insetSleep()
-{
- pimpl_->insetSleep();
-}
-
-
-void BufferView::insetWakeup()
-{
- pimpl_->insetWakeup();
-}
-#endif
-
void BufferView::insetUnlock()
{
}
-bool BufferView::focus() const
-{
- return pimpl_->focus();
-}
-
-
-void BufferView::focus(bool f)
-{
- pimpl_->focus(f);
-}
-
-
int BufferView::workWidth() const
{
return pimpl_->workarea().workWidth();
}
-void BufferView::pasteClipboard(bool asPara)
-{
- pimpl_->pasteClipboard(asPara);
-}
-
-
string const BufferView::getClipboard() const
{
return pimpl_->workarea().getClipboard();
(static_cast<int>(uc1) | static_cast<int>(uc2));
}
-bool BufferView::Dispatch(kb_action action, string const & argument)
+
+bool BufferView::dispatch(FuncRequest const & ev)
+{
+ return pimpl_->dispatch(ev);
+}
+
+
+int BufferView::scroll(long time)
{
- return pimpl_->Dispatch(action, argument);
+ return pimpl_->scroll(time);
}