]> git.lyx.org Git - features.git/commitdiff
rename the refresh stuff
authorJohn Levon <levon@movementarian.org>
Tue, 25 Mar 2003 01:28:29 +0000 (01:28 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 25 Mar 2003 01:28:29 +0000 (01:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6572 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/ChangeLog
src/frontends/screen.C
src/frontends/screen.h
src/insets/ChangeLog
src/insets/insettabular.C
src/insets/insettext.C
src/lyxtext.h
src/text2.C
src/text3.C

index c2ff2de4402d8374c2ebe99bbe4be0038b3ac9fd..750963d3f585f835021a342d1de9794e2f35ca13 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-25  John Levon  <levon@movementarian.org>
+
+       * lyxtext.h:
+       * text2.C:
+       * text3.C: rename the refreshing stuff to better names
+
 2003-03-24  John Levon  <levon@movementarian.org>
 
        * BufferView_pimpl.h:
index 13733d3b26606ca87d4bdfdb93b75abfe741db82..d400b7496520585f29a25a57fd5fb4aeecb6af93 100644 (file)
@@ -1,7 +1,8 @@
 2003-03-22  John Levon  <levon@movementarian.org>
 
        * screen.C:
-       * screen.h:
+       * screen.h: LyXText refresh renamings
+
 2003-03-17  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * adjust for BufferView* arg removal from lyxtext.
index 58b7d17e6e969f43c10359691065f125049b4cfe..a7e6f67c9fd090b503505c329899e8d174435c75 100644 (file)
@@ -252,15 +252,15 @@ void LyXScreen::update(BufferView & bv, int yo, int xo)
 
        workarea().getPainter().start();
 
-       switch (text->status()) {
-       case LyXText::NEED_MORE_REFRESH:
+       switch (text->refreshStatus()) {
+       case LyXText::REFRESH_AREA:
        {
                int const y = max(int(text->refresh_y - text->top_y()), 0);
                drawFromTo(text, &bv, y, vheight, yo, xo);
                expose(0, y, vwidth, vheight - y);
        }
        break;
-       case LyXText::NEED_VERY_LITTLE_REFRESH:
+       case LyXText::REFRESH_ROW:
        {
                // ok I will update the current cursor row
                drawOneRow(text, &bv, text->refresh_row, text->refresh_y,
@@ -273,7 +273,7 @@ void LyXScreen::update(BufferView & bv, int yo, int xo)
                }
        }
        break;
-       case LyXText::UNCHANGED:
+       case LyXText::REFRESH_NONE:
                // Nothing needs done
                break;
        }
index 4239c575697d6ccf224ce9cd082c12d0ede1eabd..2c012d97d757680b3d5cc18648c5af9dfa7badb5 100644 (file)
@@ -123,9 +123,9 @@ public:
         * @param yo the x offset into the text
         *
         * Updates part of the screen. If bv->text->status is
-        * LyXText::NEED_MORE_REFRESH, we update from the
+        * LyXText::REFRESH_AREA, we update from the
         * point of change and to the end of the screen.
-        * If text->status is LyXText::NEED_VERY_LITTLE_REFRESH,
+        * If text->status is LyXText::REFRESH_ROW,
         * we only update the current row.
         */
        virtual void update(BufferView & bv, int yo = 0, int xo = 0);
index ebfa63cf333dbc5d2f7ef5ae3a12bf7e45628983..ad46449fb61b2b55f692b0c9c11b2bf46272e222 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-25  John Levon  <levon@movementarian.org>
+
+       * insettext.C:
+       * insettabular.C: LyXText renamings
+
 2003-03-24  John Levon  <levon@movementarian.org>
 
        * insettext.C: remove some dead code. Fix bug 972 and
index cd4d6d6204f478147e20b2b04cd97a952797f42e..36649405e4cb7e487a56b5a6ff8c86ab76ec0716 100644 (file)
@@ -411,7 +411,7 @@ void InsetTabular::update(BufferView * bv, bool reinit)
        if (the_locking_inset)
                the_locking_inset->update(bv, reinit);
        if (need_update < FULL &&
-               bv->text->status() == LyXText::NEED_MORE_REFRESH)
+               bv->text->refreshStatus() == LyXText::REFRESH_AREA)
        {
                need_update = FULL;
        }
index addaf9faf3bbf2d11b2b81f5aca50c1acf257061..2a9486ae4c58c14b10320d848e740cfb671169fc 100644 (file)
@@ -499,12 +499,12 @@ void InsetText::update(BufferView * bv, bool reinit)
                lt = getLyXText(bv);
                clear = true;
        }
-       if ((need_update & CURSOR_PAR) && (lt->status() == LyXText::UNCHANGED) &&
+       if ((need_update & CURSOR_PAR) && (lt->refreshStatus() == LyXText::REFRESH_NONE) &&
                the_locking_inset) {
                lt->updateInset(the_locking_inset);
        }
 
-       if (lt->status() == LyXText::NEED_MORE_REFRESH)
+       if (lt->refreshStatus() == LyXText::REFRESH_AREA)
                need_update |= FULL;
        if (clear)
                lt = 0;
@@ -525,14 +525,14 @@ void InsetText::setUpdateStatus(BufferView * bv, int what) const
        LyXText * llt = getLyXText(bv);
 
        need_update |= what;
-       // we have to redraw us full if our LyXText NEED_MORE_REFRESH or
+       // we have to redraw us full if our LyXText REFRESH_AREA or
        // if we don't break row so that we only have one row to update!
-       if ((llt->status() == LyXText::NEED_MORE_REFRESH) ||
+       if ((llt->refreshStatus() == LyXText::REFRESH_AREA) ||
            (!autoBreakRows &&
-            (llt->status() == LyXText::NEED_VERY_LITTLE_REFRESH)))
+            (llt->refreshStatus() == LyXText::REFRESH_ROW)))
        {
                need_update |= FULL;
-       } else if (llt->status() == LyXText::NEED_VERY_LITTLE_REFRESH) {
+       } else if (llt->refreshStatus() == LyXText::REFRESH_ROW) {
                need_update |= CURSOR_PAR;
        }
 
@@ -558,7 +558,7 @@ void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty)
        setUpdateStatus(bv, what);
        bool flag = mark_dirty ||
                (((need_update != CURSOR) && (need_update != NONE)) ||
-                (lt->status() != LyXText::UNCHANGED) || lt->selection.set());
+                (lt->refreshStatus() != LyXText::REFRESH_NONE) || lt->selection.set());
        if (!lt->selection.set())
                lt->selection.cursor = lt->cursor;
 
