+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:
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.
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,
}
}
break;
- case LyXText::UNCHANGED:
+ case LyXText::REFRESH_NONE:
// Nothing needs done
break;
}
* @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);
+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
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;
}
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;
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;
}
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;
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
};
///
* 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;
}
-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;
}
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;
// 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)
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();