#include "font_metrics.h"
#include "language.h"
#include "debug.h"
+#include "rowpainter.h"
// Splash screen-specific stuff
#include "lyxfont.h"
LyXScreen::LyXScreen()
- : cursor_visible_(false), force_clear_(true), greyed_out_(false)
+ : cursor_visible_(false), force_clear_(true), greyed_out_(true)
{
// Start loading the pixmap as soon as possible
if (lyxrc.show_banner) {
{
greyed_out_ = !text;
- workarea().getPainter().start();
-
if (greyed_out_) {
greyOut();
return;
}
+ workarea().getPainter().start();
+
drawFromTo(text, bv, 0, workarea().workHeight(), 0, 0, text == bv->text);
expose(0, 0, workarea().workWidth(), workarea().workHeight());
if (!greyed_out_)
return;
+ workarea().getPainter().start();
+
workarea().getPainter().fillRectangle(0, 0,
workarea().workWidth(),
workarea().workHeight(),
while (row != 0 && y < y2) {
LyXText::text_status st = text->status();
- text->getVisibleRow(bv, y + yo,
- xo, row, y + text->first_y);
+ // we need this here as the row pointer may be illegal
+ // at a later time (Jug20020502)
+ Row * prev = row->previous();
+ RowPainter rp(*bv, *text, *row);
+ if (rp.paint(y + yo, xo, y + text->first_y))
+ text->markChangeInDraw(bv, row, prev);
+
internal = internal && (st != LyXText::CHANGED_IN_DRAW);
while (internal && text->status() == LyXText::CHANGED_IN_DRAW) {
text->fullRebreak(bv);
st = LyXText::NEED_MORE_REFRESH;
text->setCursor(bv, text->cursor.par(), text->cursor.pos());
text->status(bv, st);
- text->getVisibleRow(bv, y + yo,
- xo, row, y + text->first_y);
+ Row * prev = row->previous();
+ RowPainter rp(*bv, *text, *row);
+ if (rp.paint(y + yo, xo, y + text->first_y))
+ text->markChangeInDraw(bv, row, prev);
}
y += row->height();
row = row->next();
if (((y + row->height()) > 0) &&
((y - row->height()) <= static_cast<int>(workarea().workHeight()))) {
- text->getVisibleRow(bv, y, xo, row, y + text->first_y);
+ Row * prev = row->previous();
+ RowPainter rp(*bv, *text, *row);
+ if (rp.paint(y, xo, y + text->first_y))
+ text->markChangeInDraw(bv, row, prev);
}
force_clear_ = false;
}