}
-void WorkArea::checkAndGreyOut()
-{
- if (greyed_out_)
- greyOut();
-}
-
-
void WorkArea::redraw(bool singlePar)
{
- if (!buffer_view_)
- return;
-
- if (!buffer_view_->buffer()) {
- checkAndGreyOut();
+ if (!buffer_view_ || !buffer_view_->buffer()) {
+ greyed_out_ = true;
+ // The argument here are meaningless.
+ expose(1,1,1,1);
return;
}
}
-void WorkArea::greyOut()
-{
- greyed_out_ = true;
- expose(4, 5, 3, 3);
-}
-
-
void WorkArea::showCursor()
{
if (cursor_visible_)
/// redraw the screen, without using existing pixmap
virtual void redraw(bool singlePar = false);
///
- void checkAndGreyOut();
- ///
void stopBlinkingCursor();
void startBlinkingCursor();
protected:
- /// grey out (no buffer)
- virtual void greyOut();
///
void processKeySym(LyXKeySymPtr key, key_modifier::state state);
/// cause the display of the given area of the work area
void GuiWorkArea::doGreyOut(QLPainter & pain)
{
- greyed_out_ = true;
pain.fillRectangle(0, 0, width(), height(),
LColor::bottomarea);
}
-
void GuiWorkArea::expose(int x, int y, int w, int h)
{
QLPainter pain(&screen_);
- if (w == 3) { // FIXME HACK
- // Assume splash screen drawing is requested when
- // width == 3
+ if (greyed_out_) {
lyxerr << "splash screen requested" << endl;
+ verticalScrollBar()->hide();
doGreyOut(pain);
- }
- else if (!buffer_view_->buffer()) {
- lyxerr << "no buffer: " << endl;
- doGreyOut(pain);
- updateScrollbar();
- }
- else {
- paintText(*buffer_view_, pain);
+ update(0, 0, width(), height());
+ return;
}
+ paintText(*buffer_view_, pain);
update(x, y, w, h);
}