index eba0ec42a631c4769b0f6b4745393374e5ce8bd5..8bcb5667d4aaf64bf37d589dd6116aa51882ca5e 100644 (file)
@@ -37,13 +37,13 @@ class ParagraphList;
 class LyXText {
 public:
        /// what repainting is needed
-       enum text_status {
+       enum refresh_status {
                /// no repaint is needed
-               UNCHANGED = 0,
+               REFRESH_NONE = 0,
                /// the refresh_row needs repainting
-               NEED_VERY_LITTLE_REFRESH = 1,
+               REFRESH_ROW = 1,
                /// everything from refresh_y downwards needs repainting
-               NEED_MORE_REFRESH = 2
+               REFRESH_AREA = 2
        };
 
        ///
@@ -207,26 +207,25 @@ public:
         * Return the status. This represents what repaints are
         * pending after some operation (e.g. inserting a char).
         */
-       text_status status() const;
+       refresh_status refreshStatus() const;
 
 private:
        /**
         * The pixel y position from which to repaint the screen.
         * The position is absolute along the height of outermost
-        * lyxtext (I think). NEED_MORE_REFRESH and NEED_LITTLE_REFRESH
+        * lyxtext (I think). REFRESH_AREA and REFRESH_ROW
         * repaints both use this as a starting point (if it's within
         * the viewable portion of the lyxtext).
         */
        int refresh_y;
        /**
         * The row from which to repaint the screen, used by screen.c.
-        * This must be set if the pending update is NEED_LITTLE_REFRESH.
-        * It doesn't make any difference for NEED_MORE_REFRESH.
+        * This must be set if the pending update is REFRESH_ROW.
+        * It doesn't make any difference for REFRESH_AREA.
         */
        Row * refresh_row;
 
-       /// refresh status
-       text_status status_;
+       refresh_status refresh_status_;
 
        /// only the top-level LyXText has this non-zero
        BufferView * bv_owner;
index 9410373ee222a333fe2ab59b6c7a4896e8c6401c..df586f98930be45fc2c8d5ed6a097e4de2f5b2a5 100644 (file)
@@ -2442,15 +2442,15 @@ void LyXText::ownerParagraph(int id, Paragraph * p) const
 }
 
 
-LyXText::text_status LyXText::status() const
+LyXText::refresh_status LyXText::refreshStatus() const
 {
-       return status_;
+       return refresh_status_;
 }
 
 
 void LyXText::clearPaint()
 {
-       status_ = UNCHANGED;
+       refresh_status_ = REFRESH_NONE;
        refresh_row = 0;
        refresh_y = 0;
 }
@@ -2458,14 +2458,13 @@ void LyXText::clearPaint()
 
 void LyXText::postPaint(int start_y)
 {
-       text_status old = status_;
+       refresh_status old = refresh_status_;
 
-       status_ = NEED_MORE_REFRESH;
+       refresh_status_ = REFRESH_AREA;
        refresh_row = 0;
 
-       if (old != UNCHANGED && refresh_y < start_y) {
+       if (old != REFRESH_NONE && refresh_y < start_y)
                return;
-       }
 
        refresh_y = start_y;
 
@@ -2483,17 +2482,17 @@ void LyXText::postPaint(int start_y)
 // make refresh_y be 0, and use row->y etc.
 void LyXText::postRowPaint(Row * row, int start_y)
 {
-       if (status_ != UNCHANGED && refresh_y < start_y) {
-               status_ = NEED_MORE_REFRESH;
+       if (refresh_status_ != REFRESH_NONE && refresh_y < start_y) {
+               refresh_status_ = REFRESH_AREA;
                return;
        } else {
                refresh_y = start_y;
        }
 
-       if (status_ == NEED_MORE_REFRESH)
+       if (refresh_status_ == REFRESH_AREA)
                return;
 
-       status_ = NEED_VERY_LITTLE_REFRESH;
+       refresh_status_ = REFRESH_ROW;
        refresh_row = row;
 
        if (!inset_owner)
index 6e9ed0883d55f56c23ab9415502c7c883d1eb2bf..34885b68033ae55c82c9b64dd5e190530907b54b 100644 (file)
@@ -67,7 +67,7 @@ namespace {
                if (!lt->isInInset()) {
                        bv->update(lt, BufferView::SELECT);
                        bv->showCursor();
-               } else if (bv->text->status() != LyXText::UNCHANGED) {
+               } else if (bv->text->refreshStatus() != LyXText::REFRESH_NONE) {
                        bv->theLockingInset()->hideInsetCursor(bv);
                        bv->update(BufferView::SELECT);
                        bv->showCursor();