]> git.lyx.org Git - lyx.git/commitdiff
Second part of r14315 from the younes branch:
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 3 Jul 2006 20:37:34 +0000 (20:37 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 3 Jul 2006 20:37:34 +0000 (20:37 +0000)
* BufferView and Bufferview::pimpl: repaintAll() methods deleted.

* rowpainter.C:
  - refreshInside : new variable in the anonymous namespace.
  - use of refreshInside instead of the repaintAll() methods

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

src/BufferView.C
src/BufferView.h
src/BufferView_pimpl.h
src/rowpainter.C

index 2f23937c28db776b9160a156392f7447c51ba250..bd4324cb77146165d03f940d04de44a01e0ef9ce 100644 (file)
@@ -386,18 +386,6 @@ void BufferView::putSelectionAt(DocIterator const & cur,
 }
 
 
-bool const BufferView::repaintAll() const
-{
-       return pimpl_->repaintAll();
-}
-
-
-void const BufferView::repaintAll(bool r) const
-{
-       pimpl_->repaintAll(r);
-}
-
-
 LCursor & BufferView::cursor()
 {
        return pimpl_->cursor_;
index c5423f936df12e087c242004a0042449df362404..1edfa4c56338e6ca10b8d4758585feb79ced48ef 100644 (file)
@@ -232,10 +232,6 @@ public:
         */
        void putSelectionAt(DocIterator const & cur,
                int length, bool backwards);
-       ///
-       bool const repaintAll() const;
-       ///
-       void const repaintAll(bool r) const;
 
 private:
        ///
index 18a019f958e07abf2ec621118c0c92b537f91529..4f49920c7925ad2eff1cd81a34daa61bcc1be604 100644 (file)
@@ -106,10 +106,6 @@ public:
        FuncStatus getStatus(FuncRequest const & cmd);
        /// a function should be executed
        bool dispatch(FuncRequest const & ev);
-       /// Flag: do a full redraw of inside text of inset
-       bool repaintAll() { return refresh_inside_; }
-       ///
-       void repaintAll(bool r) {refresh_inside_ = r; }
 
        /// the frontend
        lyx::frontend::Gui & gui() const;
@@ -215,7 +211,5 @@ private:
        int offset_ref_;
        ///
        ViewMetricsInfo metrics(bool singlepar = false);
-       /// Working variable indicating a full screen refresh
-       mutable bool refresh_inside_;
 };
 #endif // BUFFERVIEW_PIMPL_H
index e9340dce93a8289794cfa697f70b611bb8bf567b..b04ca0f7e107b52894ffb941e678562c1eb6c94e 100644 (file)
@@ -56,6 +56,10 @@ using std::string;
 
 namespace {
 
+/// Flag: do a full redraw of inside text of inset
+/// Working variable indicating a full screen refresh
+bool refreshInside;
+
 /**
  * A class used for painting an individual row of text.
  */
@@ -169,15 +173,15 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font)
        theCoords.insets().add(inset, int(x_), yo_);
        InsetText const * const in = inset->asTextInset();
        // non-wide insets are painted completely. Recursive
-       bool tmp = bv_.repaintAll();
+       bool tmp = refreshInside;
        if (!in || !in->Wide()) {
-               bv_.repaintAll(true);
+               refreshInside = true;
                lyxerr[Debug::PAINTING] << endl << "Paint inset fully" << endl;
        }
-       if (bv_.repaintAll())
+       if (refreshInside)
                inset->drawSelection(pi, int(x_), yo_);
        inset->draw(pi, int(x_), yo_);
-       bv_.repaintAll(tmp);
+       refreshInside = tmp;
        x_ += inset->width();
 }
 
@@ -801,9 +805,9 @@ void paintPar
        lyx::size_type rowno(0);
        for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
                y += rit->ascent();
-               // Allow setting of bv->repaintAll() for nested insets in
+               // Allow setting of refreshInside for nested insets in
                // this row only
-               bool tmp = pi.base.bv->repaintAll();
+               bool tmp = refreshInside;
 
                // Row signature; has row changed since last paint?
                lyx::size_type const row_sig = calculateRowSignature(*rit, par, x, y);
@@ -843,7 +847,7 @@ void paintPar
                                // If outer row has changed, force nested
                                // insets to repaint completely
                                if (row_has_changed)
-                                       pi.base.bv->repaintAll(true);
+                                       refreshInside = true;
                        }
 
                        // Instrumentation for testing row cache (see also
@@ -865,7 +869,7 @@ void paintPar
                }
                y += rit->descent();
                // Restore, see above
-               pi.base.bv->repaintAll(tmp);
+               refreshInside = tmp;
        }
        lyxerr[Debug::PAINTING] << "." << endl;
 }
@@ -881,7 +885,7 @@ void paintText(BufferView const & bv, ViewMetricsInfo const & vi)
 
        PainterInfo pi(const_cast<BufferView *>(&bv), pain);
        // Should the whole screen, including insets, be refreshed?
-       bool repaintAll(select || !vi.singlepar);
+       bool repaintAll = select || !vi.singlepar;
 
        if (repaintAll) {
                // Clear background (if not delegated to rows)
@@ -895,7 +899,7 @@ void paintText(BufferView const & bv, ViewMetricsInfo const & vi)
        int yy = vi.y1;
        // draw contents
        for (pit_type pit = vi.p1; pit <= vi.p2; ++pit) {
-               bv.repaintAll(repaintAll);
+               refreshInside = repaintAll;
                Paragraph const & par = text->getPar(pit);
                yy += par.ascent();
                paintPar(pi, *bv.text(), pit, 0, yy, repaintAll);
@@ -936,7 +940,7 @@ void paintTextInset(LyXText const & text, PainterInfo & pi, int x, int y)
 
        y -= text.getPar(0).ascent();
        // This flag can not be set from within same inset:
-       bool repaintAll = pi.base.bv->repaintAll();
+       bool repaintAll = refreshInside;
        for (int pit = 0; pit < int(text.paragraphs().size()); ++pit) {
                y += text.getPar(pit).ascent();
                paintPar(pi, text, pit, x, y, repaintAll);