But merges Screen::update() and Screen::redraw() and removes a redraw argument.
Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
? .text2.C.swp ? 1.diff ? fullredraw.diff ? insets/1.diff Index: BufferView_pimpl.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.403 diff -u -p -r1.403 BufferView_pimpl.C --- BufferView_pimpl.C 31 Jul 2003 10:48:49 -0000 1.403 +++ BufferView_pimpl.C 1 Aug 2003 14:46:51 -0000 @@ -469,7 +469,8 @@ int BufferView::Pimpl::resizeCurrentBuff void BufferView::Pimpl::repaint() { // Regenerate the screen. - screen().redraw(bv_, bv_->text); + lyxerr << "BufferView::repaint()\n"; + screen().redraw(*bv_); } @@ -648,7 +649,7 @@ void BufferView::Pimpl::workAreaResize() void BufferView::Pimpl::update() { lyxerr << "BufferView::update()\n"; - screen().update(*bv_); + screen().redraw(*bv_); bv_->text->clearPaint(); } Index: text2.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.411 diff -u -p -r1.411 text2.C --- text2.C 1 Aug 2003 14:12:04 -0000 1.411 +++ text2.C 1 Aug 2003 14:46:51 -0000 @@ -648,7 +648,7 @@ void LyXText::redoParagraph(ParagraphLis // 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); @@ -660,12 +660,12 @@ void LyXText::redoParagraph(ParagraphLis 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; @@ -674,11 +674,11 @@ void LyXText::redoParagraph(ParagraphLis // 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); Index: frontends/screen.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/screen.C,v retrieving revision 1.58 diff -u -p -r1.58 screen.C --- frontends/screen.C 29 Jul 2003 10:00:51 -0000 1.58 +++ frontends/screen.C 1 Aug 2003 14:46:51 -0000 @@ -297,25 +297,6 @@ bool LyXScreen::fitCursor(LyXText * text } -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) @@ -348,9 +329,9 @@ void LyXScreen::toggleSelection(LyXText } -void LyXScreen::redraw(BufferView * bv, LyXText * text) +void LyXScreen::redraw(BufferView & bv) { - greyed_out_ = !text; + greyed_out_ = !bv.text; if (greyed_out_) { greyOut(); @@ -359,8 +340,8 @@ void LyXScreen::redraw(BufferView * bv, 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(); Index: frontends/screen.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/screen.h,v retrieving revision 1.20 diff -u -p -r1.20 screen.h --- frontends/screen.h 28 Jul 2003 21:22:42 -0000 1.20 +++ frontends/screen.h 1 Aug 2003 14:46:51 -0000 @@ -61,7 +61,7 @@ public: 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 @@ -82,18 +82,6 @@ public: * Scrolls the screen so that the cursor is 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();