void WinEDA_PcbFrame::RedrawActiveWindow(wxDC * DC, bool EraseBg) /****************************************************************/ /* Trace le PCB, et les elements complementaires ( axes, grille .. ) pour l'ecran actif et ses sous ecran */ { PCB_SCREEN * Screen = GetScreen(); if ( ! m_Pcb || ! Screen ) return; ActiveScreen = GetScreen(); GRSetDrawMode(DC, GR_COPY); if ( EraseBg ) DrawPanel->EraseScreen(DC); DrawPanel->DrawBackGround(DC); Trace_Pcb(DC, GR_OR); TraceWorkSheet(DC, GetScreen()); Affiche_Status_Box(); /* Reaffichage des curseurs */ for( Screen = GetScreen(); Screen != NULL; Screen = Screen->Next() ) { if( m_CurrentScreen->ManageCurseur ) m_CurrentScreen->ManageCurseur(DrawPanel, DC, FALSE); Screen->Trace_Curseur(DrawPanel, DC); } }
/* * Redraws only the active window which is assumed to be whole visible. */ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) { if( GetScreen() == NULL ) return; m_canvas->DrawBackGround( DC ); GetScreen()->Draw( m_canvas, DC, GR_DEFAULT_DRAWMODE ); TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness ); #ifdef USE_WX_OVERLAY if( IsShown() ) { m_overlay.Reset(); wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC ); overlaydc.Clear(); /* TODO: Investigate why toolbars are affected - to be searched in wxWidgets */ m_mainToolBar->Refresh(); m_drawToolBar->Refresh(); m_optionsToolBar->Refresh(); } #endif if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); m_canvas->DrawCrossHair( DC ); // Display the sheet filename, and the sheet path, for non root sheets UpdateTitle(); }
void WinEDA_ModuleEditFrame::RedrawActiveWindow(wxDC * DC, bool EraseBg) /**********************************************************************/ /* Trace le PCB, et les elements complementaires ( axes, grille .. ) pour l'ecran actif et ses sous ecran */ { MODULE * Module; PCB_SCREEN * screen = GetScreen(); if ( ! m_Pcb || ! screen ) return; ActiveScreen = screen; GRSetDrawMode(DC, GR_COPY); if ( EraseBg ) DrawPanel->EraseScreen(DC); DrawPanel->DrawBackGround(DC); TraceWorkSheet(DC, screen); Module = (MODULE*) m_Pcb->m_Modules; for ( ; Module != NULL; Module = (MODULE *) Module->Pnext ) { Module->Draw(DrawPanel, DC, wxPoint(0,0), GR_OR); } Affiche_Status_Box(); if( screen->ManageCurseur ) screen->ManageCurseur(DrawPanel, DC, FALSE); /* Reaffichage du curseur */ screen->Trace_Curseur(DrawPanel, DC); screen->ClrRefreshReq(); }