void View::Refresh( void ) { Window *win = static_cast<Window *>( windows.Tail() ); Flood( Color(CF_COLOR_WHITE) ); while ( win ) { if ( !win->Closed() ) { win->Blit( this, Rect( 0, 0, win->Width(), win->Height() ), win->LeftEdge(), win->TopEdge() ); } win = static_cast<Window *>( win->Prev() ); } // now update the display Update(); }
void View::Refresh( const Rect &refresh ) { Window *window = static_cast<Window *>( windows.Tail() ); Rect v( refresh ); v.Clip( *this ); FillRect( v, Color(CF_COLOR_WHITE) ); while ( window ) { if ( !window->Closed() ) { // clip the window to the refresh area Rect win = *window; Rect src( 0, 0, window->Width(), window->Height() ); win.ClipBlit( src, v ); if ( win.Width() && win.Height() ) window->Blit( this, src, win.LeftEdge(), win.TopEdge() ); } window = static_cast<Window *>( window->Prev() ); } Update( v ); }