You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.2 KiB

17 years ago
17 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
  5. * Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
  6. * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, you may find one here:
  20. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  21. * or you may search the http://www.gnu.org website for the version 2 license,
  22. * or you may write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  24. */
  25. /**
  26. * @file eeredraw.cpp
  27. */
  28. #include <fctsys.h>
  29. #include <gr_basic.h>
  30. #include <sch_draw_panel.h>
  31. #include <sch_edit_frame.h>
  32. #include <general.h>
  33. void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, const COLOR4D& Color )
  34. {
  35. BASE_SCREEN* screen = panel->GetScreen();
  36. if( !screen->m_IsPrinting ) /* Draw but do not print the Dangling Symbol */
  37. {
  38. GRRect( panel->GetClipBox(), DC,
  39. pos.x - DANGLING_SYMBOL_SIZE, pos.y - DANGLING_SYMBOL_SIZE,
  40. pos.x + DANGLING_SYMBOL_SIZE, pos.y + DANGLING_SYMBOL_SIZE,
  41. 0, Color );
  42. }
  43. }
  44. /*
  45. * Redraws only the active window which is assumed to be whole visible.
  46. */
  47. void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
  48. {
  49. if( GetScreen() == NULL )
  50. return;
  51. if( m_canvas->IsMouseCaptured() )
  52. m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
  53. // Display the sheet filename, and the sheet path, for non root sheets
  54. UpdateTitle();
  55. }