void BufferView::Pimpl::repaint()
{
// Regenerate the screen.
- screen().redraw(bv_, bv_->text);
+ lyxerr << "BufferView::repaint()\n";
+ screen().redraw(*bv_);
}
void BufferView::Pimpl::update()
{
lyxerr << "BufferView::update()\n";
- screen().update(*bv_);
+ screen().redraw(*bv_);
bv_->text->clearPaint();
}
+2003-08-01 André Pönitz <poenitz@gmx.net>
+
+ * screen.[Ch]: merge update() and repaint()
+
2003-07-29 André Pönitz <poenitz@gmx.net>
* screen.[Ch]: remove toggleToggle.
}
-void LyXScreen::update(BufferView & bv, int yo, int xo)
-{
- LyXText * text = bv.text;
-
- workarea().getPainter().start();
-
- if (text->needRefresh()) {
- int const vwidth = workarea().workWidth();
- int const vheight = workarea().workHeight();
- text->updateRowPositions();
- int const y = 0;
- drawFromTo(text, &bv, y, vheight, yo, xo);
- expose(0, y, vwidth, vheight - y);
- }
-
- workarea().getPainter().end();
-}
-
-
void LyXScreen::toggleSelection(LyXText * text, BufferView * bv,
bool kill_selection,
int yo, int xo)
}
-void LyXScreen::redraw(BufferView * bv, LyXText * text)
+void LyXScreen::redraw(BufferView & bv)
{
- greyed_out_ = !text;
+ greyed_out_ = !bv.text;
if (greyed_out_) {
greyOut();
workarea().getPainter().start();
- text->updateRowPositions();
- drawFromTo(text, bv, 0, workarea().workHeight(), 0, 0);
+ bv.text->updateRowPositions();
+ drawFromTo(bv.text, &bv, 0, workarea().workHeight(), 0, 0);
expose(0, 0, workarea().workWidth(), workarea().workHeight());
workarea().getPainter().end();
int x, int y, int a, int d);
/// redraw the screen, without using existing pixmap
- virtual void redraw(BufferView * bv, LyXText * text);
+ virtual void redraw(BufferView & bv);
/**
* topCursorVisible - get a new "top" to make the cursor visible
*/
virtual bool fitCursor(LyXText *, BufferView *);
- /**
- * update - update part of the screen rendering
- * @param bv the bufferview
- * @param xo the x offset into the text
- * @param yo the x offset into the text
- *
- * Updates part of the screen. If bv->text->needRefresh is
- * true, we update from the
- * point of change to the end of the screen.
- */
- virtual void update(BufferView & bv, int yo = 0, int xo = 0);
-
/// hide the visible cursor, if it is visible
void hideCursor();
// insert a new row, starting at position 0
Row newrow(pit, 0);
rit = rowlist_.insert(rit, newrow);
- newrow.dump("newrow: ");
+ //newrow.dump("newrow: ");
// and now append the whole paragraph before the new row
// was: appendParagraph(rit);
pos_type z = rowBreakPoint(*rit);
RowList::iterator tmprow = rit;
- tmprow->dump("tmprow: ");
+ //tmprow->dump("tmprow: ");
if (z < last) {
++z;
Row newrow(rit->par(), z);
- newrow.dump("newrow2: ");
+ //newrow.dump("newrow2: ");
rit = rowlist_.insert(boost::next(rit), newrow);
} else {
done = true;
// Set the dimensions of the row
// fixed fill setting now by calling inset->update() in
// SingleWidth when needed!
- tmprow->dump("tmprow 1: ");
+ //tmprow->dump("tmprow 1: ");
tmprow->fill(fill(tmprow, workWidth()));
- tmprow->dump("tmprow 2: ");
+ //tmprow->dump("tmprow 2: ");
setHeightOfRow(tmprow);
- tmprow->dump("tmprow 3: ");
+ //tmprow->dump("tmprow 3: ");
height += rit->height();
} while (!done);