*
* \author John Levon
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*
* Splash screen code added by Angus Leeming
*/
}
-bool LyXScreen::fitManualCursor(BufferView * bv, LyXText * text,
+bool LyXScreen::fitManualCursor(BufferView * /*bv*/, LyXText * text,
int /*x*/, int y, int asc, int desc)
{
int const vheight = workarea().workHeight();
return false;
text->top_y(newtop);
- //draw();
return true;
}
RowList::iterator row = text->cursorRow();
-#warning SUPER HACK DISABLED (Lgb)
-#if 0
- // Is this a hack? Yes, probably... (Lgb)
- if (!row)
- return max(newtop, 0);
-#endif
- if (cursor.y() - row->baseline() + row->height() - top_y >= vheight) {
+ if (int(cursor.y() - row->baseline() + row->height() - top_y) >= vheight) {
if (row->height() < vheight
&& row->height() > vheight / 4) {
newtop = cursor.y()
}
}
- newtop = max(newtop, 0);
-
- return newtop;
+ return max(newtop, 0);
}
int const newtop = topCursorVisible(text);
bool const result = (newtop != text->top_y());
text->top_y(newtop);
- //if (result)
- // draw();
return result;
}
workarea().getPainter().start();
- bv.text->updateRowPositions();
- drawFromTo(bv.text, &bv);
+ hideCursor();
+
+ int const y = paintText(bv, *bv.text);
+
+ // maybe we have to clear the screen at the bottom
+ int const y2 = workarea().workHeight();
+ if (y < y2 && !bv.text->isInInset()) {
+ workarea().getPainter().fillRectangle(0, y,
+ workarea().workWidth(), y2 - y,
+ LColor::bottomarea);
+ }
+
expose(0, 0, workarea().workWidth(), workarea().workHeight());
workarea().getPainter().end();
expose(0, 0, workarea().workWidth(), workarea().workHeight());
workarea().getPainter().end();
}
-
-
-void LyXScreen::drawFromTo(LyXText * text, BufferView * bv)
-{
- hideCursor();
- int const y2 = workarea().workHeight();
- int const topy = text->top_y();
- int y_text = topy;
- ParagraphList::iterator dummypit;
- RowList::iterator rit = text->getRowNearY(y_text, dummypit);
- int y = y_text - topy;
-
- y = paintRows(*bv, *text, rit, 0, y, y, y2, 0);
-
- // maybe we have to clear the screen at the bottom
- if (y < y2 && !text->isInInset()) {
- workarea().getPainter().fillRectangle(0, y,
- workarea().workWidth(), y2 - y,
- LColor::bottomarea);
- }
-}