]> git.lyx.org Git - features.git/commitdiff
* screen.[Ch]: merge update() and repaint()
authorAndré Pönitz <poenitz@gmx.net>
Fri, 1 Aug 2003 14:51:09 +0000 (14:51 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 1 Aug 2003 14:51:09 +0000 (14:51 +0000)
suppress excessive debug messages

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7475 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/frontends/ChangeLog
src/frontends/screen.C
src/frontends/screen.h
src/text2.C

index 4ce52f79b339c811779c034a5bd2eef56b7d2bee..533b520f307fdb14645801ead23acb40d45cffad 100644 (file)
@@ -469,7 +469,8 @@ int BufferView::Pimpl::resizeCurrentBuffer()
 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 8e9303ba9d165e71fefe57de505bdb0fea961438..4232770fa9eb6cdb0420bb61d437f06f4f2e61ae 100644 (file)
@@ -1,4 +1,8 @@
 
+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.
index 48060a82dad6b5d33eeb59d8ff43176fe4d058c7..a98e78b9498d45e5bdc8955f209227b109a668c5 100644 (file)
@@ -297,25 +297,6 @@ bool LyXScreen::fitCursor(LyXText * text, BufferView * bv)
 }
 
 
-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 * text, BufferView * bv,
 }
 
 
-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, LyXText * text)
 
        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 9f87cb5c6b5aea531b478ad42071604eebf4bb60..f50001740217d829422904fcb415bd81061cfec9 100644 (file)
@@ -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
@@ -83,18 +83,6 @@ public:
         */
        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();
        
index 16c8484a1427e41a103528e6afb5550fa7552b7d..7ae9733aa342e4a244cebd48a8801d09fb90e8ec 100644 (file)
@@ -648,7 +648,7 @@ void LyXText::redoParagraph(ParagraphList::iterator pit)
        // 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(ParagraphList::iterator pit)
                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(ParagraphList::iterator pit)
                // 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);