#include "BufferView.h"
#include "BufferView_pimpl.h"
#include "lyxtext.h"
+#include "WorkArea.h"
+#include "lyxscreen.h"
BufferView::BufferView(LyXView * o, int xpos, int ypos,
: pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
{
text = 0;
- the_locking_inset = 0;
inset_slept = false;
}
}
+LyXScreen * BufferView::screen() const
+{
+ return pimpl_->screen_;
+}
+
+
+WorkArea * BufferView::workarea() const
+{
+ return pimpl_->workarea_;
+}
+
+
LyXView * BufferView::owner() const
{
return pimpl_->owner_;
}
-void BufferView::fitCursor()
+void BufferView::fitCursor(LyXText * text)
{
- pimpl_->fitCursor();
+ pimpl_->fitCursor(text);
}
}
+Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
+ unsigned int button)
+{
+ return pimpl_->checkInsetHit(text, x, y, button);
+}
+
+
void BufferView::redoCurrentBuffer()
{
pimpl_->redoCurrentBuffer();
#if 0
-extern "C" {
- void C_BufferView_CursorToggleCB(FL_OBJECT * ob, long buf)
- {
- BufferView::cursorToggleCB(ob, buf);
- }
-}
-#endif
-
void BufferView::enterView()
{
pimpl_->enterView();
{
pimpl_->workAreaExpose();
}
+#endif
-// // Callback for cursor timer
-void BufferView::cursorToggleCB(void * ob)
-{
- BufferView * view = static_cast<BufferView*>(ob);
- view->pimpl_->cursorToggle();
-}
-
-
-void BufferView::cursorPrevious()
+void BufferView::cursorPrevious(LyXText * text)
{
- pimpl_->cursorPrevious();
+ pimpl_->cursorPrevious(text);
}
-void BufferView::cursorNext()
+void BufferView::cursorNext(LyXText * text)
{
- pimpl_->cursorNext();
+ pimpl_->cursorNext(text);
}
}
-void BufferView::update(signed char f)
+void BufferView::update(UpdateCodes f)
{
pimpl_->update(f);
}
}
-unsigned short BufferView::paperWidth() const
+int BufferView::workWidth() const
{
- return text->paperWidth();
+ return pimpl_->workarea_->workWidth();
}
{
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));
+}