-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+/**
+ * \file BufferView.C
+ * Copyright 1995-2002 the LyX Team
+ * Read the file COPYING
*
- * ====================================================== */
+ * \author unknown
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
#include <config.h>
#include "BufferView.h"
#include "BufferView_pimpl.h"
#include "lyxtext.h"
-#include "WorkArea.h"
-#include "lyxscreen.h"
+#include "frontends/screen.h"
+#include "frontends/WorkArea.h"
BufferView::BufferView(LyXView * o, int xpos, int ypos,
: pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
{
text = 0;
- inset_slept = false;
}
}
-LyXScreen * BufferView::screen() const
+LScreen & BufferView::screen() const
{
- return pimpl_->screen_.get();
+ return pimpl_->screen();
}
}
-void BufferView::pushIntoUpdateList(Inset * i)
-{
- pimpl_->updatelist.push(i);
-}
-
-
-Painter & BufferView::painter()
+Painter & BufferView::painter() const
{
return pimpl_->painter();
}
}
-void BufferView::fitCursor(LyXText * text)
+bool BufferView::fitCursor()
{
- pimpl_->fitCursor(text);
+ return pimpl_->fitCursor();
}
}
-void BufferView::scrollCB(double value)
+void BufferView::scrollDocView(int value)
{
- pimpl_->scrollCB(value);
+ pimpl_->scrollDocView(value);
}
-Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
- unsigned int button)
+Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y)
{
- return pimpl_->checkInsetHit(text, x, y, button);
+ return pimpl_->checkInsetHit(text, x, y);
}
}
-void BufferView::insetSleep()
-{
- pimpl_->insetSleep();
-}
-
-
-void BufferView::insetWakeup()
-{
- pimpl_->insetWakeup();
-}
-
-
void BufferView::insetUnlock()
{
pimpl_->insetUnlock();
bool BufferView::focus() const
{
- return pimpl_->focus();
+ return pimpl_->focus();
}
void BufferView::focus(bool f)
{
- pimpl_->focus(f);
-}
-
-
-bool BufferView::active() const
-{
- return pimpl_->active();
+ pimpl_->focus(f);
}
int BufferView::workWidth() const
{
- return pimpl_->workarea_.workWidth();
-}
-
-
-bool BufferView::belowMouse() const
-{
- return pimpl_->belowMouse();
+ return pimpl_->workarea().workWidth();
}
}
-void BufferView::center()
+void BufferView::center()
{
pimpl_->center();
}
string const BufferView::getClipboard() const
{
- return pimpl_->workarea_.getClipboard();
+ return pimpl_->workarea().getClipboard();
}