From 73e38ce98c6ede45109fb63cb4bc3af3bfbe40cd Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 21 Jan 2011 14:30:59 -0500 Subject: [PATCH] EESchema code refactoring and coding policy naming fixes. * Move schematic wire and bus break code into schematic screen object. * Move schematic test for dangling ends into schematic screen object. * Remove left over debugging output in schematic screen object. * Remove unused file eeschema/cleanup.cpp. * Fix bug in schematic line object hit test algorithm. * Fix a string concatenation compile error added in r2752. * Rename class WinEDA_BasicFrame to EDA_BASE_FRAME. * Rename class WinEDA_DrawFrame to EDA_DRAW_FRAME. * Rename class WinEDA_DrawPanel to EDA_DRAW_PANEL. --- common/base_struct.cpp | 4 +- common/basicframe.cpp | 44 +++---- common/block_commande.cpp | 18 ++- common/class_marker_base.cpp | 4 +- common/common.cpp | 2 +- common/common_plot_functions.cpp | 2 +- common/copy_to_clipboard.cpp | 6 +- common/dialogs/dialog_get_component.cpp | 10 +- common/dialogs/dialog_hotkeys_editor.cpp | 4 +- common/dialogs/dialog_page_settings.cpp | 4 +- common/dialogs/dialog_page_settings.h | 4 +- common/displlst.cpp | 20 +-- common/drawframe.cpp | 96 +++++++------- common/drawpanel.cpp | 123 +++++++++--------- common/drawtxt.cpp | 2 +- common/eda_dde.cpp | 6 +- common/hotkeys_basic.cpp | 19 ++- common/msgpanel.cpp | 2 +- common/worksheet.cpp | 12 +- common/zoom.cpp | 12 +- cvpcb/cvframe.cpp | 14 +- cvpcb/cvstruct.h | 2 +- cvpcb/setvisu.cpp | 2 +- eeschema/CMakeLists.txt | 1 - eeschema/block.cpp | 23 ++-- eeschema/block_libedit.cpp | 4 +- eeschema/bus-wire-junction.cpp | 18 +-- eeschema/busentry.cpp | 6 +- eeschema/class_libentry.cpp | 4 +- eeschema/class_libentry.h | 4 +- eeschema/cleanup.cpp | 105 --------------- eeschema/dangling_ends.cpp | 19 --- eeschema/database.cpp | 2 +- eeschema/delete.cpp | 6 +- eeschema/dialogs/dialog_SVG_print.cpp | 14 +- eeschema/dialogs/dialog_SVG_print.h | 10 +- eeschema/dialogs/dialog_build_BOM.cpp | 2 +- eeschema/dialogs/dialog_build_BOM.h | 10 +- eeschema/dialogs/dialog_color_config.cpp | 2 +- eeschema/dialogs/dialog_color_config.h | 4 +- .../dialog_edit_component_in_schematic.cpp | 4 +- eeschema/dialogs/dialog_eeschema_config.cpp | 4 +- eeschema/dialogs/dialog_eeschema_config.h | 4 +- .../dialogs/dialog_print_using_printer.cpp | 2 +- eeschema/edit_component_in_schematic.cpp | 10 +- eeschema/edit_label.cpp | 8 +- eeschema/eeredraw.cpp | 2 +- eeschema/eeschema_config.cpp | 4 +- eeschema/erc.cpp | 6 +- eeschema/erc.h | 8 +- eeschema/getpart.cpp | 14 +- eeschema/hotkeys.cpp | 4 +- eeschema/lib_arc.cpp | 4 +- eeschema/lib_arc.h | 4 +- eeschema/lib_bezier.cpp | 4 +- eeschema/lib_bezier.h | 4 +- eeschema/lib_circle.cpp | 4 +- eeschema/lib_circle.h | 4 +- eeschema/lib_draw_item.cpp | 4 +- eeschema/lib_draw_item.h | 6 +- eeschema/lib_field.cpp | 4 +- eeschema/lib_field.h | 4 +- eeschema/lib_pin.cpp | 46 +++---- eeschema/lib_pin.h | 8 +- eeschema/lib_polyline.cpp | 4 +- eeschema/lib_polyline.h | 4 +- eeschema/lib_rectangle.cpp | 4 +- eeschema/lib_rectangle.h | 4 +- eeschema/lib_text.cpp | 4 +- eeschema/lib_text.h | 4 +- eeschema/libeditframe.cpp | 18 +-- eeschema/libeditframe.h | 2 +- eeschema/load_one_schematic_file.cpp | 2 +- eeschema/onleftclick.cpp | 22 ++-- eeschema/operations_on_items_lists.cpp | 6 +- eeschema/pinedit.cpp | 11 +- eeschema/protos.h | 47 +++---- eeschema/sch_bus_entry.cpp | 2 +- eeschema/sch_bus_entry.h | 2 +- eeschema/sch_component.cpp | 4 +- eeschema/sch_component.h | 24 ++-- eeschema/sch_field.cpp | 2 +- eeschema/sch_field.h | 10 +- eeschema/sch_junction.cpp | 2 +- eeschema/sch_junction.h | 2 +- eeschema/sch_line.cpp | 22 ++-- eeschema/sch_line.h | 2 +- eeschema/sch_marker.cpp | 4 +- eeschema/sch_marker.h | 4 +- eeschema/sch_no_connect.cpp | 2 +- eeschema/sch_no_connect.h | 2 +- eeschema/sch_polyline.cpp | 2 +- eeschema/sch_polyline.h | 2 +- eeschema/sch_screen.cpp | 103 +++++++++++++-- eeschema/sch_sheet.cpp | 4 +- eeschema/sch_sheet.h | 22 ++-- eeschema/sch_sheet_pin.cpp | 10 +- eeschema/sch_text.cpp | 24 ++-- eeschema/sch_text.h | 40 +++--- eeschema/schedit.cpp | 14 +- eeschema/schematic_undo_redo.cpp | 4 +- eeschema/schframe.cpp | 22 ++-- eeschema/selpart.cpp | 7 +- eeschema/sheet.cpp | 4 +- eeschema/sheetlab.cpp | 8 +- eeschema/symbdraw.cpp | 10 +- eeschema/viewlib_frame.cpp | 11 +- eeschema/viewlib_frame.h | 2 +- gerbview/block.cpp | 8 +- gerbview/class_gerber_draw_item.cpp | 6 +- gerbview/class_gerber_draw_item.h | 12 +- gerbview/draw_gerber_screen.cpp | 2 +- gerbview/gerberframe.cpp | 8 +- include/base_struct.h | 12 +- include/block_commande.h | 10 +- include/class_board_item.h | 6 +- include/class_drawpanel.h | 19 ++- include/class_marker_base.h | 4 +- include/class_sch_screen.h | 32 ++++- include/common.h | 14 +- include/dialog_get_component.h | 6 +- include/dialog_helpers.h | 2 +- include/dialog_hotkeys_editor.h | 8 +- include/drawtxt.h | 4 +- include/gr_basic.h | 2 +- include/hotkeys_basic.h | 4 +- include/sch_item_struct.h | 10 +- include/wxBasePcbFrame.h | 15 ++- include/wxEeschemaStruct.h | 4 +- include/wxstruct.h | 35 +++-- kicad/kicad.h | 2 +- kicad/mainframe.cpp | 6 +- kicad/menubar.cpp | 2 +- kicad/preferences.cpp | 2 +- pcbnew/autorout.cpp | 2 +- pcbnew/basepcbframe.cpp | 12 +- pcbnew/block.cpp | 12 +- pcbnew/block_module_editor.cpp | 5 +- pcbnew/class_board.cpp | 12 +- pcbnew/class_board.h | 21 ++- pcbnew/class_dimension.cpp | 5 +- pcbnew/class_dimension.h | 6 +- pcbnew/class_drawsegment.cpp | 5 +- pcbnew/class_drawsegment.h | 4 +- pcbnew/class_edge_mod.cpp | 5 +- pcbnew/class_edge_mod.h | 6 +- pcbnew/class_marker_pcb.cpp | 2 +- pcbnew/class_marker_pcb.h | 7 +- pcbnew/class_mire.cpp | 3 +- pcbnew/class_mire.h | 3 +- pcbnew/class_module.cpp | 10 +- pcbnew/class_module.h | 17 ++- pcbnew/class_netinfo.h | 12 +- pcbnew/class_netinfo_item.cpp | 20 +-- pcbnew/class_pad.cpp | 2 +- pcbnew/class_pad.h | 10 +- pcbnew/class_pad_draw_functions.cpp | 7 +- pcbnew/class_pcb_text.cpp | 4 +- pcbnew/class_pcb_text.h | 6 +- pcbnew/class_text_mod.cpp | 13 +- pcbnew/class_text_mod.h | 20 +-- pcbnew/class_track.cpp | 12 +- pcbnew/class_track.h | 14 +- pcbnew/class_zone.cpp | 10 +- pcbnew/class_zone.h | 20 +-- pcbnew/dialogs/dialog_SVG_print.cpp | 4 +- pcbnew/dialogs/dialog_SVG_print.h | 2 +- pcbnew/dialogs/dialog_print_for_modedit.cpp | 8 +- pcbnew/dimension.cpp | 8 +- pcbnew/drag.h | 11 +- pcbnew/dragsegm.cpp | 11 +- pcbnew/drc_stuff.h | 2 +- pcbnew/edgemod.cpp | 12 +- pcbnew/edit_pcb_text.cpp | 8 +- pcbnew/editedge.cpp | 13 +- pcbnew/editrack.cpp | 13 +- pcbnew/edtxtmod.cpp | 11 +- pcbnew/loadcmp.cpp | 8 +- pcbnew/mirepcb.cpp | 14 +- pcbnew/module_editor_frame.h | 2 +- pcbnew/moduleframe.cpp | 2 +- pcbnew/modules.cpp | 8 +- pcbnew/move-drag_pads.cpp | 4 +- pcbnew/move_or_drag_track.cpp | 16 +-- pcbnew/muonde.cpp | 12 +- pcbnew/pcbframe.cpp | 10 +- pcbnew/print_board_functions.cpp | 4 +- pcbnew/printout_controler.cpp | 6 +- pcbnew/printout_controler.h | 7 +- pcbnew/protos.h | 19 ++- pcbnew/solve.cpp | 2 +- pcbnew/tracepcb.cpp | 10 +- pcbnew/trpiste.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 20 +-- 194 files changed, 994 insertions(+), 1094 deletions(-) delete mode 100644 eeschema/cleanup.cpp diff --git a/common/base_struct.cpp b/common/base_struct.cpp index eb66499876..a4dc49c6df 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -337,7 +337,7 @@ bool EDA_TextStruct::TextHitTest( const EDA_Rect& aRect, bool aContains, int aAc } -void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void EDA_TextStruct::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, int aDrawMode, GRTraceMode aFillMode, EDA_Colors aAnchor_color ) { @@ -381,7 +381,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& a } -void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC, +void EDA_TextStruct::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, int aDrawMode, GRTraceMode aFillMode, EDA_Colors aAnchor_color, diff --git a/common/basicframe.cpp b/common/basicframe.cpp index c92bb9d0ef..a8999c31fd 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -1,5 +1,5 @@ /** - * WinEDA_BasicFrame Class Functions + * EDA_BASE_FRAME Class Functions * @file basicframe.cpp */ @@ -23,14 +23,14 @@ #include "bitmaps.h" /* - * Class constructor for WinEDA_BasicFrame general options + * Class constructor for EDA_BASE_FRAME general options */ -WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, - int idtype, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style ) : +EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* father, + int idtype, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style ) : wxFrame( father, -1, title, pos, size, style ) { wxSize minsize; @@ -58,11 +58,11 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, Connect( ID_HELP_COPY_VERSION_STRING, wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler( WinEDA_BasicFrame::CopyVersionInfoToClipboard ) ); + wxCommandEventHandler( EDA_BASE_FRAME::CopyVersionInfoToClipboard ) ); } -WinEDA_BasicFrame::~WinEDA_BasicFrame() +EDA_BASE_FRAME::~EDA_BASE_FRAME() { if( wxGetApp().m_HtmlCtrl ) delete wxGetApp().m_HtmlCtrl; @@ -78,7 +78,7 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame() /* * Virtual function */ -void WinEDA_BasicFrame::ReCreateMenuBar() +void EDA_BASE_FRAME::ReCreateMenuBar() { } @@ -88,7 +88,7 @@ void WinEDA_BasicFrame::ReCreateMenuBar() * called on a language menu selection * when using a derived function, do not forget to call this one */ -void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event ) +void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event ) { int id = event.GetId(); @@ -106,7 +106,7 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event ) * parameters. Don't forget to call the base method or your frames won't * remember their positions and sizes. */ -void WinEDA_BasicFrame::LoadSettings() +void EDA_BASE_FRAME::LoadSettings() { wxString text; int Ypos_min; @@ -146,7 +146,7 @@ void WinEDA_BasicFrame::LoadSettings() * parameters. Don't forget to call the base method or your frames won't * remember their positions and sizes. */ -void WinEDA_BasicFrame::SaveSettings() +void EDA_BASE_FRAME::SaveSettings() { wxString text; wxConfig* config; @@ -170,7 +170,7 @@ void WinEDA_BasicFrame::SaveSettings() } -void WinEDA_BasicFrame::PrintMsg( const wxString& text ) +void EDA_BASE_FRAME::PrintMsg( const wxString& text ) { SetStatusText( text ); } @@ -179,7 +179,7 @@ void WinEDA_BasicFrame::PrintMsg( const wxString& text ) /* * Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100 */ -void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text ) +void EDA_BASE_FRAME::DisplayActivity( int PerCent, const wxString& Text ) { wxString Line; @@ -198,7 +198,7 @@ void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text ) /* * Update the list of past projects. */ -void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName ) +void EDA_BASE_FRAME::SetLastProject( const wxString& FullFileName ) { wxGetApp().m_fileHistory.AddFileToHistory( FullFileName ); ReCreateMenuBar(); @@ -208,7 +208,7 @@ void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName ) /* * Fetch the file name from the file history list. */ -wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type ) +wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type ) { wxString fn, msg; size_t i; @@ -239,7 +239,7 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type /* * */ -void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) +void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event ) { wxString msg; @@ -282,14 +282,14 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) /* * */ -void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& event ) +void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event ) { bool ShowAboutDialog(wxWindow * parent); ShowAboutDialog(this); } -void WinEDA_BasicFrame::AddHelpVersionInfoMenuEntry( wxMenu* aMenu ) +void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu ) { wxASSERT( aMenu != NULL ); @@ -364,7 +364,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() #endif -void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& event ) +void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) { if( !wxTheClipboard->Open() ) { diff --git a/common/block_commande.cpp b/common/block_commande.cpp index 3179d7c201..edce1d4ca4 100644 --- a/common/block_commande.cpp +++ b/common/block_commande.cpp @@ -33,7 +33,7 @@ BLOCK_SELECTOR::~BLOCK_SELECTOR() /* * Print block command message (Block move, Block copy ...) in status bar */ -void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame ) +void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame ) { wxString msg; @@ -96,7 +96,7 @@ void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame ) } -void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, +void BLOCK_SELECTOR::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) @@ -119,8 +119,7 @@ void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, * Function InitData * Init the initial values of a BLOCK_SELECTOR, before starting a block command */ -void BLOCK_SELECTOR::InitData( WinEDA_DrawPanel* aPanel, - const wxPoint& startpos ) +void BLOCK_SELECTOR::InitData( EDA_DRAW_PANEL* aPanel, const wxPoint& startpos ) { m_State = STATE_BLOCK_INIT; SetOrigin( startpos ); @@ -166,8 +165,7 @@ void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem ) /* First command block function: * Init the Block infos: command type, initial position, and other variables.. */ -bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, - const wxPoint& startpos ) +bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpos ) { BLOCK_SELECTOR* Block = &GetBaseScreen()->m_BlockLocate; @@ -215,7 +213,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, { Block->m_ItemsSelection.ClearItemsList(); DisplayError( this, - wxT( "WinEDA_DrawFrame::HandleBlockBegin() Err: ManageCurseur NULL" ) ); + wxT( "EDA_DRAW_FRAME::HandleBlockBegin() Err: ManageCurseur NULL" ) ); return TRUE; } Block->m_State = STATE_BLOCK_MOVE; @@ -225,7 +223,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, default: { wxString msg; - msg << wxT( "WinEDA_DrawFrame::HandleBlockBegin() error: Unknown command " ) << + msg << wxT( "EDA_DRAW_FRAME::HandleBlockBegin() error: Unknown command " ) << Block->m_Command; DisplayError( this, msg ); } @@ -243,7 +241,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, * by Initm_BlockLocateDatas(). * The other point of the rectangle is the mouse cursor */ -void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BLOCK_SELECTOR* PtBlock; @@ -271,7 +269,7 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) /* * Cancel Current block operation. */ -void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ) +void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC ) { BASE_SCREEN* screen = Panel->GetScreen(); diff --git a/common/class_marker_base.cpp b/common/class_marker_base.cpp index cdcf4c95c8..7440183808 100644 --- a/common/class_marker_base.cpp +++ b/common/class_marker_base.cpp @@ -145,7 +145,7 @@ EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const return EDA_Rect( m_Pos, realsize ); } -void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, +void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) { wxPoint corners[CORNERS_COUNT]; @@ -169,7 +169,7 @@ void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode } -void MARKER_BASE::DisplayMarkerInfo( WinEDA_DrawFrame* aFrame ) +void MARKER_BASE::DisplayMarkerInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg = m_drc.ShowHtml(); DIALOG_DISPLAY_HTML_TEXT_BASE infodisplay( (wxWindow*)aFrame, wxID_ANY, _( "Marker Info" ), diff --git a/common/common.cpp b/common/common.cpp index 92c164b5da..a6e808d882 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -664,7 +664,7 @@ void WinEDA_TextFrame::OnClose( wxCloseEvent& event ) } -void Affiche_1_Parametre( WinEDA_DrawFrame* frame, int pos_X, +void Affiche_1_Parametre( EDA_DRAW_FRAME* frame, int pos_X, const wxString& texte_H, const wxString& texte_L, int color ) { diff --git a/common/common_plot_functions.cpp b/common/common_plot_functions.cpp index 9dfa23a599..587c3e35f0 100644 --- a/common/common_plot_functions.cpp +++ b/common/common_plot_functions.cpp @@ -18,7 +18,7 @@ /* Plot sheet references * margin is in mils (1/1000 inch) */ -void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) +void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) { #define WSTEXTSIZE 50 // Text size in mils Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc; diff --git a/common/copy_to_clipboard.cpp b/common/copy_to_clipboard.cpp index a5dc1e04ad..42dfacfc7f 100644 --- a/common/copy_to_clipboard.cpp +++ b/common/copy_to_clipboard.cpp @@ -18,13 +18,13 @@ static const bool s_PlotBlackAndWhite = FALSE; static const bool Print_Sheet_Ref = TRUE; -static bool DrawPage( WinEDA_DrawFrame* aFrame ); +static bool DrawPage( EDA_DRAW_FRAME* aFrame ); /* calls the function to copy the current page or the current bock to * the clipboard */ -void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event ) +void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event ) { DrawPage( this ); @@ -43,7 +43,7 @@ void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event ) * to export drawings to other applications (word processing ...) * This is not suitable for copy command within eeschema or pcbnew */ -bool DrawPage( WinEDA_DrawFrame* aFrame ) +bool DrawPage( EDA_DRAW_FRAME* aFrame ) { bool success = TRUE; diff --git a/common/dialogs/dialog_get_component.cpp b/common/dialogs/dialog_get_component.cpp index 49d3987efd..66f4fabda1 100644 --- a/common/dialogs/dialog_get_component.cpp +++ b/common/dialogs/dialog_get_component.cpp @@ -22,11 +22,11 @@ static unsigned s_HistoryMaxCount = 8; // Max number of items displayed in hist * Dialog frame to choose a component or a footprint * This dialog shows an history of last selected items */ -DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( WinEDA_DrawFrame* parent, - const wxPoint& framepos, - wxArrayString& HistoryList, - const wxString& Title, - bool show_extra_tool ) : +DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( EDA_DRAW_FRAME* parent, + const wxPoint& framepos, + wxArrayString& HistoryList, + const wxString& Title, + bool show_extra_tool ) : DIALOG_GET_COMPONENT_BASE( parent, -1, Title, framepos ) { diff --git a/common/dialogs/dialog_hotkeys_editor.cpp b/common/dialogs/dialog_hotkeys_editor.cpp index 7b2525db28..e95dfc7ff7 100644 --- a/common/dialogs/dialog_hotkeys_editor.cpp +++ b/common/dialogs/dialog_hotkeys_editor.cpp @@ -32,7 +32,7 @@ dialog_hotkeys_editor.cpp #include "dialog_hotkeys_editor.h" -void InstallHotkeyFrame( WinEDA_DrawFrame* parent, +void InstallHotkeyFrame( EDA_DRAW_FRAME* parent, Ki_HotkeyInfoSectionDescriptor* hotkeys ) { HOTKEYS_EDITOR_DIALOG dialog( parent, hotkeys ); @@ -46,7 +46,7 @@ void InstallHotkeyFrame( WinEDA_DrawFrame* parent, } -HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG( WinEDA_DrawFrame* parent, +HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent, Ki_HotkeyInfoSectionDescriptor* hotkeys ) : HOTKEYS_EDITOR_DIALOG_BASE( parent ) { diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 909de97fa8..aa0b265f6f 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -34,7 +34,7 @@ Ki_PageDescr * SheetList[NB_ITEMS + 1] = /******************************************************************/ -void WinEDA_DrawFrame::Process_PageSettings(wxCommandEvent& event) +void EDA_DRAW_FRAME::Process_PageSettings(wxCommandEvent& event) /******************************************************************/ /* Creation de la fenetre de configuration */ @@ -46,7 +46,7 @@ void WinEDA_DrawFrame::Process_PageSettings(wxCommandEvent& event) } -DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( WinEDA_DrawFrame* parent ): +DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent ): DIALOG_PAGES_SETTINGS_BASE( parent ) { m_Parent = parent; diff --git a/common/dialogs/dialog_page_settings.h b/common/dialogs/dialog_page_settings.h index 3be9c1fa50..f29a83fae1 100644 --- a/common/dialogs/dialog_page_settings.h +++ b/common/dialogs/dialog_page_settings.h @@ -14,7 +14,7 @@ class DIALOG_PAGES_SETTINGS: public DIALOG_PAGES_SETTINGS_BASE { private: - WinEDA_DrawFrame *m_Parent; + EDA_DRAW_FRAME *m_Parent; BASE_SCREEN * m_Screen; int m_Modified; Ki_PageDescr * m_SelectedSheet; @@ -22,7 +22,7 @@ private: int m_CurrentSelection; public: - DIALOG_PAGES_SETTINGS( WinEDA_DrawFrame* parent ); + DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent ); ~DIALOG_PAGES_SETTINGS(); private: diff --git a/common/displlst.cpp b/common/displlst.cpp index 277ae0858d..e7821014b0 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -17,13 +17,13 @@ enum listbox { BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog ) -EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick ) -EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick ) -EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList ) -EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList ) -EVT_CHAR( WinEDAListBox::OnKeyEvent ) -EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent ) -EVT_CLOSE( WinEDAListBox::OnClose ) + EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick ) + EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick ) + EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList ) + EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList ) + EVT_CHAR( WinEDAListBox::OnKeyEvent ) + EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent ) + EVT_CLOSE( WinEDAListBox::OnClose ) END_EVENT_TABLE() @@ -37,7 +37,7 @@ END_EVENT_TABLE() * @param aCallBackFunction callback function to display comments * @param aPos = position of the dialog. */ -WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* aParent, const wxString& aTitle, +WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle, const wxArrayString& aItemList, const wxString& aRefText, void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) : wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize, @@ -51,8 +51,8 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* aParent, const wxString& aTitle, SetSizer( GeneralBoxSizer ); m_listBox = new wxListBox( this, ID_LISTBOX_LIST, wxDefaultPosition, - wxSize( 300, 200 ), 0, NULL, - wxLB_NEEDED_SB | wxLB_SINGLE | wxLB_HSCROLL ); + wxSize( 300, 200 ), 0, NULL, + wxLB_NEEDED_SB | wxLB_SINGLE | wxLB_HSCROLL ); GeneralBoxSizer->Add( m_listBox, 0, wxGROW | wxALL, 5 ); diff --git a/common/drawframe.cpp b/common/drawframe.cpp index a4a06d18ed..f9af4b70e5 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -36,22 +36,22 @@ static const wxString GridColorEntryKeyword( wxT( "GridColor" ) ); static const wxString LastGridSizeId( wxT( "_LastGridSize" ) ); -BEGIN_EVENT_TABLE( WinEDA_DrawFrame, WinEDA_BasicFrame ) - EVT_MOUSEWHEEL( WinEDA_DrawFrame::OnMouseEvent ) - EVT_MENU_OPEN( WinEDA_DrawFrame::OnMenuOpen ) - EVT_ACTIVATE( WinEDA_DrawFrame::OnActivate ) +BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME ) + EVT_MOUSEWHEEL( EDA_DRAW_FRAME::OnMouseEvent ) + EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen ) + EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate ) EVT_MENU_RANGE( ID_POPUP_ZOOM_START_RANGE, ID_POPUP_ZOOM_END_RANGE, - WinEDA_DrawFrame::OnZoom ) + EDA_DRAW_FRAME::OnZoom ) EVT_MENU_RANGE( ID_POPUP_GRID_LEVEL_1000, ID_POPUP_GRID_USER, - WinEDA_DrawFrame::OnSelectGrid ) + EDA_DRAW_FRAME::OnSelectGrid ) END_EVENT_TABLE() -WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype, +EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* father, int idtype, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : - WinEDA_BasicFrame( father, idtype, title, pos, size, style ) + EDA_BASE_FRAME( father, idtype, title, pos, size, style ) { wxSize minsize; @@ -108,7 +108,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype, m_FramePos.x = m_FramePos.y = 0; m_FrameSize.y -= m_MsgFrameHeight; - DrawPanel = new WinEDA_DrawPanel( this, -1, wxPoint( 0, 0 ), m_FrameSize ); + DrawPanel = new EDA_DRAW_PANEL( this, -1, wxPoint( 0, 0 ), m_FrameSize ); MsgPanel = new WinEDA_MsgPanel( this, -1, wxPoint( 0, m_FrameSize.y ), wxSize( m_FrameSize.x, m_MsgFrameHeight ) ); @@ -118,7 +118,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype, } -WinEDA_DrawFrame::~WinEDA_DrawFrame() +EDA_DRAW_FRAME::~EDA_DRAW_FRAME() { if( m_CurrentScreen != NULL ) delete m_CurrentScreen; @@ -130,20 +130,20 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame() /* * Display the message in the first pane of the status bar. */ -void WinEDA_DrawFrame::Affiche_Message( const wxString& message ) +void EDA_DRAW_FRAME::Affiche_Message( const wxString& message ) { SetStatusText( message, 0 ); } -void WinEDA_DrawFrame::EraseMsgBox() +void EDA_DRAW_FRAME::EraseMsgBox() { if( MsgPanel ) MsgPanel->EraseMsgBox(); } -void WinEDA_DrawFrame::OnActivate( wxActivateEvent& event ) +void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event ) { m_FrameIsActive = event.GetActive(); if( DrawPanel ) @@ -153,7 +153,7 @@ void WinEDA_DrawFrame::OnActivate( wxActivateEvent& event ) } -void WinEDA_DrawFrame::OnMenuOpen( wxMenuEvent& event ) +void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event ) { if( DrawPanel ) DrawPanel->m_CanStartBlock = -1; @@ -162,25 +162,25 @@ void WinEDA_DrawFrame::OnMenuOpen( wxMenuEvent& event ) // Virtual function -void WinEDA_DrawFrame::ReCreateAuxiliaryToolbar() +void EDA_DRAW_FRAME::ReCreateAuxiliaryToolbar() { } // Virtual function -void WinEDA_DrawFrame::ReCreateMenuBar() +void EDA_DRAW_FRAME::ReCreateMenuBar() { } // Virtual function -void WinEDA_DrawFrame::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) +void EDA_DRAW_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) { } // Virtual function -void WinEDA_DrawFrame::ToolOnRightClick( wxCommandEvent& event ) +void EDA_DRAW_FRAME::ToolOnRightClick( wxCommandEvent& event ) { } @@ -188,17 +188,17 @@ void WinEDA_DrawFrame::ToolOnRightClick( wxCommandEvent& event ) * Function PrintPage (virtual) * used to print a page * this basic function must be derived to be used for printing - * because WinEDA_DrawFrame does not know how to print a page + * because EDA_DRAW_FRAME does not know how to print a page * This is the reason it is a virtual function */ -void WinEDA_DrawFrame::PrintPage( wxDC* aDC,int aPrintMask, +void EDA_DRAW_FRAME::PrintPage( wxDC* aDC,int aPrintMask, bool aPrintMirrorMode, void* aData ) { - wxMessageBox( wxT("WinEDA_DrawFrame::PrintPage() error")); + wxMessageBox( wxT("EDA_DRAW_FRAME::PrintPage() error")); } // Virtual function -void WinEDA_DrawFrame::OnSelectGrid( wxCommandEvent& event ) +void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) { int* clientData; int id = ID_POPUP_GRID_LEVEL_100; @@ -267,7 +267,7 @@ void WinEDA_DrawFrame::OnSelectGrid( wxCommandEvent& event ) * last position : special zoom * virtual function */ -void WinEDA_DrawFrame::OnSelectZoom( wxCommandEvent& event ) +void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) { if( m_SelZoomBox == NULL ) return; // Should not happen! @@ -295,25 +295,25 @@ void WinEDA_DrawFrame::OnSelectZoom( wxCommandEvent& event ) /* Return the current zoom level */ -int WinEDA_DrawFrame::GetZoom(void) +int EDA_DRAW_FRAME::GetZoom(void) { return GetBaseScreen()->GetZoom(); } -void WinEDA_DrawFrame::OnMouseEvent( wxMouseEvent& event ) +void EDA_DRAW_FRAME::OnMouseEvent( wxMouseEvent& event ) { event.Skip(); } // Virtual -void WinEDA_DrawFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) +void EDA_DRAW_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) { } -void WinEDA_DrawFrame::SetToolbars() +void EDA_DRAW_FRAME::SetToolbars() { DisplayUnitsMsg(); @@ -322,7 +322,7 @@ void WinEDA_DrawFrame::SetToolbars() } -void WinEDA_DrawFrame::DisplayToolMsg( const wxString& msg ) +void EDA_DRAW_FRAME::DisplayToolMsg( const wxString& msg ) { SetStatusText( msg, 5 ); } @@ -330,7 +330,7 @@ void WinEDA_DrawFrame::DisplayToolMsg( const wxString& msg ) /* Display current unit Selection on Statusbar */ -void WinEDA_DrawFrame::DisplayUnitsMsg() +void EDA_DRAW_FRAME::DisplayUnitsMsg() { wxString msg; @@ -356,7 +356,7 @@ void WinEDA_DrawFrame::DisplayUnitsMsg() /* Recalculate the size of toolbars and display panel. */ -void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) +void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv ) { m_FrameSize = GetClientSize( ); @@ -378,7 +378,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) * Only updates the cursor shape and message in status bar * (does not the current m_ID_current_state value */ -void WinEDA_DrawFrame::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) +void EDA_DRAW_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) { // Keep default cursor in toolbars SetCursor( wxNullCursor ); @@ -437,36 +437,36 @@ void WinEDA_DrawFrame::SetToolID( int aId, int aCursor, const wxString& aToolMsg /* default virtual functions */ /*****************************/ -void WinEDA_DrawFrame::OnGrid( int grid_type ) +void EDA_DRAW_FRAME::OnGrid( int grid_type ) { } -int WinEDA_DrawFrame::ReturnBlockCommand( int key ) +int EDA_DRAW_FRAME::ReturnBlockCommand( int key ) { return 0; } -void WinEDA_DrawFrame::InitBlockPasteInfos() +void EDA_DRAW_FRAME::InitBlockPasteInfos() { GetBaseScreen()->m_BlockLocate.ClearItemsList(); DrawPanel->ManageCurseur = NULL; } -void WinEDA_DrawFrame::HandleBlockPlace( wxDC* DC ) +void EDA_DRAW_FRAME::HandleBlockPlace( wxDC* DC ) { } -bool WinEDA_DrawFrame::HandleBlockEnd( wxDC* DC ) +bool EDA_DRAW_FRAME::HandleBlockEnd( wxDC* DC ) { return false; } -void WinEDA_DrawFrame::AdjustScrollBars() +void EDA_DRAW_FRAME::AdjustScrollBars() { int unitsX, unitsY, posX, posY; wxSize drawingSize, clientSize; @@ -557,9 +557,9 @@ void WinEDA_DrawFrame::AdjustScrollBars() * called on a language menu selection * when using a derived function, do not forget to call this one */ -void WinEDA_DrawFrame::SetLanguage( wxCommandEvent& event ) +void EDA_DRAW_FRAME::SetLanguage( wxCommandEvent& event ) { - WinEDA_BasicFrame::SetLanguage( event ); + EDA_BASE_FRAME::SetLanguage( event ); } /** @@ -600,7 +600,7 @@ double RoundTo0( double x, double precision ) * ( in this status is also displayed the zoom level, but this is not made * by this function ) */ -void WinEDA_DrawFrame::UpdateStatusBar() +void EDA_DRAW_FRAME::UpdateStatusBar() { wxString Line; int dx, dy; @@ -695,13 +695,13 @@ void WinEDA_DrawFrame::UpdateStatusBar() * Don't forget to call this base method from any derived classes or the * settings will not get loaded. */ -void WinEDA_DrawFrame::LoadSettings() +void EDA_DRAW_FRAME::LoadSettings() { wxASSERT( wxGetApp().m_EDA_Config != NULL ); wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::LoadSettings(); + EDA_BASE_FRAME::LoadSettings(); cfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_CursorShape, ( long )0 ); bool btmp; if ( cfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) ) @@ -719,13 +719,13 @@ void WinEDA_DrawFrame::LoadSettings() * Don't forget to call this base method from any derived classes or the * settings will not get saved. */ -void WinEDA_DrawFrame::SaveSettings() +void EDA_DRAW_FRAME::SaveSettings() { wxASSERT( wxGetApp().m_EDA_Config != NULL ); wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::SaveSettings(); + EDA_BASE_FRAME::SaveSettings(); cfg->Write( m_FrameName + CursorShapeEntryKeyword, m_CursorShape ); cfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() ); cfg->Write( m_FrameName + GridColorEntryKeyword, GetGridColor() ); @@ -733,9 +733,9 @@ void WinEDA_DrawFrame::SaveSettings() } -void WinEDA_DrawFrame::AppendMsgPanel( const wxString& textUpper, - const wxString& textLower, - int color, int pad ) +void EDA_DRAW_FRAME::AppendMsgPanel( const wxString& textUpper, + const wxString& textLower, + int color, int pad ) { if( MsgPanel == NULL ) return; @@ -744,7 +744,7 @@ void WinEDA_DrawFrame::AppendMsgPanel( const wxString& textUpper, } -void WinEDA_DrawFrame::ClearMsgPanel( void ) +void EDA_DRAW_FRAME::ClearMsgPanel( void ) { if( MsgPanel == NULL ) return; diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 3e00a05d92..c8ddaea6dd 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -37,26 +37,26 @@ static bool s_IgnoreNextLeftButtonRelease = false; -// Events used by WinEDA_DrawPanel -BEGIN_EVENT_TABLE( WinEDA_DrawPanel, wxScrolledWindow ) - EVT_LEAVE_WINDOW( WinEDA_DrawPanel::OnMouseLeaving ) - EVT_MOUSEWHEEL( WinEDA_DrawPanel::OnMouseWheel ) - EVT_MOUSE_EVENTS( WinEDA_DrawPanel::OnMouseEvent ) - EVT_CHAR( WinEDA_DrawPanel::OnKeyEvent ) - EVT_CHAR_HOOK( WinEDA_DrawPanel::OnKeyEvent ) - EVT_PAINT( WinEDA_DrawPanel::OnPaint ) - EVT_SIZE( WinEDA_DrawPanel::OnSize ) - EVT_SCROLLWIN( WinEDA_DrawPanel::OnScroll ) - EVT_ACTIVATE( WinEDA_DrawPanel::OnActivate ) - EVT_MENU_RANGE( ID_PAN_UP, ID_PAN_RIGHT, WinEDA_DrawPanel::OnPan ) +// Events used by EDA_DRAW_PANEL +BEGIN_EVENT_TABLE( EDA_DRAW_PANEL, wxScrolledWindow ) + EVT_LEAVE_WINDOW( EDA_DRAW_PANEL::OnMouseLeaving ) + EVT_MOUSEWHEEL( EDA_DRAW_PANEL::OnMouseWheel ) + EVT_MOUSE_EVENTS( EDA_DRAW_PANEL::OnMouseEvent ) + EVT_CHAR( EDA_DRAW_PANEL::OnKeyEvent ) + EVT_CHAR_HOOK( EDA_DRAW_PANEL::OnKeyEvent ) + EVT_PAINT( EDA_DRAW_PANEL::OnPaint ) + EVT_SIZE( EDA_DRAW_PANEL::OnSize ) + EVT_SCROLLWIN( EDA_DRAW_PANEL::OnScroll ) + EVT_ACTIVATE( EDA_DRAW_PANEL::OnActivate ) + EVT_MENU_RANGE( ID_PAN_UP, ID_PAN_RIGHT, EDA_DRAW_PANEL::OnPan ) END_EVENT_TABLE() /***********************************************************************/ -/* WinEDA_DrawPanel base functions (WinEDA_DrawPanel is the main panel)*/ +/* EDA_DRAW_PANEL base functions (EDA_DRAW_PANEL is the main panel)*/ /***********************************************************************/ -WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, - const wxPoint& pos, const wxSize& size ) : +EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, + const wxPoint& pos, const wxSize& size ) : wxScrolledWindow( parent, id, pos, size, wxBORDER | wxNO_FULL_REPAINT_ON_RESIZE ) { @@ -96,15 +96,15 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, } -WinEDA_DrawPanel::~WinEDA_DrawPanel() +EDA_DRAW_PANEL::~EDA_DRAW_PANEL() { wxGetApp().m_EDA_Config->Write( wxT( "AutoPAN" ), m_AutoPAN_Enable ); } -BASE_SCREEN* WinEDA_DrawPanel::GetScreen() +BASE_SCREEN* EDA_DRAW_PANEL::GetScreen() { - WinEDA_DrawFrame* parentFrame = m_Parent; + EDA_DRAW_FRAME* parentFrame = m_Parent; return parentFrame->GetBaseScreen(); } @@ -113,7 +113,7 @@ BASE_SCREEN* WinEDA_DrawPanel::GetScreen() /* * Draw the schematic cursor which is usually on grid */ -void WinEDA_DrawPanel::DrawCursor( wxDC* aDC, int aColor ) +void EDA_DRAW_PANEL::DrawCursor( wxDC* aDC, int aColor ) { if( m_CursorLevel != 0 || aDC == NULL ) return; @@ -166,7 +166,7 @@ void WinEDA_DrawPanel::DrawCursor( wxDC* aDC, int aColor ) * Remove the grid cursor from the display in preparation for other drawing * operations */ -void WinEDA_DrawPanel::CursorOff( wxDC* DC ) +void EDA_DRAW_PANEL::CursorOff( wxDC* DC ) { DrawCursor( DC ); --m_CursorLevel; @@ -176,7 +176,7 @@ void WinEDA_DrawPanel::CursorOff( wxDC* DC ) /* * Display the grid cursor */ -void WinEDA_DrawPanel::CursorOn( wxDC* DC ) +void EDA_DRAW_PANEL::CursorOn( wxDC* DC ) { ++m_CursorLevel; DrawCursor( DC ); @@ -186,19 +186,19 @@ void WinEDA_DrawPanel::CursorOn( wxDC* DC ) } -int WinEDA_DrawPanel::GetZoom() +int EDA_DRAW_PANEL::GetZoom() { return GetScreen()->GetZoom(); } -void WinEDA_DrawPanel::SetZoom( int zoom ) +void EDA_DRAW_PANEL::SetZoom( int zoom ) { GetScreen()->SetZoom( zoom ); } -wxRealPoint WinEDA_DrawPanel::GetGrid() +wxRealPoint EDA_DRAW_PANEL::GetGrid() { return GetScreen()->GetGridSize(); } @@ -210,7 +210,7 @@ wxRealPoint WinEDA_DrawPanel::GetGrid() * @param aPosition = position in device (screen) units. * @return position in logical (drawing) units. */ -wxPoint WinEDA_DrawPanel::CursorRealPosition( const wxPoint& aPosition ) +wxPoint EDA_DRAW_PANEL::CursorRealPosition( const wxPoint& aPosition ) { double scalar = GetScreen()->GetScalingFactor(); wxPoint pos; @@ -227,7 +227,7 @@ wxPoint WinEDA_DrawPanel::CursorRealPosition( const wxPoint& aPosition ) * @return TRUE if ref_pos is a point currently visible on screen * false if ref_pos is out of screen */ -bool WinEDA_DrawPanel::IsPointOnDisplay( wxPoint ref_pos ) +bool EDA_DRAW_PANEL::IsPointOnDisplay( wxPoint ref_pos ) { wxPoint pos; EDA_Rect display_rect; @@ -255,7 +255,7 @@ bool WinEDA_DrawPanel::IsPointOnDisplay( wxPoint ref_pos ) } -void WinEDA_DrawPanel::PostDirtyRect( EDA_Rect aRect ) +void EDA_DRAW_PANEL::PostDirtyRect( EDA_Rect aRect ) { // D( printf( "1) PostDirtyRect( x=%d, y=%d, width=%d, height=%d)\n", aRect.m_Pos.x, aRect.m_Pos.y, aRect.m_Size.x, aRect.m_Size.y ); ) @@ -283,7 +283,7 @@ void WinEDA_DrawPanel::PostDirtyRect( EDA_Rect aRect ) * * @param aRect - Rectangle to scale. */ -void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( EDA_Rect* aRect ) +void EDA_DRAW_PANEL::ConvertPcbUnitsToPixelsUnits( EDA_Rect* aRect ) { // Calculate the draw area origin in internal units: wxPoint pos = aRect->GetPosition(); @@ -297,7 +297,7 @@ void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( EDA_Rect* aRect ) } -void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( wxPoint* aPosition ) +void EDA_DRAW_PANEL::ConvertPcbUnitsToPixelsUnits( wxPoint* aPosition ) { // Calculate the draw area origin in internal units: wxPoint drwOrig; @@ -326,7 +326,7 @@ void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( wxPoint* aPosition ) * Function CursorScreenPosition * @return the cursor current position in pixels in the screen draw area */ -wxPoint WinEDA_DrawPanel::CursorScreenPosition() +wxPoint EDA_DRAW_PANEL::CursorScreenPosition() { wxPoint pos = GetScreen()->m_Curseur - GetScreen()->m_DrawOrg; double scalar = GetScreen()->GetScalingFactor(); @@ -343,7 +343,7 @@ wxPoint WinEDA_DrawPanel::CursorScreenPosition() * @return position (in internal units) of the current area center showed * on screen */ -wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition( void ) +wxPoint EDA_DRAW_PANEL::GetScreenCenterRealPosition( void ) { int x, y, ppuX, ppuY; wxPoint pos; @@ -363,7 +363,7 @@ wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition( void ) /* Move the mouse cursor to the current schematic cursor */ -void WinEDA_DrawPanel::MouseToCursorSchema() +void EDA_DRAW_PANEL::MouseToCursorSchema() { wxPoint Mouse = CursorScreenPosition(); @@ -374,7 +374,7 @@ void WinEDA_DrawPanel::MouseToCursorSchema() /** Move the mouse cursor to the position "Mouse" * @param Mouse = mouse cursor position, in pixels units */ -void WinEDA_DrawPanel::MouseTo( const wxPoint& Mouse ) +void EDA_DRAW_PANEL::MouseTo( const wxPoint& Mouse ) { int x, y, xPpu, yPpu; wxPoint screenPos, drawingPos; @@ -424,13 +424,13 @@ void WinEDA_DrawPanel::MouseTo( const wxPoint& Mouse ) * command wanted. * This happens when enter on a hierarchy sheet on double click */ -void WinEDA_DrawPanel::OnActivate( wxActivateEvent& event ) +void EDA_DRAW_PANEL::OnActivate( wxActivateEvent& event ) { m_CanStartBlock = -1; // Block Command can't start event.Skip(); } -void WinEDA_DrawPanel::OnScroll( wxScrollWinEvent& event ) +void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event ) { int id = event.GetEventType(); int dir; @@ -502,7 +502,7 @@ void WinEDA_DrawPanel::OnScroll( wxScrollWinEvent& event ) event.Skip(); } -void WinEDA_DrawPanel::OnSize( wxSizeEvent& event ) +void EDA_DRAW_PANEL::OnSize( wxSizeEvent& event ) { if( IsShown() ) { @@ -525,7 +525,7 @@ void WinEDA_DrawPanel::OnSize( wxSizeEvent& event ) * @param dc - The device context use for drawing with the correct scale and * offsets already configured. See DoPrepareDC(). */ -void WinEDA_DrawPanel::SetBoundaryBox( wxDC* dc ) +void EDA_DRAW_PANEL::SetBoundaryBox( wxDC* dc ) { wxASSERT( dc != NULL ); @@ -569,7 +569,7 @@ void WinEDA_DrawPanel::SetBoundaryBox( wxDC* dc ) } -void WinEDA_DrawPanel::EraseScreen( wxDC* DC ) +void EDA_DRAW_PANEL::EraseScreen( wxDC* DC ) { GRSetDrawMode( DC, GR_COPY ); @@ -587,7 +587,7 @@ void WinEDA_DrawPanel::EraseScreen( wxDC* DC ) } -void WinEDA_DrawPanel::DoPrepareDC(wxDC& dc) +void EDA_DRAW_PANEL::DoPrepareDC(wxDC& dc) { #ifdef USE_WX_ZOOM if( GetScreen() != NULL ) @@ -608,7 +608,7 @@ void WinEDA_DrawPanel::DoPrepareDC(wxDC& dc) } -void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event ) +void EDA_DRAW_PANEL::OnPaint( wxPaintEvent& event ) { if( GetScreen() == NULL ) { @@ -682,7 +682,7 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event ) } -void WinEDA_DrawPanel::ReDraw( wxDC* DC, bool erasebg ) +void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg ) { BASE_SCREEN* Screen = GetScreen(); @@ -726,7 +726,7 @@ void WinEDA_DrawPanel::ReDraw( wxDC* DC, bool erasebg ) * X and Y axis * X and Y auxiliary axis */ -void WinEDA_DrawPanel::DrawBackGround( wxDC* DC ) +void EDA_DRAW_PANEL::DrawBackGround( wxDC* DC ) { int axis_color = BLUE; BASE_SCREEN* screen = GetScreen(); @@ -763,7 +763,7 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC ) * - the grid is drawn only if the zoom level allows a good visibility * - the grid is always centered on the screen center */ -void WinEDA_DrawPanel::DrawGrid( wxDC* DC ) +void EDA_DRAW_PANEL::DrawGrid( wxDC* DC ) { #define MIN_GRID_SIZE 10 // min grid size in pixels to allow drawing BASE_SCREEN* screen = GetScreen(); @@ -947,7 +947,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC ) * @param aDC = current Device Context * @param aDrawMode = draw mode (GR_COPY, GR_OR ..) */ -void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* aDC, int aDrawMode ) +void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, int aDrawMode ) { if( m_Parent->m_Auxiliary_Axis_Position == wxPoint( 0, 0 ) ) return; @@ -974,9 +974,8 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* aDC, int aDrawMode ) 0, Color ); } -/********************************************************************/ -void WinEDA_DrawPanel::DrawGridAxis( wxDC* aDC, int aDrawMode ) -/********************************************************************/ + +void EDA_DRAW_PANEL::DrawGridAxis( wxDC* aDC, int aDrawMode ) { BASE_SCREEN* screen = GetScreen(); if( !m_Parent->m_Draw_Grid_Axis @@ -1005,10 +1004,11 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* aDC, int aDrawMode ) 0, Color ); } + /** Build and display a Popup menu on a right mouse button click * @return true if a popup menu is shown, or false */ -bool WinEDA_DrawPanel::OnRightClick( wxMouseEvent& event ) +bool EDA_DRAW_PANEL::OnRightClick( wxMouseEvent& event ) { wxPoint pos; wxMenu MasterMenu; @@ -1030,7 +1030,7 @@ bool WinEDA_DrawPanel::OnRightClick( wxMouseEvent& event ) // Called when the canvas receives a mouse event leaving frame. -void WinEDA_DrawPanel::OnMouseLeaving( wxMouseEvent& event ) +void EDA_DRAW_PANEL::OnMouseLeaving( wxMouseEvent& event ) { if( ManageCurseur == NULL ) // No command in progress. m_AutoPAN_Request = false; @@ -1058,7 +1058,7 @@ void WinEDA_DrawPanel::OnMouseLeaving( wxMouseEvent& event ) * is accomplished by converting mouse wheel events in pseudo menu command * events. */ -void WinEDA_DrawPanel::OnMouseWheel( wxMouseEvent& event ) +void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event ) { if( m_IgnoreMouseEvents ) return; @@ -1111,11 +1111,11 @@ void WinEDA_DrawPanel::OnMouseWheel( wxMouseEvent& event ) // Called when the canvas receives a mouse event. -void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event ) +void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) { - int localrealbutt = 0, localbutt = 0, localkey = 0; - BASE_SCREEN* screen = GetScreen(); - static WinEDA_DrawPanel* LastPanel; + int localrealbutt = 0, localbutt = 0, localkey = 0; + BASE_SCREEN* screen = GetScreen(); + static EDA_DRAW_PANEL* LastPanel; if( !screen ) return; @@ -1319,12 +1319,11 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event ) MinDragEventCount++; else { - if( !m_Parent->HandleBlockBegin( &DC, cmd_type, - m_CursorStartPos ) ) + if( !m_Parent->HandleBlockBegin( &DC, cmd_type, m_CursorStartPos ) ) { // should not occurs: error m_Parent->DisplayToolMsg( - wxT( "WinEDA_DrawPanel::OnMouseEvent() Block Error" ) ); + wxT( "EDA_DRAW_PANEL::OnMouseEvent() Block Error" ) ); } else { @@ -1403,7 +1402,7 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event ) } -void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event ) +void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) { long key, localkey; bool escape = false; @@ -1481,7 +1480,7 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event ) } -void WinEDA_DrawPanel::OnPan( wxCommandEvent& event ) +void EDA_DRAW_PANEL::OnPan( wxCommandEvent& event ) { int x, y; int ppux, ppuy; @@ -1515,8 +1514,7 @@ void WinEDA_DrawPanel::OnPan( wxCommandEvent& event ) break; default: - wxLogDebug( wxT( "Unknown ID %d in WinEDA_DrawPanel::OnPan()." ), - event.GetId() ); + wxLogDebug( wxT( "Unknown ID %d in EDA_DRAW_PANEL::OnPan()." ), event.GetId() ); } if( x < 0 ) @@ -1532,8 +1530,7 @@ void WinEDA_DrawPanel::OnPan( wxCommandEvent& event ) } -void WinEDA_DrawPanel::UnManageCursor( int id, int cursor, - const wxString& title ) +void EDA_DRAW_PANEL::UnManageCursor( int id, int cursor, const wxString& title ) { if( ManageCurseur && ForceCloseManageCurseur ) { diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index fe66eb1248..e457b1f3ff 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -223,7 +223,7 @@ static int overbar_position( int size_v, int thickness ) * @param aPlotter = a pointer to a PLOTTER instance, when this function is used to plot * the text. NULL to draw this text. */ -void DrawGraphicText( WinEDA_DrawPanel* aPanel, +void DrawGraphicText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPos, EDA_Colors aColor, diff --git a/common/eda_dde.cpp b/common/eda_dde.cpp index c0626915ad..ce32ff153b 100644 --- a/common/eda_dde.cpp +++ b/common/eda_dde.cpp @@ -56,7 +56,7 @@ WinEDA_Server* CreateServer( wxWindow* window, int service ) /* Function called on every client request. */ -void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) +void EDA_DRAW_FRAME::OnSockRequest( wxSocketEvent& evt ) { size_t len; wxSocketBase* sock = evt.GetSocket(); @@ -80,7 +80,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) break; default: - wxPrintf( wxT( "WinEDA_DrawFrame::OnSockRequest() error: Invalid event !" ) ); + wxPrintf( wxT( "EDA_DRAW_FRAME::OnSockRequest() error: Invalid event !" ) ); break; } } @@ -88,7 +88,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) /* Function called when a connection is requested by a client. */ -void WinEDA_DrawFrame::OnSockRequestServer( wxSocketEvent& evt ) +void EDA_DRAW_FRAME::OnSockRequestServer( wxSocketEvent& evt ) { wxSocketBase* sock2; wxSocketServer* server = (wxSocketServer*) evt.GetSocket(); diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 43b5ffb21f..72804960b7 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -327,7 +327,7 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname ) * Displays the current hotkey list * aList = a Ki_HotkeyInfoSectionDescriptor list(Null terminated) */ -void DisplayHotkeyList( WinEDA_DrawFrame* aFrame, +void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct Ki_HotkeyInfoSectionDescriptor* aDescList ) { wxString keyname; @@ -382,8 +382,8 @@ Ki_HotkeyInfo* GetDescriptorFromHotkey( int aKey, Ki_HotkeyInfo** aList ) * the output format is: shortcut "key" "function" * lines starting with # are comments */ -int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList, - wxString* aFullFileName ) +int EDA_BASE_FRAME::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList, + wxString* aFullFileName ) { wxString msg; wxString keyname, infokey; @@ -446,9 +446,8 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* * @param aFilename = file name to read. * @param aDescList = current hotkey list descr. to initialise. */ -int WinEDA_BasicFrame::ReadHotkeyConfigFile( - const wxString& aFilename, - struct Ki_HotkeyInfoSectionDescriptor* aDescList ) +int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename, + struct Ki_HotkeyInfoSectionDescriptor* aDescList ) { wxFile cfgfile( aFilename ); @@ -493,7 +492,7 @@ void ReadHotkeyConfig( const wxString& Appname, * Read configuration data and fill the current hotkey list with hotkeys * aDescList is the current hotkey list descr. to initialise. */ -int WinEDA_BasicFrame::ReadHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList ) +int EDA_BASE_FRAME::ReadHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList ) { ::ReadHotkeyConfig( m_FrameName, aDescList ); return 1; @@ -575,8 +574,7 @@ void ParseHotkeyConfig( * Prompt the user for an old hotkey file to read, and read it. * @param aDescList = current hotkey list descr. to initialise. */ -void WinEDA_BasicFrame::ImportHotkeyConfigFromFile( - struct Ki_HotkeyInfoSectionDescriptor* aDescList ) +void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList ) { wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString mask = wxT( "*." ) + ext; @@ -604,8 +602,7 @@ void WinEDA_BasicFrame::ImportHotkeyConfigFromFile( * Prompt the user for an old hotkey file to read, and read it. * @param aDescList = current hotkey list descr. to initialise. */ -void WinEDA_BasicFrame::ExportHotkeyConfigToFile( - struct Ki_HotkeyInfoSectionDescriptor* aDescList ) +void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList ) { wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString mask = wxT( "*." ) + ext; diff --git a/common/msgpanel.cpp b/common/msgpanel.cpp index 8b522d1bda..0d3710aed4 100644 --- a/common/msgpanel.cpp +++ b/common/msgpanel.cpp @@ -17,7 +17,7 @@ BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel ) END_EVENT_TABLE() -WinEDA_MsgPanel::WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, +WinEDA_MsgPanel::WinEDA_MsgPanel( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ) : wxPanel( parent, id, pos, size ) { diff --git a/common/worksheet.cpp b/common/worksheet.cpp index 747e55ea43..c34919e119 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -928,8 +928,7 @@ Ki_WorkSheetData WS_Segm5_LT = /* Draw the page reference sheet. */ -void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, - int line_width ) +void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ) { if( !m_Draw_Sheet_Ref ) return; @@ -958,7 +957,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, if( Sheet == NULL ) { DisplayError( this, - wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) ); + wxT( "EDA_DRAW_FRAME::TraceWorkSheet() error: NULL Sheet" ) ); return; } @@ -1527,8 +1526,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, * @param aPosition = position to identify by YX ref * @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits) */ -wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, - const wxPoint& aPosition ) +wxString EDA_DRAW_FRAME::GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition ) { Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc; int ii, xg, yg, ipas, gxpas, gypas; @@ -1538,7 +1536,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, if( Sheet == NULL ) { DisplayError( this, - wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) ); + wxT( "EDA_DRAW_FRAME::GetXYSheetReferences() error: NULL Sheet" ) ); return msg; } @@ -1574,7 +1572,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, } -wxString WinEDA_DrawFrame::GetScreenDesc() +wxString EDA_DRAW_FRAME::GetScreenDesc() { wxString msg; diff --git a/common/zoom.cpp b/common/zoom.cpp index 15b90c7dfb..9bd78e3a9d 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -24,7 +24,7 @@ * * Note: Mac OS ** does not ** allow moving mouse cursor by program. */ -void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) +void EDA_DRAW_FRAME::Recadre_Trace( bool ToMouse ) { PutOnGrid( &(GetBaseScreen()->m_Curseur) ); AdjustScrollBars(); @@ -52,7 +52,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) * @param aCoord = coordinate to adjust * @param aGridSize = pointer to a grid value. if NULL uses the current grid size */ -void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize ) +void EDA_DRAW_FRAME::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize ) { wxRealPoint grid_size; if( aGridSize ) @@ -74,7 +74,7 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize ) /** Redraw the screen with best zoom level and the best centering * that shows all the page or the board */ -void WinEDA_DrawFrame::Zoom_Automatique( bool move_mouse_cursor ) +void EDA_DRAW_FRAME::Zoom_Automatique( bool move_mouse_cursor ) { GetBaseScreen()->SetZoom( BestZoom() ); // Set the best zoom Recadre_Trace( move_mouse_cursor ); // Set the best centering and refresh the screen @@ -85,7 +85,7 @@ void WinEDA_DrawFrame::Zoom_Automatique( bool move_mouse_cursor ) * selected area (Rect) in full window screen * @param Rect = selected area to show after zooming */ -void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect ) +void EDA_DRAW_FRAME::Window_Zoom( EDA_Rect& Rect ) { double scalex, bestscale; wxSize size; @@ -109,7 +109,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect ) * Function OnZoom * Called from any zoom event (toolbar , hotkey or popup ) */ -void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event ) +void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) { if( DrawPanel == NULL ) return; @@ -184,7 +184,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event ) /* add the zoom list menu the the MasterMenu. * used in OnRightClick(wxMouseEvent& event) */ -void WinEDA_DrawFrame::AddMenuZoomAndGrid( wxMenu* MasterMenu ) +void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu ) { int maxZoomIds; int zoom; diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 8e9856c902..65326644c1 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -29,7 +29,7 @@ static const wxString KeepCvpcbOpenEntry( wxT( "KeepCvpcbOpen" ) ); static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) ); -BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame ) +BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, EDA_BASE_FRAME ) EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList ) // Menu events @@ -99,10 +99,8 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame ) WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave ) END_EVENT_TABLE() -WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, - long style ) : - WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition, - wxDefaultSize, style ) +WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) : + EDA_BASE_FRAME( NULL, CVPCB_FRAME, title, wxDefaultPosition, wxDefaultSize, style ) { m_FrameName = wxT( "CvpcbFrame" ); @@ -213,7 +211,7 @@ void WinEDA_CvpcbFrame::LoadSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::LoadSettings(); + EDA_BASE_FRAME::LoadSettings(); cfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, false ); cfg->Read( FootprintDocFileEntry, &m_DocModulesFileName, DEFAULT_FOOTPRINTS_LIST_FILENAME ); @@ -232,7 +230,7 @@ void WinEDA_CvpcbFrame::SaveSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::SaveSettings(); + EDA_BASE_FRAME::SaveSettings(); cfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen ); cfg->Write( FootprintDocFileEntry, m_DocModulesFileName ); } @@ -503,7 +501,7 @@ void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event ) */ void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event ) { - WinEDA_BasicFrame::SetLanguage( event ); + EDA_BASE_FRAME::SetLanguage( event ); } diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index b38b1ba87d..4116c2a874 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -20,7 +20,7 @@ class DISPLAY_FOOTPRINTS_FRAME; /** * The CVPcb application main window. */ -class WinEDA_CvpcbFrame : public WinEDA_BasicFrame +class WinEDA_CvpcbFrame : public EDA_BASE_FRAME { public: diff --git a/cvpcb/setvisu.cpp b/cvpcb/setvisu.cpp index 51960609ab..ea50a495ed 100644 --- a/cvpcb/setvisu.cpp +++ b/cvpcb/setvisu.cpp @@ -108,7 +108,7 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /* * Redraw the BOARD items but not cursors, axis or grid. */ -void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) +void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) { if( m_Modules ) { diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index efd952df58..9dc97eb967 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -18,7 +18,6 @@ set(EESCHEMA_SRCS class_libentry.cpp class_library.cpp class_netlist_object.cpp - cleanup.cpp cmp_library_keywords.cpp cmp_library_lexer.cpp component_references_lister.cpp diff --git a/eeschema/block.cpp b/eeschema/block.cpp index 575e7e7360..cf9ee5ecca 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -33,12 +33,12 @@ extern void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveV extern void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center ); extern void Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint ); extern void MirrorListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center ); -extern void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); +extern void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList ); extern void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector ); -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to @@ -178,7 +178,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) block->m_Command = BLOCK_IDLE; GetScreen()->SetCurItem( NULL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); if( block->GetCount() ) { @@ -234,7 +234,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) break; case BLOCK_DRAG: /* Drag */ - BreakSegmentOnJunction( GetScreen() ); + GetScreen()->BreakSegmentsOnJunctions(); // fall through case BLOCK_ROTATE: case BLOCK_MIRROR_X: @@ -272,7 +272,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) } block->ClearItemsList(); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); DrawPanel->Refresh(); break; @@ -373,8 +373,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) // Clear list of items to move, and rebuild it with items to drag: block->ClearItemsList(); - BreakSegmentOnJunction( GetScreen() ); - + GetScreen()->BreakSegmentsOnJunctions(); GetScreen()->UpdatePickList(); if( block->GetCount() ) @@ -399,7 +398,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) OnModify(); } - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); DrawPanel->Refresh(); break; @@ -435,7 +434,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) OnModify(); } - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); DrawPanel->Refresh(); break; @@ -452,7 +451,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint ); OnModify(); } - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); DrawPanel->Refresh(); break; @@ -470,7 +469,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) OnModify(); } - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); DrawPanel->Refresh(); break; @@ -495,7 +494,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) /* Traces the outline of the search block structures * The entire block follows the cursor */ -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BLOCK_SELECTOR* block = &panel->GetScreen()->m_BlockLocate;; BASE_SCREEN* screen = panel->GetScreen(); diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index 8ddb3fd498..43fc58f77b 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -15,7 +15,7 @@ #include "libeditframe.h" -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* @@ -274,7 +274,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) * Traces the outline of the search block structures * The entire block follows the cursor */ -void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BLOCK_SELECTOR* PtBlock; BASE_SCREEN* screen = panel->GetScreen(); diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index fa02fbdff9..35021d6eae 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -25,8 +25,8 @@ /* Routines Locales */ -static void Show_Polyline_in_Ghost( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void AbortCreateNewLine( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Show_Polyline_in_Ghost( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC ); static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer ); static bool IsJunctionNeeded( SCH_EDIT_FRAME* frame, wxPoint& pos ); static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos ); @@ -73,7 +73,7 @@ static void RestoreOldWires( SCH_SCREEN* screen ) /** * Mouse capture callback for drawing line segments. */ -static void DrawSegment( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase ) +static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, bool aErase ) { SCH_LINE* CurrentLine = (SCH_LINE*) aPanel->GetScreen()->GetCurItem(); SCH_LINE* segment; @@ -150,7 +150,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) { s_ConnexionStartPoint = cursorpos; s_OldWiresList = GetScreen()->ExtractWires( TRUE ); - GetScreen()->SchematicCleanUp( NULL ); + GetScreen()->SchematicCleanUp( DrawPanel ); switch( type ) { @@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) alt_end_point = lastsegment->m_Start; } - GetScreen()->SchematicCleanUp( NULL ); + GetScreen()->SchematicCleanUp( DrawPanel ); /* clear flags and find last segment entered, for repeat function */ segment = (SCH_LINE*) GetScreen()->GetDrawItems(); @@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) if( IsJunctionNeeded( this, s_ConnexionStartPoint ) ) CreateNewJunctionStruct( DC, s_ConnexionStartPoint ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); /* Redraw wires and junctions which can be changed by TestDanglingEnds() */ DrawPanel->CursorOff( DC ); // Erase schematic cursor @@ -432,7 +432,7 @@ static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos ) /* Drawing Polyline phantom at the displacement of the cursor */ -static void Show_Polyline_in_Ghost( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Show_Polyline_in_Ghost( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { SCH_POLYLINE* NewPoly = (SCH_POLYLINE*) panel->GetScreen()->GetCurItem(); int color; @@ -541,7 +541,7 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::CreateNewNoConnectStruct( wxDC* DC ) /* Abort function for wire, bus or line creation */ -static void AbortCreateNewLine( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC ) { SCH_SCREEN* Screen = (SCH_SCREEN*) Panel->GetScreen(); @@ -608,7 +608,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) { m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() ); GetScreen()->SetDrawItems( m_itemToRepeat ); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); SaveCopyInUndoList( m_itemToRepeat, UR_NEW ); m_itemToRepeat->m_Flags = 0; diff --git a/eeschema/busentry.cpp b/eeschema/busentry.cpp index baf0e9f3ad..7ed7c0027f 100644 --- a/eeschema/busentry.cpp +++ b/eeschema/busentry.cpp @@ -20,7 +20,7 @@ static int s_LastShape = '\\'; static wxPoint ItemInitialPosition; -static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void ExitBusEntry( EDA_DRAW_PANEL* Panel, wxDC* DC ) { /* Exit bus entry mode. */ SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem(); @@ -50,7 +50,7 @@ static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC ) } -static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { // Draws the bus entry while moving the cursor BASE_SCREEN* screen = panel->GetScreen(); @@ -139,7 +139,7 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY* BusEntry, int en break; } - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); OnModify( ); } diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 4b96809279..2180e49501 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -278,7 +278,7 @@ void LIB_COMPONENT::SetName( const wxString& aName ) } -void LIB_COMPONENT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti, +void LIB_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti, int aConvert, int aDrawMode, int aColor, const TRANSFORM& aTransform, bool aShowPinText, bool aDrawFields, bool aOnlySelected ) { @@ -407,7 +407,7 @@ void LIB_COMPONENT::Plot( PLOTTER* aPlotter, int aUnit, int aConvert, } -void LIB_COMPONENT::RemoveDrawItem( LIB_DRAW_ITEM* aItem, WinEDA_DrawPanel* aPanel, wxDC* aDc ) +void LIB_COMPONENT::RemoveDrawItem( LIB_DRAW_ITEM* aItem, EDA_DRAW_PANEL* aPanel, wxDC* aDc ) { wxASSERT( aItem != NULL ); diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index ad80c0e762..34ab1d8815 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -330,7 +330,7 @@ public: * @param aOnlySelected - Draws only the body items that are selected. * Used for block move redraws. */ - void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDc, const wxPoint& aOffset, + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti, int aConvert, int aDrawMode, int aColor = -1, const TRANSFORM& aTransform = DefaultTransform, bool aShowPinText = true, bool aDrawFields = true, @@ -362,7 +362,7 @@ public: * @param aPanel - Panel to remove part from. * @param aDc - Device context to remove part from. */ - void RemoveDrawItem( LIB_DRAW_ITEM* aItem, WinEDA_DrawPanel* aPanel = NULL, wxDC* aDc = NULL ); + void RemoveDrawItem( LIB_DRAW_ITEM* aItem, EDA_DRAW_PANEL* aPanel = NULL, wxDC* aDc = NULL ); /** * Return the next draw object pointer. diff --git a/eeschema/cleanup.cpp b/eeschema/cleanup.cpp deleted file mode 100644 index 28e6d4b83f..0000000000 --- a/eeschema/cleanup.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************/ -/* Code to handle schematic clean up. */ -/**************************************/ - -#include "fctsys.h" -#include "common.h" -#include "trigo.h" -#include "confirm.h" -#include "macros.h" -#include "class_sch_screen.h" - -#include "general.h" -#include "protos.h" -#include "netlist.h" -#include "sch_bus_entry.h" -#include "sch_junction.h" -#include "sch_line.h" - - -/* Routine to start/end segment (BUS or wires) on junctions. - */ -void BreakSegmentOnJunction( SCH_SCREEN* Screen ) -{ - SCH_ITEM* DrawList; - - if( Screen == NULL ) - { - DisplayError( NULL, - wxT( "BreakSegmentOnJunction() error: NULL screen" ) ); - return; - } - - DrawList = Screen->GetDrawItems(); - - while( DrawList ) - { - switch( DrawList->Type() ) - { - case SCH_JUNCTION_T: - #undef STRUCT - #define STRUCT ( (SCH_JUNCTION*) DrawList ) - BreakSegment( Screen, STRUCT->m_Pos ); - break; - - case SCH_BUS_ENTRY_T: - #undef STRUCT - #define STRUCT ( (SCH_BUS_ENTRY*) DrawList ) - BreakSegment( Screen, STRUCT->m_Pos ); - BreakSegment( Screen, STRUCT->m_End() ); - break; - - case SCH_LINE_T: - case SCH_NO_CONNECT_T: - case SCH_LABEL_T: - case SCH_GLOBAL_LABEL_T: - case SCH_HIERARCHICAL_LABEL_T: - case SCH_COMPONENT_T: - case SCH_POLYLINE_T: - case SCH_MARKER_T: - case SCH_TEXT_T: - case SCH_SHEET_T: - case SCH_SHEET_LABEL_T: - break; - - default: - break; - } - DrawList = DrawList->Next(); - } -} - - -/* Break a segment ( BUS, WIRE ) int 2 segments at location aBreakpoint, - * if aBreakpoint in on segment segment - * ( excluding ends) - * fill aPicklist with modified items if non null - */ -void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint ) -{ - SCH_LINE* segment, * NewSegment; - - for( SCH_ITEM* DrawList = aScreen->GetDrawItems(); DrawList; DrawList = DrawList->Next() ) - { - if( DrawList->Type() != SCH_LINE_T ) - continue; - - segment = (SCH_LINE*) DrawList; - - if( !TestSegmentHit( aBreakpoint, segment->m_Start, segment->m_End, 0 ) ) - continue; - - /* A segment is found - * It will be cut if aBreakpoint is not a segment end */ - if( ( segment->m_Start == aBreakpoint ) || ( segment->m_End == aBreakpoint ) ) - continue; - - /* Here we must cut the segment and create a new segment. */ - NewSegment = new SCH_LINE( *segment ); - NewSegment->m_Start = aBreakpoint; - segment->m_End = NewSegment->m_Start; - NewSegment->SetNext( segment->Next() ); - segment->SetNext( NewSegment ); - DrawList = NewSegment; - } -} diff --git a/eeschema/dangling_ends.cpp b/eeschema/dangling_ends.cpp index a9db0ddd58..f5c21b9b8a 100644 --- a/eeschema/dangling_ends.cpp +++ b/eeschema/dangling_ends.cpp @@ -31,22 +31,3 @@ bool SegmentIntersect( wxPoint aSegStart, wxPoint aSegEnd, wxPoint aTestPoint ) return true; } - - -void SCH_EDIT_FRAME::TestDanglingEnds( SCH_ITEM* aDrawList, wxDC* aDC ) -{ - SCH_ITEM* item; - std::vector< DANGLING_END_ITEM > endPoints; - - for( item = aDrawList; item != NULL; item = item->Next() ) - item->GetEndPoints( endPoints ); - - for( item = aDrawList; item; item = item->Next() ) - { - if( item->IsDanglingStateChanged( endPoints ) && aDC != NULL ) - { - item->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); - item->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - } - } -} diff --git a/eeschema/database.cpp b/eeschema/database.cpp index c1df7206c7..1d4e42cc3c 100644 --- a/eeschema/database.cpp +++ b/eeschema/database.cpp @@ -31,7 +31,7 @@ * Place the name of the component has loaded, select from a list in * BufName */ -wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName ) +wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName ) { wxArrayString nameList; wxString msg; diff --git a/eeschema/delete.cpp b/eeschema/delete.cpp index f43dabac9d..2752928e64 100644 --- a/eeschema/delete.cpp +++ b/eeschema/delete.cpp @@ -18,7 +18,7 @@ // Imported function: -void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); +void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList ); /* @@ -85,7 +85,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection ) /* Clear .m_Flags member for all items */ screen->ClearDrawingState(); - BreakSegmentOnJunction( screen ); + screen->BreakSegmentsOnJunctions(); /* Locate all the wires, bus or junction under the mouse cursor, and put * them in a list of items to delete @@ -314,7 +314,7 @@ bool LocateAndDeleteItem( SCH_EDIT_FRAME* frame, wxDC* DC ) { frame->SetRepeatItem( NULL ); DeleteStruct( frame->DrawPanel, DC, DelStruct ); - frame->TestDanglingEnds( frame->GetScreen()->GetDrawItems(), DC ); + frame->GetScreen()->TestDanglingEnds( frame->DrawPanel, DC ); frame->OnModify( ); item_deleted = TRUE; } diff --git a/eeschema/dialogs/dialog_SVG_print.cpp b/eeschema/dialogs/dialog_SVG_print.cpp index 1f6b3e4783..25bf4578f0 100644 --- a/eeschema/dialogs/dialog_SVG_print.cpp +++ b/eeschema/dialogs/dialog_SVG_print.cpp @@ -37,7 +37,7 @@ static int s_PlotBlackAndWhite = 0; /*! * DIALOG_SVG_PRINT functions */ -DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) : +DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) : DIALOG_SVG_PRINT_base( parent ) { m_Parent = parent; @@ -174,11 +174,11 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) } -bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame, - const wxString& FullFileName, - SCH_SCREEN* screen, - bool aPrintBlackAndWhite, - bool aPrint_Sheet_Ref ) +bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame, + const wxString& FullFileName, + SCH_SCREEN* screen, + bool aPrintBlackAndWhite, + bool aPrint_Sheet_Ref ) { int tmpzoom; wxPoint tmp_startvisu; @@ -195,7 +195,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame, SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units screen->SetScalingFactor( 1.0 ); - WinEDA_DrawPanel* panel = frame->DrawPanel; + EDA_DRAW_PANEL* panel = frame->DrawPanel; SetLocaleTo_C_standard(); // Switch the locale to standard C (needed // to print floating point numbers like 1.3) diff --git a/eeschema/dialogs/dialog_SVG_print.h b/eeschema/dialogs/dialog_SVG_print.h index b8cf34ddee..a762fd41f2 100644 --- a/eeschema/dialogs/dialog_SVG_print.h +++ b/eeschema/dialogs/dialog_SVG_print.h @@ -3,7 +3,7 @@ #define _DIALOG_SVG_PRINT_H_ -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class BASE_SCREEN; @@ -13,11 +13,11 @@ class BASE_SCREEN; class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base { private: - WinEDA_DrawFrame* m_Parent; - wxConfig* m_Config; + EDA_DRAW_FRAME* m_Parent; + wxConfig* m_Config; public: - DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ); + DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ); ~DIALOG_SVG_PRINT() {} private: @@ -31,7 +31,7 @@ private: void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ); public: - static bool DrawSVGPage( WinEDA_DrawFrame* frame, + static bool DrawSVGPage( EDA_DRAW_FRAME* frame, const wxString& FullFileName, SCH_SCREEN* screen, bool aPrintBlackAndWhite = false, bool aPrint_Sheet_Ref = false ); diff --git a/eeschema/dialogs/dialog_build_BOM.cpp b/eeschema/dialogs/dialog_build_BOM.cpp index d414edaaf1..c9721ea051 100644 --- a/eeschema/dialogs/dialog_build_BOM.cpp +++ b/eeschema/dialogs/dialog_build_BOM.cpp @@ -89,7 +89,7 @@ static char s_ExportSeparator[] = ("\t;,."); */ -DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ) : +DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent ) : DIALOG_BUILD_BOM_BASE( parent ) { m_Config = wxGetApp().m_EDA_Config; diff --git a/eeschema/dialogs/dialog_build_BOM.h b/eeschema/dialogs/dialog_build_BOM.h index 122e21f9ba..0e458f0c3d 100644 --- a/eeschema/dialogs/dialog_build_BOM.h +++ b/eeschema/dialogs/dialog_build_BOM.h @@ -10,7 +10,7 @@ #include "dialog_build_BOM_base.h" -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class SCH_COMPONENT; class wxConfig; @@ -18,9 +18,9 @@ class wxConfig; class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE { private: - WinEDA_DrawFrame* m_Parent; - wxConfig* m_Config; - wxString m_ListFileName; + EDA_DRAW_FRAME* m_Parent; + wxConfig* m_Config; + wxString m_ListFileName; private: void OnRadioboxSelectFormatSelected( wxCommandEvent& event ); @@ -60,7 +60,7 @@ private: bool IsFieldChecked( int aFieldId ); public: - DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ); + DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent ); // ~DIALOG_BUILD_BOM() {}; }; diff --git a/eeschema/dialogs/dialog_color_config.cpp b/eeschema/dialogs/dialog_color_config.cpp index 52ada03a72..f27efa0611 100644 --- a/eeschema/dialogs/dialog_color_config.cpp +++ b/eeschema/dialogs/dialog_color_config.cpp @@ -79,7 +79,7 @@ DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG() } -DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( WinEDA_DrawFrame* aParent ) +DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent ) { m_Parent = aParent; Init(); diff --git a/eeschema/dialogs/dialog_color_config.h b/eeschema/dialogs/dialog_color_config.h index a202b8cb66..49b77ae6d1 100644 --- a/eeschema/dialogs/dialog_color_config.h +++ b/eeschema/dialogs/dialog_color_config.h @@ -41,7 +41,7 @@ class DIALOG_COLOR_CONFIG: public wxDialog private: DECLARE_DYNAMIC_CLASS( DIALOG_COLOR_CONFIG ) - WinEDA_DrawFrame* m_Parent; + EDA_DRAW_FRAME* m_Parent; wxBoxSizer* OuterBoxSizer; wxBoxSizer* MainBoxSizer; wxBoxSizer* ColumnBoxSizer; @@ -79,7 +79,7 @@ private: public: // Constructors and destructor DIALOG_COLOR_CONFIG(); - DIALOG_COLOR_CONFIG( WinEDA_DrawFrame* aParent ); + DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent ); ~DIALOG_COLOR_CONFIG(); }; diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index f61850ee17..5f2220d0db 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -268,9 +268,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event m_Cmp->SetRef( m_Parent->GetSheet(), m_FieldsBuf[REFERENCE].m_Text ); m_Parent->OnModify(); - - m_Parent->TestDanglingEnds( m_Parent->GetScreen()->GetDrawItems(), NULL ); - + m_Parent->GetScreen()->TestDanglingEnds(); m_Parent->DrawPanel->Refresh( TRUE ); EndModal( 0 ); diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp index 18f6eb461a..10655e428a 100644 --- a/eeschema/dialogs/dialog_eeschema_config.cpp +++ b/eeschema/dialogs/dialog_eeschema_config.cpp @@ -25,8 +25,8 @@ #include "dialog_eeschema_config.h" -DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame, - WinEDA_DrawFrame* aParent ) +DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame, + EDA_DRAW_FRAME* aParent ) : DIALOG_EESCHEMA_CONFIG_FBP( aParent ) { wxString msg; diff --git a/eeschema/dialogs/dialog_eeschema_config.h b/eeschema/dialogs/dialog_eeschema_config.h index 6f1008a7cb..ba9d919d77 100644 --- a/eeschema/dialogs/dialog_eeschema_config.h +++ b/eeschema/dialogs/dialog_eeschema_config.h @@ -7,7 +7,7 @@ class SCH_EDIT_FRAME; -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP @@ -34,7 +34,7 @@ private: public: - DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, WinEDA_DrawFrame* activeWindow ); + DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, EDA_DRAW_FRAME* activeWindow ); ~DIALOG_EESCHEMA_CONFIG() {}; }; diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index aaaa184c89..bdad16bb28 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -316,7 +316,7 @@ void SCH_PRINTOUT::DrawPage() wxRect fitRect; wxDC* dc = GetDC(); SCH_EDIT_FRAME* parent = m_Parent->GetParent(); - WinEDA_DrawPanel* panel = parent->DrawPanel; + EDA_DRAW_PANEL* panel = parent->DrawPanel; wxBusyCursor dummy; diff --git a/eeschema/edit_component_in_schematic.cpp b/eeschema/edit_component_in_schematic.cpp index 0970e6b96c..ded38c40f4 100644 --- a/eeschema/edit_component_in_schematic.cpp +++ b/eeschema/edit_component_in_schematic.cpp @@ -16,8 +16,8 @@ #include "sch_component.h" -static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void AbortMoveCmpField( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void MoveCmpField( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /******************************************************************************/ @@ -125,7 +125,7 @@ modified!\nYou must create a new power" ) ); wxString newtext = Field->m_Text; DrawPanel->m_IgnoreMouseEvents = TRUE; - wxString title = _( "Field:" ) + wxT(" ") + Field->m_Name; + wxString title = _( "Field: " ) + Field->m_Name; wxTextEntryDialog dlg( this, wxEmptyString , title, newtext ); int diag = dlg.ShowModal(); newtext = dlg.GetValue( ); @@ -178,7 +178,7 @@ modified!\nYou must create a new power" ) ); /* * Move standard text field. This routine is normally attached to the cursor. */ -static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void MoveCmpField( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { wxPoint pos; int fieldNdx; @@ -213,7 +213,7 @@ static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) } -static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortMoveCmpField( EDA_DRAW_PANEL* Panel, wxDC* DC ) { Panel->ForceCloseManageCurseur = NULL; Panel->ManageCurseur = NULL; diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index 89f60e6d9f..ec55714118 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -18,8 +18,8 @@ #include "sch_text.h" -static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC ); +static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void ExitMoveTexte( EDA_DRAW_PANEL* panel, wxDC* DC ); static wxPoint ItemInitialPosition; @@ -184,7 +184,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* DC, int type ) /************************************/ /* Redraw a Text while moving */ /************************************/ -static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { SCH_ITEM* TextStruct = (SCH_ITEM*) panel->GetScreen()->GetCurItem(); @@ -211,7 +211,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) /* Abort function for the command move text */ -static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void ExitMoveTexte( EDA_DRAW_PANEL* Panel, wxDC* DC ) { BASE_SCREEN* screen = Panel->GetScreen(); SCH_ITEM* Struct = (SCH_ITEM*) screen->GetCurItem(); diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp index 0bfac270a9..5477a840c4 100644 --- a/eeschema/eeredraw.cpp +++ b/eeschema/eeredraw.cpp @@ -26,7 +26,7 @@ #include "build_version.h" -void DrawDanglingSymbol( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& pos, int Color ) +void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color ) { BASE_SCREEN* screen = panel->GetScreen(); diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 3ba2f4ed48..afd034f04a 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -556,7 +556,7 @@ void SCH_EDIT_FRAME::LoadSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_DrawFrame::LoadSettings(); + EDA_DRAW_FRAME::LoadSettings(); wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); @@ -653,7 +653,7 @@ void SCH_EDIT_FRAME::SaveSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_DrawFrame::SaveSettings(); + EDA_DRAW_FRAME::SaveSettings(); wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index 3d55a8128e..efb1579e2b 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -217,7 +217,7 @@ int TestDuplicateSheetNames( bool aCreateMarker ) * or between aNetItemRef and aNetItemTst * if MinConn < 0: this is an error on labels */ -void Diagnose( WinEDA_DrawPanel* aPanel, +void Diagnose( EDA_DRAW_PANEL* aPanel, NETLIST_OBJECT* aNetItemRef, NETLIST_OBJECT* aNetItemTst, int aMinConn, int aDiag ) @@ -352,7 +352,7 @@ void Diagnose( WinEDA_DrawPanel* aPanel, /* Routine testing electrical conflicts between NetItemRef and other items * of the same net */ -void TestOthersItems( WinEDA_DrawPanel* panel, +void TestOthersItems( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned netstart, int* NetNbItems, int* MinConnexion ) @@ -571,7 +571,7 @@ static bool IsLabelsConnected( NETLIST_OBJECT* a, NETLIST_OBJECT* b ) /* Routine to perform erc on a sheetLabel that is connected to a corresponding * sub sheet Glabel */ -void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet ) +void TestLabel( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned StartNet ) { unsigned NetItemTst; int erc = 1; diff --git a/eeschema/erc.h b/eeschema/erc.h index e4c6439f74..f8f33d9d0e 100644 --- a/eeschema/erc.h +++ b/eeschema/erc.h @@ -26,7 +26,7 @@ #define _ERC_H -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; class NETLIST_OBJECT; /* For ERC markers: error types (used in diags, and to set the color): @@ -60,13 +60,13 @@ enum errortype extern bool WriteDiagnosticERC( const wxString& FullFileName ); -extern void Diagnose( WinEDA_DrawPanel* panel, NETLIST_OBJECT* NetItemRef, +extern void Diagnose( EDA_DRAW_PANEL* panel, NETLIST_OBJECT* NetItemRef, NETLIST_OBJECT* NetItemTst, int MinConnexion, int Diag ); -extern void TestOthersItems( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned NetStart, +extern void TestOthersItems( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned NetStart, int* NetNbItems, int* MinConnexion ); -extern void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet ); +extern void TestLabel( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned StartNet ); extern int TestDuplicateSheetNames( bool aCreateMarker ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 88b3edf8ac..f07c42b2f4 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -22,8 +22,8 @@ #include -static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void ExitPlaceCmp( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void ExitPlaceCmp( EDA_DRAW_PANEL* Panel, wxDC* DC ); static TRANSFORM OldTransform; static wxPoint OldPos; @@ -221,7 +221,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC, /** * Move a component. */ -static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { wxPoint move_vector; @@ -275,7 +275,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC, DrawPanel->CursorOn( DC ); } - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); OnModify( ); } @@ -283,7 +283,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC, /* * Abort a place component command in progress. */ -static void ExitPlaceCmp( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void ExitPlaceCmp( EDA_DRAW_PANEL* Panel, wxDC* DC ) { SCH_SCREEN* screen = (SCH_SCREEN*) Panel->GetScreen(); @@ -359,7 +359,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC* else DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); OnModify( ); } @@ -404,7 +404,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC ) else DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); OnModify( ); } diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 63080af9af..ec1416c45a 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -346,7 +346,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) RefreshToolBar = LocateAndDeleteItem( this, DC ); OnModify(); GetScreen()->SetCurItem( NULL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); } break; @@ -661,7 +661,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) RefreshToolBar = TRUE; } CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_NORMAL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); + GetScreen()->TestDanglingEnds( DrawPanel, DC ); } break; diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index 2089de75e9..65e12a2d40 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -345,7 +345,7 @@ void LIB_ARC::drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor ) } -void LIB_ARC::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_ARC::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { // Don't draw the arc until the end point is selected. Only the edit indicators @@ -474,7 +474,7 @@ start(%d, %d), end(%d, %d), radius %d" ), } -void LIB_ARC::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_ARC::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; EDA_Rect bBox = GetBoundingBox(); diff --git a/eeschema/lib_arc.h b/eeschema/lib_arc.h index bf52ab119f..5351a01e43 100644 --- a/eeschema/lib_arc.h +++ b/eeschema/lib_arc.h @@ -37,7 +37,7 @@ class LIB_ARC : public LIB_DRAW_ITEM /** * Draws the arc. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -97,7 +97,7 @@ public: virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); virtual EDA_Rect GetBoundingBox() const; - virtual void DisplayInfo( WinEDA_DrawFrame* frame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * @return the size of the "pen" that be used to draw or plot this item diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index fa75cc2477..f2b4b44bf3 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -241,7 +241,7 @@ int LIB_BEZIER::GetPenSize() return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width; } -void LIB_BEZIER::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { wxPoint pos1; @@ -367,7 +367,7 @@ EDA_Rect LIB_BEZIER::GetBoundingBox() const } -void LIB_BEZIER::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_BEZIER::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; EDA_Rect bBox = GetBoundingBox(); diff --git a/eeschema/lib_bezier.h b/eeschema/lib_bezier.h index 98693f0c4a..88cde59c9e 100644 --- a/eeschema/lib_bezier.h +++ b/eeschema/lib_bezier.h @@ -18,7 +18,7 @@ class LIB_BEZIER : public LIB_DRAW_ITEM /** * Draw the bezier curve. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); public: @@ -74,7 +74,7 @@ public: */ virtual int GetPenSize( ); - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); protected: virtual LIB_DRAW_ITEM* DoGenCopy(); diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index b72d340105..7c2da463a7 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -197,7 +197,7 @@ int LIB_CIRCLE::GetPenSize() } -void LIB_CIRCLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_CIRCLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { wxPoint pos1; @@ -250,7 +250,7 @@ EDA_Rect LIB_CIRCLE::GetBoundingBox() const } -void LIB_CIRCLE::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_CIRCLE::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; EDA_Rect bBox = GetBoundingBox(); diff --git a/eeschema/lib_circle.h b/eeschema/lib_circle.h index 2e80e9af55..71b9e260d0 100644 --- a/eeschema/lib_circle.h +++ b/eeschema/lib_circle.h @@ -18,7 +18,7 @@ class LIB_CIRCLE : public LIB_DRAW_ITEM /** * Draws the arc. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -70,7 +70,7 @@ public: virtual int GetPenSize( ); virtual EDA_Rect GetBoundingBox() const; - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); /** * See LIB_DRAW_ITEM::BeginEdit(). diff --git a/eeschema/lib_draw_item.cpp b/eeschema/lib_draw_item.cpp index 9d25e3ad07..7ab8989d87 100644 --- a/eeschema/lib_draw_item.cpp +++ b/eeschema/lib_draw_item.cpp @@ -53,7 +53,7 @@ LIB_DRAW_ITEM::LIB_DRAW_ITEM( const LIB_DRAW_ITEM& aItem ) : * all library items. Call the base class from the derived class or the * common information will not be updated in the message panel. */ -void LIB_DRAW_ITEM::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_DRAW_ITEM::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; @@ -108,7 +108,7 @@ bool LIB_DRAW_ITEM::operator<( const LIB_DRAW_ITEM& aOther ) const } -void LIB_DRAW_ITEM::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, +void LIB_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { if( InEditMode() ) diff --git a/eeschema/lib_draw_item.h b/eeschema/lib_draw_item.h index 159df9d73e..88d911f746 100644 --- a/eeschema/lib_draw_item.h +++ b/eeschema/lib_draw_item.h @@ -55,7 +55,7 @@ class LIB_DRAW_ITEM : public EDA_ITEM /** * Draws the item. */ - virtual void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, + virtual void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) = 0; @@ -179,7 +179,7 @@ public: * or to pass reference to the lib component for pins * @param aTransform - Transform Matrix (rotation, mirror ..) */ - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint &aOffset, int aColor, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -233,7 +233,7 @@ public: * in msg panel * @param aFrame = main frame where the message manel info is. */ - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); /** * Make a copy of this draw item. diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 8d402feb74..92dae94045 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -292,7 +292,7 @@ int LIB_FIELD::GetPenSize() * if aData not NULL, aData must point a wxString which is used instead of * the m_Text */ -void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { wxPoint text_pos; @@ -710,7 +710,7 @@ void LIB_FIELD::calcEdit( const wxPoint& aPosition ) } } -void LIB_FIELD::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_FIELD::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h index 02aff83b10..e438dd4f17 100644 --- a/eeschema/lib_field.h +++ b/eeschema/lib_field.h @@ -27,7 +27,7 @@ class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TextStruct /** * Draw the field. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -135,7 +135,7 @@ public: * in msg panel * @param aFrame = main frame where the message manel info is. */ - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); /** * Test if the given point is within the bounds of this object. diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 6ee5084c0d..cefb0c7169 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -783,13 +783,13 @@ int LIB_PIN::GetPenSize() } -void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aColor, - int aDrawMode, - void* aData, - const TRANSFORM& aTransform ) +void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aColor, + int aDrawMode, + void* aData, + const TRANSFORM& aTransform ) { // Invisible pins are only drawn on request. In libedit they are drawn // in g_InvisibleItemColor because we must see them. @@ -841,12 +841,12 @@ void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel, * Draw the pin symbol (without texts) * if Color != 0 draw with Color, else with the normal pin color */ -void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aPinPos, - int aOrient, - int aDrawMode, - int aColor ) +void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aPinPos, + int aOrient, + int aDrawMode, + int aColor ) { int MapX1, MapY1, x1, y1; int color; @@ -1063,15 +1063,15 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel, * Pin Name: substring beteween '~' is negated * DrawMode = GR_OR, XOR ... *****************************************************************************/ -void LIB_PIN::DrawPinTexts( WinEDA_DrawPanel* panel, - wxDC* DC, - wxPoint& pin_pos, - int orient, - int TextInside, - bool DrawPinNum, - bool DrawPinName, - int Color, - int DrawMode ) +void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel, + wxDC* DC, + wxPoint& pin_pos, + int orient, + int TextInside, + bool DrawPinNum, + bool DrawPinName, + int Color, + int DrawMode ) { int x, y, x1, y1; wxString StringPinNum; @@ -1713,7 +1713,7 @@ void LIB_PIN::DoSetWidth( int aWidth ) * Displays info (pin num and name, orientation ... * on the Info window */ -void LIB_PIN::DisplayInfo( WinEDA_DrawFrame* frame ) +void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString Text; diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index b1e510899e..236655dfcb 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -95,7 +95,7 @@ class LIB_PIN : public LIB_DRAW_ITEM /** * Draw the pin. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); public: @@ -152,7 +152,7 @@ public: */ virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); - virtual void DisplayInfo( WinEDA_DrawFrame* frame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* frame ); virtual EDA_Rect GetBoundingBox() const; @@ -338,10 +338,10 @@ public: */ virtual int GetPenSize(); - void DrawPinSymbol( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aPosition, + void DrawPinSymbol( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, int aOrientation, int aDrawMode, int aColor = -1 ); - void DrawPinTexts( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxPoint& aPosition, + void DrawPinTexts( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint& aPosition, int aOrientation, int TextInside, bool DrawPinNum, bool DrawPinName, int aColor, int aDrawMode ); diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index b41b910a5b..1fd6a8e990 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -240,7 +240,7 @@ int LIB_POLYLINE::GetPenSize() } -void LIB_POLYLINE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { @@ -385,7 +385,7 @@ void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition ) } -void LIB_POLYLINE::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_POLYLINE::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; EDA_Rect bBox = GetBoundingBox(); diff --git a/eeschema/lib_polyline.h b/eeschema/lib_polyline.h index bbbe29eb31..0b03d96e0a 100644 --- a/eeschema/lib_polyline.h +++ b/eeschema/lib_polyline.h @@ -19,7 +19,7 @@ class LIB_POLYLINE : public LIB_DRAW_ITEM /** * Draw the polyline. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -88,7 +88,7 @@ public: */ virtual int GetPenSize( ); - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); /** * See LIB_DRAW_ITEM::BeginEdit(). diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 3b7c00def3..d62c7babe4 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -171,7 +171,7 @@ int LIB_RECTANGLE::GetPenSize() return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width; } -void LIB_RECTANGLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, +void LIB_RECTANGLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { @@ -217,7 +217,7 @@ void LIB_RECTANGLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, } -void LIB_RECTANGLE::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void LIB_RECTANGLE::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { wxString msg; diff --git a/eeschema/lib_rectangle.h b/eeschema/lib_rectangle.h index e5d2ec73ac..e79835d3d1 100644 --- a/eeschema/lib_rectangle.h +++ b/eeschema/lib_rectangle.h @@ -21,7 +21,7 @@ class LIB_RECTANGLE : public LIB_DRAW_ITEM /** * Draw the rectangle. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -76,7 +76,7 @@ public: virtual EDA_Rect GetBoundingBox() const; - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); /** * See LIB_DRAW_ITEM::BeginEdit(). diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index 07d78862b9..8cbe669e9e 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -279,7 +279,7 @@ int LIB_TEXT::GetPenSize( ) } -void LIB_TEXT::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) { wxPoint pos1, pos2; @@ -351,7 +351,7 @@ void LIB_TEXT::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& } -void LIB_TEXT::DisplayInfo( WinEDA_DrawFrame* frame ) +void LIB_TEXT::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString msg; diff --git a/eeschema/lib_text.h b/eeschema/lib_text.h index f7ec5b3abd..5a51d28854 100644 --- a/eeschema/lib_text.h +++ b/eeschema/lib_text.h @@ -21,7 +21,7 @@ class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TextStruct /** * Draw the polyline. */ - void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); /** @@ -96,7 +96,7 @@ public: */ virtual int GetPenSize( ); - virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); virtual EDA_Rect GetBoundingBox() const; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 707a5ed871..7af784c70f 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -74,7 +74,7 @@ FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL; /************************/ /* class LIB_EDIT_FRAME */ /************************/ -BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, WinEDA_DrawFrame ) +BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_CLOSE( LIB_EDIT_FRAME::OnCloseWindow ) EVT_SIZE( LIB_EDIT_FRAME::OnSize ) EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate ) @@ -115,7 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, WinEDA_DrawFrame ) EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::SaveActiveLibrary ) EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) - EVT_MENU( ID_GENERAL_HELP, WinEDA_DrawFrame::GetKicadHelp ) + EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig ) EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame ) @@ -168,7 +168,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, const wxPoint& pos, const wxSize& size, long style ) : - WinEDA_DrawFrame( aParent, LIBEDITOR_FRAME, title, pos, size, style ) + EDA_DRAW_FRAME( aParent, LIBEDITOR_FRAME, title, pos, size, style ) { wxASSERT( aParent ); @@ -267,7 +267,7 @@ void LIB_EDIT_FRAME::LoadSettings() { wxConfig* cfg; - WinEDA_DrawFrame::LoadSettings(); + EDA_DRAW_FRAME::LoadSettings(); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); cfg = wxGetApp().m_EDA_Config; @@ -293,7 +293,7 @@ void LIB_EDIT_FRAME::SaveSettings() { wxConfig* cfg; - WinEDA_DrawFrame::SaveSettings(); + EDA_DRAW_FRAME::SaveSettings(); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); cfg = wxGetApp().m_EDA_Config; @@ -933,7 +933,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) void LIB_EDIT_FRAME::OnActivate( wxActivateEvent& event ) { - WinEDA_DrawFrame::OnActivate( event ); + EDA_DRAW_FRAME::OnActivate( event ); // Verify the existence of the current active library // (can be removed or changed by the schematic editor) @@ -956,12 +956,12 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists() void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) { - WinEDA_BasicFrame::SetLanguage( event ); + EDA_BASE_FRAME::SetLanguage( event ); SCH_EDIT_FRAME *parent = (SCH_EDIT_FRAME *)GetParent(); - // Call parent->WinEDA_BasicFrame::SetLanguage and NOT + // Call parent->EDA_BASE_FRAME::SetLanguage and NOT // parent->SetLanguage because parent->SetLanguage call // LIB_EDIT_FRAME::SetLanguage - parent->WinEDA_BasicFrame::SetLanguage( event ); + parent->EDA_BASE_FRAME::SetLanguage( event ); } diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index fa0cf66e3c..dd80a91836 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -23,7 +23,7 @@ class DIALOG_LIB_EDIT_TEXT; /** * The component library editor main window. */ -class LIB_EDIT_FRAME : public WinEDA_DrawFrame +class LIB_EDIT_FRAME : public EDA_DRAW_FRAME { LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit. diff --git a/eeschema/load_one_schematic_file.cpp b/eeschema/load_one_schematic_file.cpp index 5aca1dd074..7134b9d912 100644 --- a/eeschema/load_one_schematic_file.cpp +++ b/eeschema/load_one_schematic_file.cpp @@ -221,7 +221,7 @@ again." ); screen->Show( 0, std::cout ); #endif - TestDanglingEnds( screen->GetDrawItems(), NULL ); + screen->TestDanglingEnds(); MsgDiag = _( "Done Loading " ) + screen->GetFileName(); PrintMsg( MsgDiag ); diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index 623632c1b7..7ca9981649 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -54,7 +54,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) case SCH_FIELD_T: DrawStruct->Place( this, DC ); GetScreen()->SetCurItem( NULL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); return; @@ -115,7 +115,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; } - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); break; @@ -131,7 +131,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; } - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); break; @@ -149,7 +149,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); GetScreen()->SetCurItem( NULL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); DrawPanel->m_AutoPAN_Request = FALSE; } @@ -159,7 +159,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) LocateAndDeleteItem( this, DC ); OnModify( ); GetScreen()->SetCurItem( NULL ); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); break; @@ -201,7 +201,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; @@ -220,7 +220,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; @@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; @@ -259,7 +259,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) else if( (DrawStruct->Type() == SCH_SHEET_LABEL_T) && (DrawStruct->m_Flags != 0) ) { DrawStruct->Place( this, DC ); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; @@ -274,7 +274,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; @@ -289,7 +289,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { DrawStruct->Place( this, DC ); DrawPanel->m_AutoPAN_Request = FALSE; - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh( TRUE ); } break; diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp index 5c5bec02eb..50595ab88d 100644 --- a/eeschema/operations_on_items_lists.cpp +++ b/eeschema/operations_on_items_lists.cpp @@ -62,7 +62,7 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint ) } -void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); +void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList ); void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector ); @@ -110,7 +110,7 @@ void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector ) * delete schematic items in aItemsList * deleted items are put in undo list */ -void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ) +void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList ) { SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen(); SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent(); @@ -146,7 +146,7 @@ void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ) /* Routine to delete an object from global drawing object list. * Object is put in Undo list */ -void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct ) +void DeleteStruct( EDA_DRAW_PANEL* panel, wxDC* DC, SCH_ITEM* DrawStruct ) { SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen(); SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent(); diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index fbd9d9aa1e..fc6d7591c2 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -20,10 +20,9 @@ #include "dialog_lib_edit_pin.h" -static void CreateImagePins( LIB_PIN* Pin, int unit, int convert, - bool asDeMorgan ); -static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void DrawMovePin( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void CreateImagePins( LIB_PIN* Pin, int unit, int convert, bool asDeMorgan ); +static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void DrawMovePin( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); static wxPoint OldPos; @@ -177,7 +176,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) /** * Clean up after aborting a move pin command. */ -static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC ) { LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) Panel->GetParent(); @@ -337,7 +336,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC ) /* Move pin to the current mouse position. This function is called by the * cursor management code. */ -static void DrawMovePin( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void DrawMovePin( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) panel->GetParent(); diff --git a/eeschema/protos.h b/eeschema/protos.h index 539a46ae99..5de41cc06b 100644 --- a/eeschema/protos.h +++ b/eeschema/protos.h @@ -10,8 +10,8 @@ class EDA_ITEM; -class WinEDA_DrawPanel; -class WinEDA_DrawFrame; +class EDA_DRAW_PANEL; +class EDA_DRAW_FRAME; class SCH_EDIT_FRAME; class LIB_EDIT_FRAME; class CMP_LIBRARY; @@ -35,7 +35,7 @@ wxString ReturnDefaultFieldName( int aFieldNdx ); /* DATABASE.CPP */ /****************/ void DisplayCmpDoc( wxString& Name ); -wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName ); +wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName ); /*********************/ /* DANGLING_ENDS.CPP */ @@ -62,7 +62,7 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw /************/ /* BLOCK.CPP */ /************/ -void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct ); +void DeleteStruct( EDA_DRAW_PANEL* panel, wxDC* DC, SCH_ITEM* DrawStruct ); // operations_on_item_lists.cpp @@ -120,8 +120,8 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask /***************/ /* EEREDRAW.CPP */ /***************/ -void DrawDanglingSymbol( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& pos, int Color ); -void RedrawActiveWindow( WinEDA_DrawPanel* panel, wxDC* DC ); +void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color ); +void RedrawActiveWindow( EDA_DRAW_PANEL* panel, wxDC* DC ); /**************/ @@ -181,10 +181,10 @@ void InstallPineditFrame( LIB_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos ) * 1 if selected component * 0 if canceled order */ -int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, - CMP_LIBRARY* Library, - wxString& Buffer, - wxString& OldName ); +int DisplayComponentsNamesInLib( EDA_DRAW_FRAME* frame, + CMP_LIBRARY* Library, + wxString& Buffer, + wxString& OldName ); /** * Function SelectLibraryFromList @@ -192,7 +192,7 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, * a library * This list is sorted, with the library cache always at end of the list */ -CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ); +CMP_LIBRARY* SelectLibraryFromList( EDA_DRAW_FRAME* frame ); /** * Get the name component from a library to load. @@ -203,9 +203,9 @@ CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ); * 0 if canceled order * Place the name of the selected component list in BufName */ -int GetNameOfPartToLoad( WinEDA_DrawFrame* frame, - CMP_LIBRARY* Lib, - wxString& BufName ); +int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame, + CMP_LIBRARY* Lib, + wxString& BufName ); /**************/ /* LIBARCH.CPP */ @@ -213,30 +213,13 @@ int GetNameOfPartToLoad( WinEDA_DrawFrame* frame, bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName ); -/**************/ -/* CLEANUP.CPP */ -/**************/ - -void SchematicCleanUp( SCH_SCREEN* screen, wxDC* DC ); - -/* Routine de nettoyage: - * - regroupe les segments de fils (ou de bus) alignes en 1 seul segment - * - Detecte les objets identiques superposes - */ - -void BreakSegmentOnJunction( SCH_SCREEN* Screen ); - -/* Break a segment ( BUS, WIRE ) int 2 segments at location aBreakpoint, - * if aBreakpoint in on segment segment - * ( excluding ends) - */ -void BreakSegment(SCH_SCREEN * aScreen, wxPoint aBreakpoint ); /***************/ /* OPTIONS.CPP */ /***************/ void DisplayOptionFrame( SCH_EDIT_FRAME* parent, const wxPoint& framepos ); + /****************/ /* CONTROLE.CPP */ /****************/ diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index 8da154947d..d60a54a120 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -148,7 +148,7 @@ int SCH_BUS_ENTRY::GetPenSize() const } -void SCH_BUS_ENTRY::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void SCH_BUS_ENTRY::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { int color; diff --git a/eeschema/sch_bus_entry.h b/eeschema/sch_bus_entry.h index 5c67d54fa6..5bf370397e 100644 --- a/eeschema/sch_bus_entry.h +++ b/eeschema/sch_bus_entry.h @@ -40,7 +40,7 @@ public: wxPoint m_End() const; - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor = -1 ); /** diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index b654db89a8..6ed978f62e 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -227,7 +227,7 @@ void SCH_COMPONENT::SetTransform( const TRANSFORM& aTransform ) } -void SCH_COMPONENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, +void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color, bool DrawPinText ) { bool dummy = FALSE; @@ -1408,7 +1408,7 @@ EDA_Rect SCH_COMPONENT::GetBoundingBox() const } -void SCH_COMPONENT::DisplayInfo( WinEDA_DrawFrame* frame ) +void SCH_COMPONENT::DisplayInfo( EDA_DRAW_FRAME* frame ) { // search for the component in lib // Entry and root_component can differ if Entry is an alias diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h index cb02f1bcaf..87fee6dc15 100644 --- a/eeschema/sch_component.h +++ b/eeschema/sch_component.h @@ -163,7 +163,7 @@ public: */ wxPoint GetScreenCoord( const wxPoint& aPoint ); - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function ClearAnnotation @@ -245,21 +245,21 @@ public: */ LIB_PIN* GetPin( const wxString& number ); - virtual void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color = -1 ) + virtual void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color = -1 ) { Draw( panel, DC, offset, draw_mode, Color, true ); } - void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color, - bool DrawPinText ); + void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color, + bool DrawPinText ); void SwapData( SCH_COMPONENT* copyitem ); diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 5f71360b11..0b65c3d790 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -82,7 +82,7 @@ int SCH_FIELD::GetPenSize() const } -void SCH_FIELD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, +void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) { int orient; diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h index 7699ae94fb..cc90482ae3 100644 --- a/eeschema/sch_field.h +++ b/eeschema/sch_field.h @@ -100,11 +100,11 @@ public: /** * Function Draw */ - void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aDrawMode, - int aColor = -1 ); + void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aDrawMode, + int aColor = -1 ); /** * Function Save diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp index 7b77f573bc..ce7d438a5b 100644 --- a/eeschema/sch_junction.cpp +++ b/eeschema/sch_junction.cpp @@ -100,7 +100,7 @@ EDA_Rect SCH_JUNCTION::GetBoundingBox() const } -void SCH_JUNCTION::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void SCH_JUNCTION::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { int color; diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h index 6c743f0059..b05e9f0aaa 100644 --- a/eeschema/sch_junction.h +++ b/eeschema/sch_junction.h @@ -40,7 +40,7 @@ public: SCH_JUNCTION* GenCopy(); - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor = -1 ); /** diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index c273eba7d8..1f5bade626 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -188,7 +188,7 @@ int SCH_LINE::GetPenSize() const } -void SCH_LINE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, +void SCH_LINE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) { int color; @@ -416,14 +416,20 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi if( !( aFilter & ( DRAW_ITEM_T | WIRE_T | BUS_T ) ) ) return false; - if( ( ( aFilter & DRAW_ITEM_T ) && ( m_Layer == LAYER_NOTES ) ) - || ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) ) - || ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) ) + if( ( ( aFilter & DRAW_ITEM_T ) && ( m_Layer == LAYER_NOTES ) ) + || ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) ) + || ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) ) { - if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS && IsEndPoint( aPoint ) ) - || ( aFilter & WIRE_BUS_ENDPOINTS_ONLY && !IsEndPoint( aPoint ) ) - || ( TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) ) ) - return true; + if( !TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) ) + return false; + + if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS ) && IsEndPoint( aPoint ) ) + return false; + + if( ( aFilter & WIRE_BUS_ENDPOINTS_ONLY ) && !IsEndPoint( aPoint ) ) + return false; + + return true; } return false; diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h index 2f54c8adf8..aebfe90836 100644 --- a/eeschema/sch_line.h +++ b/eeschema/sch_line.h @@ -54,7 +54,7 @@ public: */ EDA_Rect GetBoundingBox() const; - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor = -1 ); /** diff --git a/eeschema/sch_marker.cpp b/eeschema/sch_marker.cpp index c2b8e47e7f..64aca43d30 100644 --- a/eeschema/sch_marker.cpp +++ b/eeschema/sch_marker.cpp @@ -92,7 +92,7 @@ bool SCH_MARKER::Save( FILE* aFile ) const } -void SCH_MARKER::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, +void SCH_MARKER::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { EDA_Colors color = (EDA_Colors) m_Color; @@ -147,7 +147,7 @@ EDA_Rect SCH_MARKER::GetBoundingBox() const } -void SCH_MARKER::DisplayInfo( WinEDA_DrawFrame* aFrame ) +void SCH_MARKER::DisplayInfo( EDA_DRAW_FRAME* aFrame ) { if( aFrame == NULL ) return; diff --git a/eeschema/sch_marker.h b/eeschema/sch_marker.h index b6bd2f246c..21ebe94e6f 100644 --- a/eeschema/sch_marker.h +++ b/eeschema/sch_marker.h @@ -38,7 +38,7 @@ public: return wxT( "SCH_MARKER" ); } - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDraw_mode, int aColor = -1 ); /** @@ -93,7 +93,7 @@ public: * * @param aFrame - Top window that owns the message panel. */ - void DisplayInfo( WinEDA_DrawFrame* aFrame ); + void DisplayInfo( EDA_DRAW_FRAME* aFrame ); virtual bool IsSelectStateChanged( const wxRect& aRect ); diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp index a0801eef9e..33fa0c2f70 100644 --- a/eeschema/sch_no_connect.cpp +++ b/eeschema/sch_no_connect.cpp @@ -90,7 +90,7 @@ int SCH_NO_CONNECT::GetPenSize() const } -void SCH_NO_CONNECT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void SCH_NO_CONNECT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { int pX, pY, color; diff --git a/eeschema/sch_no_connect.h b/eeschema/sch_no_connect.h index 4880ae9ca5..6d322ebde9 100644 --- a/eeschema/sch_no_connect.h +++ b/eeschema/sch_no_connect.h @@ -34,7 +34,7 @@ public: */ virtual int GetPenSize() const; - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor = -1 ); /** diff --git a/eeschema/sch_polyline.cpp b/eeschema/sch_polyline.cpp index dde120a4dc..88ccbfa1c6 100644 --- a/eeschema/sch_polyline.cpp +++ b/eeschema/sch_polyline.cpp @@ -139,7 +139,7 @@ int SCH_POLYLINE::GetPenSize() const } -void SCH_POLYLINE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, +void SCH_POLYLINE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { int color; diff --git a/eeschema/sch_polyline.h b/eeschema/sch_polyline.h index f9d526d92c..013ad9a591 100644 --- a/eeschema/sch_polyline.h +++ b/eeschema/sch_polyline.h @@ -28,7 +28,7 @@ public: return wxT( "SCH_POLYLINE" ); } - virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, + virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor = -1 ); /** diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 8716a78b6c..69209e1ec9 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -91,9 +91,6 @@ SCH_SCREEN::~SCH_SCREEN() void SCH_SCREEN::IncRefCount() { m_refCount++; - - wxLogDebug( wxT("Screen %s reference count after increment is %d." ), - GetChars( GetFileName() ), m_refCount ); } @@ -102,9 +99,6 @@ void SCH_SCREEN::DecRefCount() wxCHECK_RET( m_refCount != 0, wxT( "Screen reference count already zero. Bad programmer!" ) ); m_refCount--; - - wxLogDebug( wxT("Screen %s reference count after decrement is %d." ), - GetChars( GetFileName() ), m_refCount ); } @@ -220,8 +214,10 @@ SCH_ITEM* SCH_SCREEN::ExtractWires( bool CreateCopy ) * - Includes segments or buses aligned in only 1 segment * - Detects identical objects superimposed */ -bool SCH_SCREEN::SchematicCleanUp( wxDC* DC ) +bool SCH_SCREEN::SchematicCleanUp( EDA_DRAW_PANEL* aCanvas, wxDC* aDC ) { + wxASSERT( aCanvas != NULL ); + SCH_ITEM* DrawList, * TstDrawList; bool Modify = FALSE; @@ -262,9 +258,7 @@ bool SCH_SCREEN::SchematicCleanUp( wxDC* DC ) } } - SCH_EDIT_FRAME* frame; - frame = (SCH_EDIT_FRAME*) wxGetApp().GetTopWindow(); - frame->TestDanglingEnds( GetDrawItems(), DC ); + TestDanglingEnds( aCanvas, aDC ); return Modify; } @@ -328,7 +322,7 @@ bool SCH_SCREEN::Save( FILE* aFile ) const } -void SCH_SCREEN::Draw( WinEDA_DrawPanel* aCanvas, wxDC* aDC, int aDrawMode, int aColor ) +void SCH_SCREEN::Draw( EDA_DRAW_PANEL* aCanvas, wxDC* aDC, int aDrawMode, int aColor ) { for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() ) { @@ -608,7 +602,8 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position ) picker.m_PickedItem = item; picker.m_PickedItemType = item->Type(); - if( !item->IsConnectable() || !item->IsConnected( position ) || (item->m_Flags & SKIP_STRUCT) ) + if( !item->IsConnectable() || !item->IsConnected( position ) + || (item->m_Flags & SKIP_STRUCT) ) continue; if( item->IsSelected() && item->Type() != SCH_LINE_T ) @@ -664,6 +659,88 @@ int SCH_SCREEN::UpdatePickList() } +bool SCH_SCREEN::TestDanglingEnds( EDA_DRAW_PANEL* aCanvas, wxDC* aDC ) +{ + SCH_ITEM* item; + std::vector< DANGLING_END_ITEM > endPoints; + bool hasDanglingEnds = false; + + for( item = GetDrawItems(); item != NULL; item = item->Next() ) + item->GetEndPoints( endPoints ); + + for( item = GetDrawItems(); item; item = item->Next() ) + { + if( item->IsDanglingStateChanged( endPoints ) && ( aCanvas != NULL ) && ( aDC != NULL ) ) + { + item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), g_XorMode ); + item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); + + if( item->IsDangling() ) + hasDanglingEnds = true; + } + } + + return hasDanglingEnds; +} + + +bool SCH_SCREEN::BreakSegment( const wxPoint& aPoint ) +{ + SCH_LINE* segment; + SCH_LINE* newSegment; + bool brokenSegments = false; + SCH_FILTER_T filter = ( SCH_FILTER_T ) ( WIRE_T | BUS_T | EXCLUDE_ENDPOINTS_T ); + + for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() ) + { + if( item->Type() != SCH_LINE_T ) + continue; + + segment = (SCH_LINE*) item; + + if( !segment->HitTest( aPoint, 0, filter ) ) + continue; + + // Break the segment at aPoint and create a new segment. + newSegment = new SCH_LINE( *segment ); + newSegment->m_Start = aPoint; + segment->m_End = newSegment->m_Start; + newSegment->SetNext( segment->Next() ); + segment->SetNext( newSegment ); + item = newSegment; + brokenSegments = true; + } + + return brokenSegments; +} + + +bool SCH_SCREEN::BreakSegmentsOnJunctions() +{ + bool brokenSegments = false; + + for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() ) + { + if( item->Type() == SCH_JUNCTION_T ) + { + SCH_JUNCTION* junction = ( SCH_JUNCTION* ) item; + + if( BreakSegment( junction->m_Pos ) ) + brokenSegments = true; + } + else if( item->Type() == SCH_BUS_ENTRY_T ) + { + SCH_BUS_ENTRY* busEntry = ( SCH_BUS_ENTRY* ) item; + + if( BreakSegment( busEntry->m_Pos ) || BreakSegment( busEntry->m_End() ) ) + brokenSegments = true; + } + } + + return brokenSegments; +} + + /******************************************************************/ /* Class SCH_SCREENS to handle the list of screens in a hierarchy */ /******************************************************************/ @@ -783,7 +860,7 @@ void SCH_SCREENS::SchematicCleanUp() { // if wire list has changed, delete the undo/redo list to avoid // pointer problems with deleted data. - if( m_screens[i]->SchematicCleanUp( NULL ) ) + if( m_screens[i]->SchematicCleanUp() ) m_screens[i]->ClearUndoRedoList(); } } diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 11d24bb2ed..95a303021f 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -536,7 +536,7 @@ wxPoint SCH_SHEET::GetFileNamePosition() } -void SCH_SHEET::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, +void SCH_SHEET::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { int txtcolor; @@ -783,7 +783,7 @@ wxString SCH_SHEET::GetFileName( void ) } -void SCH_SHEET::DisplayInfo( WinEDA_DrawFrame* frame ) +void SCH_SHEET::DisplayInfo( EDA_DRAW_FRAME* frame ) { frame->ClearMsgPanel(); frame->AppendMsgPanel( _( "Sheet name" ), m_SheetName, CYAN ); diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index 4edc91eb90..e0302de5ab 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -65,11 +65,11 @@ public: bool operator ==( const SCH_SHEET_PIN* aPin ) const; - virtual void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aDraw_mode, - int aColor = -1 ); + virtual void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aDraw_mode, + int aColor = -1 ); /** * Function CreateGraphicShape (virual) @@ -273,7 +273,7 @@ public: void Place( SCH_EDIT_FRAME* frame, wxDC* DC ); - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /* there is no member for orientation in sch_sheet, to preserve file * format, we detect orientation based on pin edges @@ -356,11 +356,11 @@ public: * @param aColor = color used to draw sheet. Usually -1 to use the normal * color for sheet items */ - void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aDrawMode, - int aColor = -1 ); + void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aDrawMode, + int aColor = -1 ); /** * Function GetBoundingBox diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp index fb856b8e4b..bf130e4f43 100644 --- a/eeschema/sch_sheet_pin.cpp +++ b/eeschema/sch_sheet_pin.cpp @@ -66,11 +66,11 @@ EDA_ITEM* SCH_SHEET_PIN::doClone() const } -void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aDraw_mode, - int aColor ) +void SCH_SHEET_PIN::Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aDraw_mode, + int aColor ) { // The icon selection is handle by the virtual method CreateGraphicShape // called by ::Draw diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 83201c7016..778ca48493 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -361,7 +361,7 @@ int SCH_TEXT::GetPenSize() const } -void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset, +void SCH_TEXT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& aOffset, int DrawMode, int Color ) { EDA_Colors color; @@ -791,7 +791,7 @@ bool SCH_LABEL::Load( LINE_READER& aLine, wxString& aErrorMsg ) } -void SCH_LABEL::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, +void SCH_LABEL::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) { SCH_TEXT::Draw( panel, DC, offset, DrawMode, Color ); @@ -1098,11 +1098,11 @@ void SCH_GLOBALLABEL::SetSchematicTextOrientation( int aSchematicOrientation ) } -void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& aOffset, - int DrawMode, - int Color ) +void SCH_GLOBALLABEL::Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& aOffset, + int DrawMode, + int Color ) { static std::vector Poly; EDA_Colors color; @@ -1425,11 +1425,11 @@ void SCH_HIERLABEL::SetSchematicTextOrientation( int aSchematicOrientation ) } -void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int DrawMode, - int Color ) +void SCH_HIERLABEL::Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int DrawMode, + int Color ) { static std::vector Poly; EDA_Colors color; diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h index 9f5613cf2c..f4e371fe7a 100644 --- a/eeschema/sch_text.h +++ b/eeschema/sch_text.h @@ -101,11 +101,11 @@ public: SCH_TEXT* GenCopy(); - virtual void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color = -1 ); + virtual void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color = -1 ); /** * Function CreateGraphicShape @@ -220,11 +220,11 @@ public: ~SCH_LABEL() { } - virtual void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color = -1 ); + virtual void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color = -1 ); virtual wxString GetClass() const { @@ -305,11 +305,11 @@ public: ~SCH_GLOBALLABEL() { } - virtual void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color = -1 ); + virtual void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color = -1 ); virtual wxString GetClass() const { @@ -406,11 +406,11 @@ public: ~SCH_HIERLABEL() { } - virtual void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - const wxPoint& offset, - int draw_mode, - int Color = -1 ); + virtual void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + const wxPoint& offset, + int draw_mode, + int Color = -1 ); virtual wxString GetClass() const { diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 555ba68c09..998d440213 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -317,7 +317,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION ? TRUE : FALSE ); screen->SetCurItem( NULL ); m_itemToRepeat = NULL; - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); DrawPanel->Refresh(); break; @@ -325,12 +325,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { DrawPanel->MouseToCursorSchema(); SCH_ITEM* oldWiresList = screen->ExtractWires( true ); - BreakSegment( screen, screen->m_Curseur ); + screen->BreakSegment( screen->m_Curseur ); if( oldWiresList ) SaveCopyInUndoList( oldWiresList, UR_WIRE_IMAGE ); - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); } break; @@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) DeleteStruct( DrawPanel, &dc, item ); screen->SetCurItem( NULL ); m_itemToRepeat = NULL; - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); SetSheetNumberAndCount(); OnModify(); } @@ -371,7 +371,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_RESIZE_SHEET: DrawPanel->MouseToCursorSchema(); ReSizeSheet( (SCH_SHEET*) screen->GetCurItem(), &dc ); - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); break; case ID_POPUP_SCH_EDIT_SHEET: @@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_ADD_JUNCTION: DrawPanel->MouseToCursorSchema(); screen->SetCurItem( CreateNewJunctionStruct( &dc, screen->m_Curseur, true ) ); - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); screen->SetCurItem( NULL ); break; @@ -728,7 +728,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( screen->GetCurItem() ) { ( (SCH_ITEM*) screen->GetCurItem() )->Place( this, &dc ); - TestDanglingEnds( screen->GetDrawItems(), &dc ); + screen->TestDanglingEnds( DrawPanel, &dc ); screen->SetCurItem( NULL ); } break; diff --git a/eeschema/schematic_undo_redo.cpp b/eeschema/schematic_undo_redo.cpp index ab06469472..954c0a8d9f 100644 --- a/eeschema/schematic_undo_redo.cpp +++ b/eeschema/schematic_undo_redo.cpp @@ -429,7 +429,7 @@ void SCH_EDIT_FRAME::GetSchematicFromUndoList( wxCommandEvent& event ) ReCreateHToolbar(); SetToolbars(); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh(); } @@ -455,6 +455,6 @@ void SCH_EDIT_FRAME::GetSchematicFromRedoList( wxCommandEvent& event ) ReCreateHToolbar(); SetToolbars(); - TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); + GetScreen()->TestDanglingEnds(); DrawPanel->Refresh(); } diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 70c29629fa..2818baddb4 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -38,9 +38,9 @@ #include "dialogs/dialog_SVG_print.h" -BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, WinEDA_DrawFrame ) - EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, WinEDA_DrawFrame::OnSockRequestServer ) - EVT_SOCKET( ID_EDA_SOCKET_EVENT, WinEDA_DrawFrame::OnSockRequest ) +BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) + EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, EDA_DRAW_FRAME::OnSockRequestServer ) + EVT_SOCKET( ID_EDA_SOCKET_EVENT, EDA_DRAW_FRAME::OnSockRequest ) EVT_CLOSE( SCH_EDIT_FRAME::OnCloseWindow ) EVT_SIZE( SCH_EDIT_FRAME::OnSize ) @@ -62,8 +62,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, WinEDA_DrawFrame ) EVT_MENU( ID_GEN_PLOT_HPGL, SCH_EDIT_FRAME::ToPlot_HPGL ) EVT_MENU( ID_GEN_PLOT_SVG, SCH_EDIT_FRAME::SVG_Print ) EVT_MENU( ID_GEN_PLOT_DXF, SCH_EDIT_FRAME::ToPlot_DXF ) - EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard ) - EVT_MENU( ID_GEN_COPY_BLOCK_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard ) + EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard ) + EVT_MENU( ID_GEN_COPY_BLOCK_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard ) EVT_MENU( wxID_EXIT, SCH_EDIT_FRAME::OnExit ) EVT_MENU( ID_POPUP_SCH_COPY_ITEM, SCH_EDIT_FRAME::OnCopySchematicItemRequest ) @@ -88,7 +88,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, WinEDA_DrawFrame ) EVT_TOOL( ID_TO_PCB, SCH_EDIT_FRAME::OnOpenPcbnew ) EVT_TOOL( ID_TO_CVPCB, SCH_EDIT_FRAME::OnOpenCvpcb ) - EVT_TOOL( ID_SHEET_SET, WinEDA_DrawFrame::Process_PageSettings ) + EVT_TOOL( ID_SHEET_SET, EDA_DRAW_FRAME::Process_PageSettings ) EVT_TOOL( ID_HIERARCHY, SCH_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_CUT, SCH_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_COPY, SCH_EDIT_FRAME::Process_Special_Functions ) @@ -104,8 +104,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, WinEDA_DrawFrame ) EVT_TOOL( ID_BACKANNO_ITEMS, SCH_EDIT_FRAME::OnLoadStuffFile ) EVT_TOOL( ID_COMPONENT_BUTT, SCH_EDIT_FRAME::Process_Special_Functions ) - EVT_MENU( ID_GENERAL_HELP, WinEDA_DrawFrame::GetKicadHelp ) - EVT_MENU( ID_KICAD_ABOUT, WinEDA_DrawFrame::GetKicadAbout ) + EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) + EVT_MENU( ID_KICAD_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) // Tools and buttons for vertical toolbar. EVT_TOOL( ID_NO_SELECT_BUTT, SCH_EDIT_FRAME::Process_Special_Functions ) @@ -150,7 +150,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* father, const wxPoint& pos, const wxSize& size, long style ) : - WinEDA_DrawFrame( father, SCHEMATIC_FRAME, title, pos, size, style ) + EDA_DRAW_FRAME( father, SCHEMATIC_FRAME, title, pos, size, style ) { m_FrameName = wxT( "SchematicFrame" ); m_Draw_Axis = FALSE; // TRUE to show axis @@ -750,10 +750,10 @@ void SCH_EDIT_FRAME::OnExit( wxCommandEvent& event ) */ void SCH_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) { - WinEDA_BasicFrame::SetLanguage( event ); + EDA_BASE_FRAME::SetLanguage( event ); if( m_LibeditFrame ) - m_LibeditFrame->WinEDA_BasicFrame::SetLanguage( event ); + m_LibeditFrame->EDA_BASE_FRAME::SetLanguage( event ); } diff --git a/eeschema/selpart.cpp b/eeschema/selpart.cpp index 66154ab498..2928ce5686 100644 --- a/eeschema/selpart.cpp +++ b/eeschema/selpart.cpp @@ -14,7 +14,7 @@ #include "dialog_helpers.h" -CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ) +CMP_LIBRARY* SelectLibraryFromList( EDA_DRAW_FRAME* frame ) { static wxString OldLibName; wxString msg; @@ -51,7 +51,7 @@ CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ) } -int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, +int DisplayComponentsNamesInLib( EDA_DRAW_FRAME* frame, CMP_LIBRARY* Library, wxString& Buffer, wxString& OldName ) { @@ -76,8 +76,7 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, } -int GetNameOfPartToLoad( WinEDA_DrawFrame* frame, CMP_LIBRARY* Library, - wxString& BufName ) +int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame, CMP_LIBRARY* Library, wxString& BufName ) { int ii; static wxString OldCmpName; diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index b7fe5dabca..266bfe9428 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -221,7 +221,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) /* Move selected sheet with the cursor. * Callback function use by ManageCurseur. */ -static void MoveOrResizeSheet( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase ) +static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, bool aErase ) { wxPoint moveVector; BASE_SCREEN* screen = aPanel->GetScreen(); @@ -247,7 +247,7 @@ static void MoveOrResizeSheet( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase /* Complete sheet move. */ -static void ExitSheet( WinEDA_DrawPanel* aPanel, wxDC* aDC ) +static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); SCH_SHEET* sheet = (SCH_SHEET*) screen->GetCurItem(); diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp index 4e9f00c012..616d0b8cfe 100644 --- a/eeschema/sheetlab.cpp +++ b/eeschema/sheetlab.cpp @@ -19,8 +19,8 @@ #include "dialogs/dialog_sch_edit_sheet_pin.h" -static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void ExitPinSheet( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Move_PinSheet( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); static int s_CurrentTypeLabel = NET_INPUT; @@ -32,7 +32,7 @@ static int s_InitialEdge; /* Called when aborting a move pinsheet label * delete a new pin sheet label, or restire its old position */ -static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void ExitPinSheet( EDA_DRAW_PANEL* Panel, wxDC* DC ) { SCH_SHEET_PIN* SheetLabel = (SCH_SHEET_PIN*) Panel->GetScreen()->GetCurItem(); @@ -107,7 +107,7 @@ void SCH_EDIT_FRAME::StartMove_PinSheet( SCH_SHEET_PIN* SheetLabel, wxDC* DC ) } -static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Move_PinSheet( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { SCH_SHEET_PIN* SheetLabel = (SCH_SHEET_PIN*) panel->GetScreen()->GetCurItem(); diff --git a/eeschema/symbdraw.cpp b/eeschema/symbdraw.cpp index f34f97c5ae..880e5481f3 100644 --- a/eeschema/symbdraw.cpp +++ b/eeschema/symbdraw.cpp @@ -23,8 +23,8 @@ #include "dialogs/dialog_lib_edit_draw_item.h" -static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void SymbolDisplayDraw( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* @@ -97,7 +97,7 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_DRAW_ITEM* DrawItem ) } -static void AbortSymbolTraceOn( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC ) { LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) Panel->GetParent(); LIB_DRAW_ITEM* item = parent->GetDrawItem(); @@ -230,7 +230,7 @@ void LIB_EDIT_FRAME::GraphicItemBeginDraw( wxDC* DC ) /* * Redraw the graphic shape while moving */ -static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { LIB_DRAW_ITEM* item; @@ -286,7 +286,7 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC ) //! @brief Manage mouse events when creating new graphic object or modifying an graphic object. -static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void SymbolDisplayDraw( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BASE_SCREEN* Screen = panel->GetScreen(); LIB_DRAW_ITEM* item = ( (LIB_EDIT_FRAME*) panel->GetParent() )->GetDrawItem(); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 4c0fc4ca84..0a8a537a99 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -35,7 +35,7 @@ wxString LIB_VIEW_FRAME::m_exportToEeschemaCmpName; /*****************************/ /* class WinEDA_ViewlibFrame */ /*****************************/ -BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, WinEDA_DrawFrame ) +BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) /* Window events */ EVT_CLOSE( LIB_VIEW_FRAME::OnCloseWindow ) EVT_SIZE( LIB_VIEW_FRAME::OnSize ) @@ -84,8 +84,7 @@ static wxAcceleratorEntry accels[] = LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaphore* semaphore ) : - WinEDA_DrawFrame( father, VIEWER_FRAME, _( "Library browser" ), - wxDefaultPosition, wxDefaultSize ) + EDA_DRAW_FRAME( father, VIEWER_FRAME, _( "Library browser" ), wxDefaultPosition, wxDefaultSize ) { wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); @@ -515,7 +514,7 @@ void LIB_VIEW_FRAME::LoadSettings( ) { wxConfig* cfg ; - WinEDA_DrawFrame::LoadSettings(); + EDA_DRAW_FRAME::LoadSettings(); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); cfg = wxGetApp().m_EDA_Config; @@ -545,7 +544,7 @@ void LIB_VIEW_FRAME::SaveSettings() { wxConfig* cfg; - WinEDA_DrawFrame::SaveSettings(); + EDA_DRAW_FRAME::SaveSettings(); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); cfg = wxGetApp().m_EDA_Config; @@ -561,7 +560,7 @@ void LIB_VIEW_FRAME::SaveSettings() */ void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event ) { - WinEDA_DrawFrame::OnActivate( event ); + EDA_DRAW_FRAME::OnActivate( event ); // Ensure we do not have old selection: if( m_FrameIsActive ) diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 282013bb0c..e39fb57624 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -18,7 +18,7 @@ class CMP_LIBRARY; /** * Component library viewer main window. */ -class LIB_VIEW_FRAME : public WinEDA_DrawFrame +class LIB_VIEW_FRAME : public EDA_DRAW_FRAME { private: WinEDAChoiceBox* SelpartBox; diff --git a/gerbview/block.cpp b/gerbview/block.cpp index fda2b5898c..b53715351a 100644 --- a/gerbview/block.cpp +++ b/gerbview/block.cpp @@ -41,9 +41,7 @@ #define BLOCK_COLOR BROWN -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to * the key (ALT, SHIFT ALT ..) @@ -230,9 +228,7 @@ bool WinEDA_GerberFrame::HandleBlockEnd( wxDC* DC ) /* Traces the outline of the block structures of a repositioning move */ -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ) +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { int Color; BASE_SCREEN* screen = panel->GetScreen(); diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp index 0274c701cd..b603e0c510 100644 --- a/gerbview/class_gerber_draw_item.cpp +++ b/gerbview/class_gerber_draw_item.cpp @@ -340,7 +340,7 @@ bool GERBER_DRAW_ITEM::HasNegativeItems() /*********************************************************************/ -void GERBER_DRAW_ITEM::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, +void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) /*********************************************************************/ { @@ -581,9 +581,9 @@ void GERBER_DRAW_ITEM::DrawGbrPoly( EDA_Rect* aClipBox, * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about this GERBER item - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ -void GERBER_DRAW_ITEM::DisplayInfo( WinEDA_DrawFrame* frame ) +void GERBER_DRAW_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString msg; diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 2015f6851e..d5121ab1c3 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -199,10 +199,10 @@ public: EDA_Rect GetBoundingBox() const; /* Display on screen: */ - void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - const wxPoint& aOffset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + int aDrawMode, + const wxPoint& aOffset = ZeroOffset ); /** * Function ConvertSegmentToPolygon @@ -229,9 +229,9 @@ public: * about this object into the frame's message panel. * Is virtual from EDA_ITEM. * Display info about this GERBER item - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); wxString ShowGBRShape(); diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index ad54d90f01..415ddc9510 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -125,7 +125,7 @@ void WinEDA_GerberFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /* * Redraw All gerbview layers, using a buffered mode or not */ -void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) +void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) { // Because Images can be negative (i.e with background filled in color) items are drawn // graphic layer per graphic layer, after the background is filled diff --git a/gerbview/gerberframe.cpp b/gerbview/gerberframe.cpp index d10d7a0079..09bc1bb5f4 100644 --- a/gerbview/gerberframe.cpp +++ b/gerbview/gerberframe.cpp @@ -63,7 +63,7 @@ EVT_MENU( ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG, EVT_MENU( ID_GERBVIEW_OPTIONS_SETUP, WinEDA_GerberFrame::InstallGerberOptionsDialog ) EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, - WinEDA_DrawFrame::SetLanguage ) + EDA_DRAW_FRAME::SetLanguage ) // menu Postprocess EVT_MENU( ID_GERBVIEW_SHOW_LIST_DCODES, @@ -79,8 +79,8 @@ EVT_MENU( ID_GERBVIEW_GLOBAL_DELETE, WinEDA_GerberFrame::Process_Special_Functions ) // Menu Help -EVT_MENU( ID_GENERAL_HELP, WinEDA_DrawFrame::GetKicadHelp ) -EVT_MENU( ID_KICAD_ABOUT, WinEDA_DrawFrame::GetKicadAbout ) +EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) +EVT_MENU( ID_KICAD_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) EVT_TOOL( wxID_CUT, WinEDA_GerberFrame::Process_Special_Functions ) EVT_TOOL( wxID_COPY, WinEDA_GerberFrame::Process_Special_Functions ) @@ -452,7 +452,7 @@ void WinEDA_GerberFrame::syncLayerBox() */ void WinEDA_GerberFrame::SetLanguage( wxCommandEvent& event ) { - WinEDA_DrawFrame::SetLanguage( event ); + EDA_DRAW_FRAME::SetLanguage( event ); m_LayersManager->SetLayersManagerTabsText(); wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_LayersManager ); pane_info.Caption( _( "Visibles" ) ); diff --git a/include/base_struct.h b/include/base_struct.h index 47f690992b..d567e9f4ce 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -106,10 +106,10 @@ enum SEARCH_RESULT { class EDA_ITEM; -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class BOARD; class EDA_Rect; -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; /** * Class INSPECTOR @@ -425,9 +425,9 @@ public: * Function DisplayInfo * has knowledge about the frame and how and where to put status * information about this object into the frame's message panel. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - virtual void DisplayInfo( WinEDA_DrawFrame* frame ) + virtual void DisplayInfo( EDA_DRAW_FRAME* frame ) { // derived classes may implement this } @@ -696,7 +696,7 @@ public: * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do * not draw anchor ). */ - void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, int aDrawMode, GRTraceMode aDisplay_mode = FILAIRE, EDA_Colors aAnchor_color = UNSPECIFIED_COLOR ); @@ -718,7 +718,7 @@ private: * @param aText = the single line of text to draw. * @param aPos = the position of this line ). */ - void DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC, + void DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, int aDrawMode, GRTraceMode aFillMode, EDA_Colors aAnchor_color, wxString& aText, diff --git a/include/block_commande.h b/include/block_commande.h index 8f4251ead3..61db0cad7e 100644 --- a/include/block_commande.h +++ b/include/block_commande.h @@ -81,15 +81,15 @@ public: * sets the initial values of a BLOCK_SELECTOR, before starting a block * command */ - void InitData( WinEDA_DrawPanel* Panel, const wxPoint& startpos ); + void InitData( EDA_DRAW_PANEL* Panel, const wxPoint& startpos ); /** * Function SetMessageBlock * Displays the type of block command in the status bar of the window */ - void SetMessageBlock( WinEDA_DrawFrame* frame ); + void SetMessageBlock( EDA_DRAW_FRAME* frame ); - void Draw( WinEDA_DrawPanel* aPanel, + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ); @@ -135,7 +135,7 @@ public: /* Cancel Current block operation. */ -void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ); +void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC ); /* Redraw the outlines of the block which shows the search area for block @@ -144,7 +144,7 @@ void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ); * by InitBlockLocateDatas(). * The other point of the rectangle is the mouse cursor */ -void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); #endif /* __INCLUDE__BLOCK_COMMANDE_H__ */ diff --git a/include/class_board_item.h b/include/class_board_item.h index 239ce2b7eb..8bfb5acb07 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -94,8 +94,8 @@ public: * Function Draw * BOARD_ITEMs have their own color information. */ - virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int aDrawMode, const wxPoint& offset = ZeroOffset ) = 0; + virtual void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, + int aDrawMode, const wxPoint& offset = ZeroOffset ) = 0; /** @@ -327,7 +327,7 @@ public: return dummy; } - void Draw( WinEDA_DrawPanel* DrawPanel, wxDC* DC, + void Draw( EDA_DRAW_PANEL* DrawPanel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ) { } diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index fbf7614edb..5235b3becb 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -1,6 +1,6 @@ /****************************** * drawpanel.h: - * define class WinEDA_DrawPanel + * define class EDA_DRAW_PANEL *************************************/ #ifndef PANEL_WXSTRUCT_H @@ -10,15 +10,15 @@ #include "base_struct.h" #include -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class BASE_SCREEN; class PCB_SCREEN; -class WinEDA_DrawPanel : public wxScrolledWindow +class EDA_DRAW_PANEL : public wxScrolledWindow { private: - WinEDA_DrawFrame* m_Parent; + EDA_DRAW_FRAME* m_Parent; public: EDA_Rect m_ClipBox; // the clipbox used in screen @@ -71,20 +71,19 @@ public: /* Cursor management (used in editing functions) */ /* Mouse capture move callback function prototype. */ - void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); + void (*ManageCurseur)( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* Abort managed cursor callback function prototype. */ - void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC ); + void (*ForceCloseManageCurseur)( EDA_DRAW_PANEL* panel, wxDC* DC ); public: - WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, - const wxSize& size ); - ~WinEDA_DrawPanel(); + EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ); + ~EDA_DRAW_PANEL(); BASE_SCREEN* GetScreen(); - WinEDA_DrawFrame* GetParent() + EDA_DRAW_FRAME* GetParent() { return m_Parent; } diff --git a/include/class_marker_base.h b/include/class_marker_base.h index b8686b4d57..920e15f2b6 100644 --- a/include/class_marker_base.h +++ b/include/class_marker_base.h @@ -65,7 +65,7 @@ public: * Function DrawMarker * draws the shape is the polygon defined in m_Corners (array of wxPoints). */ - void DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ); + void DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ); /** * Function GetPos @@ -173,7 +173,7 @@ public: * Function DisplayMarkerInfo * displays the full info of this marker, in a HTML window. */ - void DisplayMarkerInfo( WinEDA_DrawFrame* aFrame ); + void DisplayMarkerInfo( EDA_DRAW_FRAME* aFrame ); /** * Function HitTestMarker diff --git a/include/class_sch_screen.h b/include/class_sch_screen.h index 9015575abe..fabda364d6 100644 --- a/include/class_sch_screen.h +++ b/include/class_sch_screen.h @@ -107,7 +107,7 @@ public: * @param aDrawMode The drawing mode. * @param aColor The drawing color. */ - void Draw( WinEDA_DrawPanel* aCanvas, wxDC* aDC, int aDrawMode, int aColor = -1 ); + void Draw( EDA_DRAW_PANEL* aCanvas, wxDC* aDC, int aDrawMode, int aColor = -1 ); /** * Remove \a aItem from the schematic associated with this screen. @@ -120,7 +120,16 @@ public: void AddToDrawList( SCH_ITEM* st ); - bool SchematicCleanUp( wxDC* DC = NULL ); + bool SchematicCleanUp( EDA_DRAW_PANEL* aCanvas = NULL, wxDC* aDC = NULL ); + + /** + * Function TestDanglingEnds + * tests all of the connectible objects in the schematic for unused connection points. + * @param aDC - The device context to draw the dangling status indicators. + * @param aCanvas - The window to draw on. + * @return True if any dangling ends were found. + */ + bool TestDanglingEnds( EDA_DRAW_PANEL* aCanvas = NULL, wxDC* aDC = NULL ); /** * Function ExtractWires @@ -136,6 +145,23 @@ public: */ SCH_ITEM* ExtractWires( bool aCreateCopy ); + /** + * Function BreakSegment + * checks every wire and bus for a intersection at \a aPoint and break into two segments + * at \a aPoint if an intersection is found. + * @param aPoint Test this point for an intersection. + * @return True if any wires or buses were broken. + */ + bool BreakSegment( const wxPoint& aPoint ); + + /** + * Function BreakSegmentsOnJunctions + * tests all junctions and bus entries in the schematic for intersections with wires and + * buses and breaks any intersections into multiple segments. + * @return True if any wires or buses were broken. + */ + bool BreakSegmentsOnJunctions(); + /* full undo redo management : */ // use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem ) // use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem ) @@ -160,7 +186,7 @@ public: * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ - bool Save( FILE* aFile ) const; + bool Save( FILE* aFile ) const; /** * Clear the state flags of all the items in the screen. diff --git a/include/common.h b/include/common.h index 8e514bace8..d4cb0fc4d5 100644 --- a/include/common.h +++ b/include/common.h @@ -12,9 +12,9 @@ class wxAboutDialogInfo; class BASE_SCREEN; -class WinEDA_DrawFrame; +class EDA_DRAW_FRAME; class WinEDAListBox; -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; /* Flag for special keys */ #define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right @@ -286,11 +286,11 @@ void InitKiCadAbout( wxAboutDialogInfo& info ); * If "by posting on this line * Color = color display */ -void Affiche_1_Parametre( WinEDA_DrawFrame* frame, - int pos_X, - const wxString& texte_H, - const wxString& texte_L, - int color ); +void Affiche_1_Parametre( EDA_DRAW_FRAME* frame, + int pos_X, + const wxString& texte_H, + const wxString& texte_L, + int color ); int GetTimeStamp(); diff --git a/include/dialog_get_component.h b/include/dialog_get_component.h index 1e4f67a651..8b085f8aab 100644 --- a/include/dialog_get_component.h +++ b/include/dialog_get_component.h @@ -25,9 +25,9 @@ public: public: // Constructor and destructor - DIALOG_GET_COMPONENT( WinEDA_DrawFrame* parent, const wxPoint& framepos, - wxArrayString& HistoryList, const wxString& Title, - bool show_extra_tool ); + DIALOG_GET_COMPONENT( EDA_DRAW_FRAME* parent, const wxPoint& framepos, + wxArrayString& HistoryList, const wxString& Title, + bool show_extra_tool ); ~DIALOG_GET_COMPONENT() {}; wxString GetComponentName( void ); diff --git a/include/dialog_helpers.h b/include/dialog_helpers.h index c8a0b54e65..66f66dd1a9 100644 --- a/include/dialog_helpers.h +++ b/include/dialog_helpers.h @@ -31,7 +31,7 @@ public: * @param aCallBackFunction callback function to display comments * @param aPos = position of the dialog. */ - WinEDAListBox( WinEDA_DrawFrame* aParent, const wxString& aTitle, + WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle, const wxArrayString& aItemList, const wxString& aRefText, void(* aCallBackFunction)(wxString& Text) = NULL, wxPoint aPos = wxDefaultPosition ); diff --git a/include/dialog_hotkeys_editor.h b/include/dialog_hotkeys_editor.h index 950257c0d4..7c9bf90f29 100644 --- a/include/dialog_hotkeys_editor.h +++ b/include/dialog_hotkeys_editor.h @@ -24,15 +24,14 @@ class HOTKEYS_EDITOR_DIALOG : public HOTKEYS_EDITOR_DIALOG_BASE { protected: - WinEDA_DrawFrame* m_parent; + EDA_DRAW_FRAME* m_parent; struct Ki_HotkeyInfoSectionDescriptor* m_hotkeys; HotkeyGridTable* m_table; int m_curEditingRow; public: - HOTKEYS_EDITOR_DIALOG( WinEDA_DrawFrame* parent, - Ki_HotkeyInfoSectionDescriptor* hotkeys ); + HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent, Ki_HotkeyInfoSectionDescriptor* hotkeys ); ~HOTKEYS_EDITOR_DIALOG() {}; @@ -46,7 +45,6 @@ private: void SetHotkeyCellState( int aRow, bool aHightlight ); }; -void InstallHotkeyFrame( WinEDA_DrawFrame* parent, - Ki_HotkeyInfoSectionDescriptor* hotkeys ); +void InstallHotkeyFrame( EDA_DRAW_FRAME* parent, Ki_HotkeyInfoSectionDescriptor* hotkeys ); #endif diff --git a/include/drawtxt.h b/include/drawtxt.h index 0337d95841..6ebadf6034 100644 --- a/include/drawtxt.h +++ b/include/drawtxt.h @@ -9,7 +9,7 @@ #include "base_struct.h" -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; class PLOTTER; /** @@ -68,7 +68,7 @@ int NegableTextLength( const wxString& aText ); * @param aPlotter = a pointer to a PLOTTER instance, when this function is used to plot * the text. NULL to draw this text. */ -void DrawGraphicText( WinEDA_DrawPanel * aPanel, +void DrawGraphicText( EDA_DRAW_PANEL * aPanel, wxDC * aDC, const wxPoint &aPos, enum EDA_Colors aColor, diff --git a/include/gr_basic.h b/include/gr_basic.h index 3a562bc159..085a4b35ed 100644 --- a/include/gr_basic.h +++ b/include/gr_basic.h @@ -48,7 +48,7 @@ typedef enum { int GRMapX( int x ); int GRMapY( int y ); -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; void GRSetDrawMode( wxDC* DC, int mode ); int GRGetDrawMode( wxDC* DC ); diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index cc9ac11e50..49cd3474b2 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -58,7 +58,7 @@ extern wxString g_ModuleEditSectionTag; /* Functions: */ void AddHotkeyConfigMenu( wxMenu* menu ); -void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame* frame, int id ); +void HandleHotkeyConfigMenuSelection( EDA_DRAW_FRAME* frame, int id ); /** * Function ReturnKeyNameFromKeyCode @@ -125,7 +125,7 @@ wxString AddHotkeyName( const wxString& aText, * @param aFrame = current active frame * @param aList = pointer to a Ki_HotkeyInfoSectionDescriptor list (Null terminated) */ -void DisplayHotkeyList( WinEDA_DrawFrame* aFrame, +void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, struct Ki_HotkeyInfoSectionDescriptor* aList ); /** diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index 4ee86c50e2..f2c3ef6215 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -135,11 +135,11 @@ public: /** * Function Draw */ - virtual void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - const wxPoint& aOffset, - int aDrawMode, - int aColor = -1 ) = 0; + virtual void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + const wxPoint& aOffset, + int aDrawMode, + int aColor = -1 ) = 0; /* Place function */ virtual void Place( SCH_EDIT_FRAME* aFrame, wxDC* aDC ); diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index d5ec0a22c7..71344e71f7 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -47,7 +47,7 @@ class GENERAL_COLLECTORS_GUIDE; /* class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview */ /******************************************************************/ -class WinEDA_BasePcbFrame : public WinEDA_DrawFrame +class WinEDA_BasePcbFrame : public EDA_DRAW_FRAME { public: @@ -110,7 +110,7 @@ public: PCB_SCREEN* GetScreen() const { - return (PCB_SCREEN*) WinEDA_DrawFrame::GetBaseScreen(); + return (PCB_SCREEN*) EDA_DRAW_FRAME::GetBaseScreen(); } BASE_SCREEN* GetBaseScreen() const; @@ -330,9 +330,10 @@ public: * @return wxEmptyString if abort or fails, or the selected module name if * Ok */ - wxString Select_1_Module_From_List( - WinEDA_DrawFrame* aWindow, const wxString& aLibraryFullFilename, - const wxString& aMask, const wxString& aKeyWord ); + wxString Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow, + const wxString& aLibraryFullFilename, + const wxString& aMask, + const wxString& aKeyWord ); MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); @@ -474,7 +475,7 @@ public: /** * Load applications settings common to PCB draw frame objects. * - * This overrides the base class WinEDA_DrawFrame::LoadSettings() to + * This overrides the base class EDA_DRAW_FRAME::LoadSettings() to * handle settings common to the PCB layout application and footprint * editor main windows. It calls down to the base class to load * settings common to all drawing frames. Please put your application @@ -486,7 +487,7 @@ public: /** * Save applications settings common to PCB draw frame objects. * - * This overrides the base class WinEDA_DrawFrame::SaveSettings() to + * This overrides the base class EDA_DRAW_FRAME::SaveSettings() to * save settings common to the PCB layout application and footprint * editor main windows. It calls down to the base class to save * settings common to all drawing frames. Please put your application diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 3634d16400..be270fd5de 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -55,7 +55,7 @@ enum fl_rot_cmp { /** * Schematic editor (EESchema) main window. */ -class SCH_EDIT_FRAME : public WinEDA_DrawFrame +class SCH_EDIT_FRAME : public EDA_DRAW_FRAME { public: WinEDAChoiceBox* m_SelPartBox; @@ -659,8 +659,6 @@ public: void SetRepeatItem( SCH_ITEM* aItem ) { m_itemToRepeat = aItem; } - void TestDanglingEnds( SCH_ITEM* DrawList, wxDC* DC ); - // ERC: /** diff --git a/include/wxstruct.h b/include/wxstruct.h index 5f731f6730..501519d382 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -35,7 +35,7 @@ class EDA_ITEM; class EDA_Rect; -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; class WinEDA_MsgPanel; class BASE_SCREEN; class WinEDA_Toolbar; @@ -85,7 +85,7 @@ enum id_toolbar { /* not directly used: the real frames are derived from this class */ /******************************************************************/ -class WinEDA_BasicFrame : public wxFrame +class EDA_BASE_FRAME : public wxFrame { public: int m_Ident; // Id Type (pcb, schematic, library..) @@ -102,11 +102,11 @@ public: wxAuiManager m_auimgr; public: - WinEDA_BasicFrame( wxWindow* father, int idtype, - const wxString& title, - const wxPoint& pos, const wxSize& size, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); - ~WinEDA_BasicFrame(); + EDA_BASE_FRAME( wxWindow* father, int idtype, + const wxString& title, + const wxPoint& pos, const wxSize& size, + long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + ~EDA_BASE_FRAME(); void GetKicadHelp( wxCommandEvent& event ); void GetKicadAbout( wxCommandEvent& event ); @@ -192,10 +192,10 @@ public: /* Basic draw frame for eeschema, pcbnew and gerbview. */ /*******************************************************/ -class WinEDA_DrawFrame : public WinEDA_BasicFrame +class EDA_DRAW_FRAME : public EDA_BASE_FRAME { public: - WinEDA_DrawPanel* DrawPanel; // Draw area + EDA_DRAW_PANEL* DrawPanel; // Draw area WinEDA_MsgPanel* MsgPanel; // Panel used to display some // info (bottom of the screen) WinEDA_Toolbar* m_VToolBar; // Vertical (right side) Toolbar @@ -251,12 +251,12 @@ protected: } public: - WinEDA_DrawFrame( wxWindow* father, int idtype, - const wxString& title, - const wxPoint& pos, const wxSize& size, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + EDA_DRAW_FRAME( wxWindow* father, int idtype, + const wxString& title, + const wxPoint& pos, const wxSize& size, + long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); - ~WinEDA_DrawFrame(); + ~EDA_DRAW_FRAME(); virtual wxString GetScreenDesc(); @@ -418,7 +418,7 @@ public: * Function OnActivate (virtual) * is called when activating the frame. * In derived classes with a overriding OnActivate function, - * do not forget to call this WinEDA_DrawFrame::OnActivate( event ) basic function. + * do not forget to call this EDA_DRAW_FRAME::OnActivate( event ) basic function. */ virtual void OnActivate( wxActivateEvent& event ); @@ -582,12 +582,11 @@ protected: wxSize computeTextSize( const wxString& text ); public: - WinEDA_DrawFrame* m_Parent; + EDA_DRAW_FRAME* m_Parent; int m_BgColor; public: - WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, - const wxSize& size ); + WinEDA_MsgPanel( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ); ~WinEDA_MsgPanel(); diff --git a/kicad/kicad.h b/kicad/kicad.h index b40bbffd87..f88777326d 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -57,7 +57,7 @@ enum id_kicad_frm { /* class WinEDA_MainFrame * This is the main kicad frame */ -class WinEDA_MainFrame : public WinEDA_BasicFrame +class WinEDA_MainFrame : public EDA_BASE_FRAME { public: TREE_PROJECT_FRAME* m_LeftWin; diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 8e0d216f5a..131561f651 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -25,7 +25,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ) : - WinEDA_BasicFrame( parent, KICAD_MAIN_FRAME, title, pos, size ) + EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME, title, pos, size ) { wxString msg; wxString line; @@ -267,7 +267,7 @@ void WinEDA_MainFrame::LoadSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::LoadSettings(); + EDA_BASE_FRAME::LoadSettings(); cfg->Read( TreeFrameWidthEntry, &m_LeftWin_Width ); } @@ -284,7 +284,7 @@ void WinEDA_MainFrame::SaveSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_BasicFrame::SaveSettings(); + EDA_BASE_FRAME::SaveSettings(); cfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x ); } diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index c925885d0e..b128252585 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -10,7 +10,7 @@ #include "bitmaps.h" /* Menubar and toolbar event table */ -BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame ) +BEGIN_EVENT_TABLE( WinEDA_MainFrame, EDA_BASE_FRAME ) /* Window events */ EVT_SIZE( WinEDA_MainFrame::OnSize ) EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow ) diff --git a/kicad/preferences.cpp b/kicad/preferences.cpp index f724657f50..68f1429dcb 100644 --- a/kicad/preferences.cpp +++ b/kicad/preferences.cpp @@ -98,5 +98,5 @@ void WinEDA_MainFrame::OnSelectPreferredEditor( wxCommandEvent& event ) void WinEDA_MainFrame::SetLanguage( wxCommandEvent& event ) { - WinEDA_BasicFrame::SetLanguage( event ); + EDA_BASE_FRAME::SetLanguage( event ); } diff --git a/pcbnew/autorout.cpp b/pcbnew/autorout.cpp index 84de662268..71b25dc0ec 100644 --- a/pcbnew/autorout.cpp +++ b/pcbnew/autorout.cpp @@ -199,7 +199,7 @@ void WinEDA_PcbFrame::Reset_Noroutable( wxDC* DC ) /* Function DEBUG: displays filling cells TOP and BOTTOM */ -void DisplayBoard( WinEDA_DrawPanel* panel, wxDC* DC ) +void DisplayBoard( EDA_DRAW_PANEL* panel, wxDC* DC ) { int row, col, i, j; int dcell0, dcell1 = 0, color; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 143e354ac9..b154ba10f6 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -36,7 +36,7 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) ); /* class WinEDA_BasePcbFrame */ /*******************************/ -BEGIN_EVENT_TABLE( WinEDA_BasePcbFrame, WinEDA_DrawFrame ) +BEGIN_EVENT_TABLE( WinEDA_BasePcbFrame, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, WinEDA_BasePcbFrame::ProcessItemSelection ) @@ -49,7 +49,7 @@ WinEDA_BasePcbFrame::WinEDA_BasePcbFrame( wxWindow* father, const wxPoint& pos, const wxSize& size, long style) : - WinEDA_DrawFrame( father, idtype, title, pos, size, style ) + EDA_DRAW_FRAME( father, idtype, title, pos, size, style ) { m_InternalUnits = PCB_INTERNAL_UNIT; // Internal unit = 1/10000 inch m_Pcb = NULL; @@ -291,7 +291,7 @@ void WinEDA_BasePcbFrame::SetToolID( int aId, int aCursor, const wxString& aTool { bool redraw = false; - WinEDA_DrawFrame::SetToolID( aId, aCursor, aToolMsg ); + EDA_DRAW_FRAME::SetToolID( aId, aCursor, aToolMsg ); if( aId < 0 ) return; @@ -316,7 +316,7 @@ void WinEDA_BasePcbFrame::SetToolID( int aId, int aCursor, const wxString& aTool */ void WinEDA_BasePcbFrame::UpdateStatusBar() { - WinEDA_DrawFrame::UpdateStatusBar(); + EDA_DRAW_FRAME::UpdateStatusBar(); if( DisplayOpt.DisplayPolarCood ) // display polar coordinates { @@ -382,7 +382,7 @@ void WinEDA_BasePcbFrame::LoadSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_DrawFrame::LoadSettings(); + EDA_DRAW_FRAME::LoadSettings(); // Ensure grid id is an existent grid id: if( (m_LastGridSizeId <= 0) || (m_LastGridSizeId > (ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000)) ) @@ -418,7 +418,7 @@ void WinEDA_BasePcbFrame::SaveSettings() wxConfig* cfg = wxGetApp().m_EDA_Config; - WinEDA_DrawFrame::SaveSettings(); + EDA_DRAW_FRAME::SaveSettings(); cfg->Write( m_FrameName + UserGridSizeXEntry, m_UserGridSize.x ); cfg->Write( m_FrameName + UserGridSizeYEntry, m_UserGridSize.y ); cfg->Write( m_FrameName + UserGridUnitsEntry, ( long )m_UserGridUnit ); diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 59e475e492..96c150332c 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -28,8 +28,7 @@ * @param aDC = Current device context * @param aOffset = Drawing offset **/ -static void drawPickedItems( WinEDA_DrawPanel* aPanel, wxDC* aDC, - wxPoint aOffset ); +static void drawPickedItems( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint aOffset ); /** * Function drawMovingBlock @@ -38,8 +37,7 @@ static void drawPickedItems( WinEDA_DrawPanel* aPanel, wxDC* aDC, * @param aDC = Current device context * @param aErase = Erase block at current position **/ -static void drawMovingBlock( WinEDA_DrawPanel* aPanel, wxDC* aDC, - bool aErase ); +static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, bool aErase ); static bool blockIncludeModules = true; @@ -528,8 +526,7 @@ void WinEDA_PcbFrame::Block_SelectItems() } -static void drawPickedItems( WinEDA_DrawPanel* aPanel, wxDC* aDC, - wxPoint aOffset ) +static void drawPickedItems( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint aOffset ) { PICKED_ITEMS_LIST* itemsList = &aPanel->GetScreen()->m_BlockLocate.m_ItemsSelection; WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) aPanel->GetParent(); @@ -569,8 +566,7 @@ static void drawPickedItems( WinEDA_DrawPanel* aPanel, wxDC* aDC, } -static void drawMovingBlock( WinEDA_DrawPanel* aPanel, wxDC* aDC, - bool aErase ) +static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index cf0c9b0d02..a14d33c78c 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -24,7 +24,7 @@ #define IS_SELECTED 1 -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); static int MarkItemsInBloc( MODULE* module, EDA_Rect& Rect ); static void ClearMarkItems( MODULE* module ); @@ -289,8 +289,7 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC ) /* Traces the outline of the search block structures * The entire block follows the cursor */ -static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, - bool erase ) +static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BLOCK_SELECTOR* PtBlock; BASE_SCREEN* screen = panel->GetScreen(); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 4eb9dd1188..df1f245891 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -866,7 +866,7 @@ bool BOARD::ComputeBoundaryBox() /* Display board statistics: pads, nets, connections.. count */ -void BOARD::DisplayInfo( WinEDA_DrawFrame* frame ) +void BOARD::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString txt; @@ -1435,10 +1435,7 @@ out: * Function RedrawAreasOutlines * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) */ -void BOARD::RedrawAreasOutlines( WinEDA_DrawPanel* panel, - wxDC* aDC, - int aDrawMode, - int aLayer ) +void BOARD::RedrawAreasOutlines( EDA_DRAW_PANEL* panel, wxDC* aDC, int aDrawMode, int aLayer ) { if( !aDC ) return; @@ -1456,10 +1453,7 @@ void BOARD::RedrawAreasOutlines( WinEDA_DrawPanel* panel, * Function RedrawFilledAreas * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) */ -void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel, - wxDC* aDC, - int aDrawMode, - int aLayer ) +void BOARD::RedrawFilledAreas( EDA_DRAW_PANEL* panel, wxDC* aDC, int aDrawMode, int aLayer ) { if( !aDC ) return; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index e8918b29de..36b2412be2 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -508,9 +508,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function Draw. @@ -520,7 +520,7 @@ public: * @param aDrawMode = GR_COPY, GR_OR ... (not always used) * @param aOffset = an draw offset value (default = 0,0) */ - void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); /** @@ -532,7 +532,7 @@ public: * @param aDC = the curent device context * @param aNetCode is the net number to highlight or to dim. */ - void DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* aDC, int aNetCode ); + void DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* aDC, int aNetCode ); /** * Function Visit @@ -725,19 +725,16 @@ public: * Function RedrawAreasOutlines * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) */ - void RedrawAreasOutlines( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - int aLayer ); + void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + int aDrawMode, + int aLayer ); /** * Function RedrawFilledAreas * Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 ) */ - void RedrawFilledAreas( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - int aLayer ); + void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, int aLayer ); /** * Function SetAreasNetCodesFromNetNames diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 884702eaf3..80f37e7ff8 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -531,8 +531,7 @@ void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText ) /* Print 1 dimension: segments and text */ -void DIMENSION::Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int mode_color, const wxPoint& offset ) +void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int mode_color, const wxPoint& offset ) { int ox, oy, typeaff, width, gcolor; @@ -622,7 +621,7 @@ void DIMENSION::Draw( WinEDA_DrawPanel* panel, wxDC* DC, // see class_cotation.h -void DIMENSION::DisplayInfo( WinEDA_DrawFrame* frame ) +void DIMENSION::DisplayInfo( EDA_DRAW_FRAME* frame ) { // for now, display only the text within the DIMENSION using class TEXTE_PCB. m_Text->DisplayInfo( frame ); diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index a3e206918e..e58895415c 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -63,7 +63,7 @@ public: void Copy( DIMENSION* source ); - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aColorMode, const wxPoint& offset = ZeroOffset ); /** @@ -101,9 +101,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function HitTest diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 14614ed51a..505faa8bc0 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -230,8 +230,7 @@ wxPoint DRAWSEGMENT::GetEnd() const -void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int draw_mode, const wxPoint& aOffset ) +void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& aOffset ) { int ux0, uy0, dx, dy; int l_piste; @@ -364,7 +363,7 @@ void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, // see pcbstruct.h -void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame ) +void DRAWSEGMENT::DisplayInfo( EDA_DRAW_FRAME* frame ) { int itype; wxString msg; diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 1e6761a9e5..6d7f398618 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -65,7 +65,7 @@ public: void Copy( DRAWSEGMENT* source ); - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); /** @@ -75,7 +75,7 @@ public: * Is virtual from EDA_ITEM. * @param frame A WinEDA_BasePcbFrame in which to print status information. */ - virtual void DisplayInfo( WinEDA_DrawFrame* frame ); + virtual void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index f224dccbad..9c33ba925d 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -151,8 +151,7 @@ void EDGE_MODULE::SetDrawCoord() * - Circles * - Arcs */ -void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int draw_mode, const wxPoint& offset ) +void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& offset ) { int ux0, uy0, dx, dy, rayon, StAngle, EndAngle; int color, type_trace; @@ -281,7 +280,7 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, // see class_edge_mod.h -void EDGE_MODULE::DisplayInfo( WinEDA_DrawFrame* frame ) +void EDGE_MODULE::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString msg; diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index 40a460d0d4..1d4226e7a3 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -60,7 +60,7 @@ public: void SetDrawCoord(); /* drawing functions */ - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ); void Draw3D( Pcb3D_GLCanvas* glcanvas ); @@ -70,9 +70,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index f44cd0633d..0c0abe37ed 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -55,7 +55,7 @@ MARKER_PCB::~MARKER_PCB() } -void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) +void MARKER_PCB::DisplayInfo( EDA_DRAW_FRAME* frame ) { frame->ClearMsgPanel(); diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 903622bf7c..1e18d3fab3 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -68,7 +68,8 @@ public: /** * Function Draw */ - void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ) + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, + const wxPoint& aOffset = ZeroOffset ) { DrawMarker( aPanel, aDC, aDrawMode, aOffset ); } @@ -97,9 +98,9 @@ public: * Function DisplayInfo * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function Save diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index 5acfd78bad..ae69adac04 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -99,8 +99,7 @@ out: * The circle radius is half the radius of the target * 2 lines have length the diameter of the target */ -void MIREPCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int mode_color, const wxPoint& offset ) +void MIREPCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int mode_color, const wxPoint& offset ) { int rayon, ox, oy, gcolor, width; int dx1, dx2, dy1, dy2; diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index 43b5783b12..6edef05da2 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -66,7 +66,8 @@ public: void Copy( MIREPCB* source ); - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, + const wxPoint& offset = ZeroOffset ); /** diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 56d6ecfcb5..ea7ac5c99a 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -64,7 +64,7 @@ MODULE::~MODULE() * Must be done after the pads, because drawing the hole will erase overwrite * every thing already drawn. */ -void MODULE::DrawAncre( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, +void MODULE::DrawAncre( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int dim_ancre, int draw_mode ) { #ifdef USE_WX_ZOOM @@ -184,8 +184,7 @@ void MODULE::Copy( MODULE* aModule ) * @param aDrawMode = GR_OR, GR_XOR.. * @param aOffset = draw offset (usually wxPoint(0,0) */ -void MODULE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, - int aDrawMode, const wxPoint& aOffset ) +void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) { if( (m_Flags & DO_NOT_DRAW) || (m_Flags & IS_MOVED) ) return; @@ -243,8 +242,7 @@ void MODULE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, * @param offset = draw offset (usually wxPoint(0,0) * @param draw_mode = GR_OR, GR_XOR, GR_AND */ -void MODULE::DrawEdgesOnly( WinEDA_DrawPanel* panel, wxDC* DC, - const wxPoint& offset, int draw_mode ) +void MODULE::DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int draw_mode ) { for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() ) { @@ -795,7 +793,7 @@ EDA_Rect MODULE::GetBoundingBox() const /* Virtual function, from EDA_ITEM. * display module info on MsgPanel */ -void MODULE::DisplayInfo( WinEDA_DrawFrame* frame ) +void MODULE::DisplayInfo( EDA_DRAW_FRAME* frame ) { int nbpad; char bufcar[512], Line[512]; diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 5f893fb1ef..44cf0e4437 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -234,24 +234,23 @@ public: * @param aDrawMode = GR_OR, GR_XOR.. * @param aOffset = draw offset (usually wxPoint(0,0) */ - void Draw( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - const wxPoint& aOffset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + int aDrawMode, + const wxPoint& aOffset = ZeroOffset ); void Draw3D( Pcb3D_GLCanvas* glcanvas ); - void DrawEdgesOnly( WinEDA_DrawPanel* panel, wxDC* DC, - const wxPoint& offset, int draw_mode ); - void DrawAncre( WinEDA_DrawPanel* panel, wxDC* DC, + void DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int draw_mode ); + void DrawAncre( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, int dim_ancre, int draw_mode ); /** * Function DisplayInfo * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 9029cf705f..8a14be2bb4 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -61,10 +61,7 @@ public: /** * Function Draw */ - void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& offset ); + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& offset ); }; /***************************************************************/ @@ -335,8 +332,7 @@ public: * @todo we actually could show a NET, simply show all the tracks and * a pads or net name on pad and vias */ - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, - const wxPoint& offset ); + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& offset ); /** @@ -372,9 +368,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); }; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 9829bb6541..8a643ef162 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -107,10 +107,10 @@ void NETINFO_ITEM::SetNetname( const wxString& aNetname ) /** * Function Draw (TODO) */ -void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& aOffset ) +void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + int aDrawMode, + const wxPoint& aOffset ) { } @@ -120,9 +120,9 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ -void NETINFO_ITEM::DisplayInfo( WinEDA_DrawFrame* frame ) +void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) { int count; EDA_ITEM* Struct; @@ -192,10 +192,10 @@ RATSNEST_ITEM::RATSNEST_ITEM() * Function Draw * Draws a line (a ratsnest) from the starting pad to the ending pad */ -void RATSNEST_ITEM::Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& aOffset ) +void RATSNEST_ITEM::Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + int aDrawMode, + const wxPoint& aOffset ) { GRSetDrawMode( DC, aDrawMode ); int color = g_ColorsSettings.GetItemColor(RATSNEST_VISIBLE); diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 96b09f46bb..4a3db6d321 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -580,7 +580,7 @@ bool D_PAD::Save( FILE* aFile ) const } -void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame ) +void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame ) { MODULE* module; wxString Line; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 30c4fe3df8..436cf64f93 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -30,7 +30,7 @@ class Pcb3D_GLCanvas; class PAD_DRAWINFO { public: - WinEDA_DrawPanel * m_DrawPanel; // the WinEDA_DrawPanel used to draw a PAD ; can be null + EDA_DRAW_PANEL * m_DrawPanel; // the EDA_DRAW_PANEL used to draw a PAD ; can be null int m_DrawMode; // the draw mode int m_Color; // color used to draw the pad shape , from pad layers and visible layers int m_HoleColor; // color used to draw the pad hole @@ -232,12 +232,12 @@ public: /* drawing functions */ /** Draw a pad: - * @param aPanel = the WinEDA_DrawPanel panel + * @param aPanel = the EDA_DRAW_PANEL panel * @param aDC = the current device context * @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND... * @param aOffset = draw offset */ - void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, + void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); void Draw3D( Pcb3D_GLCanvas* glcanvas ); @@ -297,9 +297,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index ab329552d5..6b2e54c13a 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -45,12 +45,11 @@ PAD_DRAWINFO::PAD_DRAWINFO() /** Draw a pad: - * @param aPanel = the WinEDA_DrawPanel panel + * @param aPanel = the EDA_DRAW_PANEL panel * @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND... * @param aOffset = draw offset */ -void D_PAD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDraw_mode, - const wxPoint& aOffset ) +void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoint& aOffset ) { int color = 0; wxSize mask_margin; // margin (clearance) used for some non copper layers @@ -353,7 +352,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDraw_mode, * basic function to draw a pad. * used by D_PAD::Draw after calculation of parameters (color, final orientation ...) * this function can be called to draw a pad on a panel - * even if this panel is not a WinEDA_DrawPanel (for instance on a wxPanel inside the pad editor) + * even if this panel is not a EDA_DRAW_PANEL (for instance on a wxPanel inside the pad editor) */ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) { diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 3aee5eb96f..563fd506b6 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -189,7 +189,7 @@ bool TEXTE_PCB::Save( FILE* aFile ) const * because the line mode does not keep the actual size of the text * and the actual size is very important, especially for copper texts */ -void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC, +void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int DrawMode, const wxPoint& offset ) { BOARD * brd = GetBoard( ); @@ -213,7 +213,7 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC, // see class_pcb_text.h -void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) +void TEXTE_PCB::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString msg; diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 097db67121..1d892297d1 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -54,7 +54,7 @@ public: /* duplicate structure */ void Copy( TEXTE_PCB* source ); - void Draw( WinEDA_DrawPanel * panel, wxDC* DC, int aDrawMode, + void Draw( EDA_DRAW_PANEL * panel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ); // File Operations: @@ -74,9 +74,9 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 7ceeb26373..cfc8a24dfa 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -328,8 +328,7 @@ EDA_Rect TEXTE_MODULE::GetBoundingBox() const * @param offset = draw offset (usually wxPoint(0,0) * @param draw_mode = GR_OR, GR_XOR.. */ -void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, - const wxPoint& offset ) +void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& offset ) { int width, color, orient; wxSize size; @@ -418,10 +417,10 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, /* Rraws a line from the TEXTE_MODULE origin to parent MODULE origin. */ -void TEXTE_MODULE::DrawUmbilical( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - const wxPoint& aOffset ) +void TEXTE_MODULE::DrawUmbilical( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + int aDrawMode, + const wxPoint& aOffset ) { MODULE* parent = (MODULE*) GetParent(); if( !parent ) @@ -456,7 +455,7 @@ int TEXTE_MODULE::GetDrawRotation() const // see class_text_mod.h -void TEXTE_MODULE::DisplayInfo( WinEDA_DrawFrame* frame ) +void TEXTE_MODULE::DisplayInfo( EDA_DRAW_FRAME* frame ) { MODULE* module = (MODULE*) m_Parent; diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 3deffbfbc2..7bb9b38ac4 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -88,10 +88,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); int ReadDescr( LINE_READER* aReader ); /* drawing functions */ - void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& offset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + int aDrawMode, + const wxPoint& offset = ZeroOffset ); /** * Function DrawUmbilical @@ -102,19 +102,19 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); * @param aDrawMode = drawing mode, typically GR_XOR * @param aOffset = offset for TEXTE_MODULE */ - void DrawUmbilical( WinEDA_DrawPanel* aPanel, - wxDC* aDC, - int aDrawMode, - const wxPoint& aOffset = ZeroOffset ); + void DrawUmbilical( EDA_DRAW_PANEL* aPanel, + wxDC* aDC, + int aDrawMode, + const wxPoint& aOffset = ZeroOffset ); /** * Function DisplayInfo * has knowledge about the frame and how and where to put status * information about this object into the frame's message panel. * Is virtual from EDA_ITEM. - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 59e472c9e3..1d074fcf87 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -547,8 +547,7 @@ bool TRACK::Save( FILE* aFile ) const /*********************************************************************/ -void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, - const wxPoint& aOffset ) +void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& aOffset ) /*********************************************************************/ { int l_piste; @@ -743,8 +742,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, /*******************************************************************************************/ -void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, - const wxPoint& aOffset ) +void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& aOffset ) /*******************************************************************************************/ { int color; @@ -979,7 +977,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, // see class_track.h -void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) +void TRACK::DisplayInfo( EDA_DRAW_FRAME* frame ) { wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); @@ -1003,9 +1001,9 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ -void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame ) +void TRACK::DisplayInfoBase( EDA_DRAW_FRAME* frame ) { wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 0c0904ab4c..ad085b5ef2 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -141,7 +141,8 @@ public: /* Display on screen: */ - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, + const wxPoint& aOffset = ZeroOffset ); /* divers */ int Shape() const { return m_Shape & 0xFF; } @@ -210,18 +211,18 @@ public: * about this object into the frame's message panel. * Is virtual from EDA_ITEM. * Display info about the track segment and the full track length - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function DisplayInfoBase * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length - * @param frame A WinEDA_DrawFrame in which to print status information. + * @param frame A EDA_DRAW_FRAME in which to print status information. */ - void DisplayInfoBase( WinEDA_DrawFrame* frame ); + void DisplayInfoBase( EDA_DRAW_FRAME* frame ); /** * Function ShowWidth @@ -339,7 +340,8 @@ public: } - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, + const wxPoint& aOffset = ZeroOffset ); /** diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index bea690e3dd..53b817b402 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -444,7 +444,7 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader ) } -void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& offset ) +void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& offset ) { if( DC == NULL ) return; @@ -525,7 +525,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, con /************************************************************************************/ -void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel, +void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& offset ) { /************************************************************************************/ @@ -689,7 +689,7 @@ EDA_Rect ZONE_CONTAINER::GetBoundingBox() const /**********************************************************************************************/ -void ZONE_CONTAINER::DrawWhileCreateOutline( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode ) +void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode ) { /***********************************************************************************************/ /** @@ -925,10 +925,8 @@ bool ZONE_CONTAINER::HitTestFilledArea( const wxPoint& aRefPos ) } -/************************************************************/ -void ZONE_CONTAINER::DisplayInfo( WinEDA_DrawFrame* frame ) +void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame ) { -/************************************************************/ wxString msg; BOARD* board = (BOARD*) m_Parent; diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index f7845b70f9..05d214d238 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -89,7 +89,7 @@ public: */ void Copy( ZONE_CONTAINER* src ); - void DisplayInfo( WinEDA_DrawFrame* frame ); + void DisplayInfo( EDA_DRAW_FRAME* frame ); /** * Function Draw @@ -99,10 +99,10 @@ public: * @param aDrawMode = GR_OR, GR_XOR, GR_COPY .. * @param offset = Draw offset (usually wxPoint(0,0)) */ - void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& offset = ZeroOffset ); + void Draw( EDA_DRAW_PANEL* panel, + wxDC* DC, + int aDrawMode, + const wxPoint& offset = ZeroOffset ); /** * Function DrawDrawFilledArea @@ -112,10 +112,10 @@ public: * @param offset = Draw offset (usually wxPoint(0,0)) * @param aDrawMode = GR_OR, GR_XOR, GR_COPY .. */ - void DrawFilledArea( WinEDA_DrawPanel* panel, - wxDC* DC, - int aDrawMode, - const wxPoint& offset = ZeroOffset ); + void DrawFilledArea( EDA_DRAW_PANEL* panel, + wxDC* DC, + int aDrawMode, + const wxPoint& offset = ZeroOffset ); /** * Function DrawWhileCreateOutline @@ -126,7 +126,7 @@ public: * @param DC = current Device Context * @param draw_mode = draw mode: OR, XOR .. */ - void DrawWhileCreateOutline( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode = GR_OR ); + void DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode = GR_OR ); /* Function GetBoundingBox diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index b4938bf86e..fd80de2d81 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -39,7 +39,7 @@ static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | /*! * DIALOG_SVG_PRINT functions */ -DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) : +DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) : DIALOG_SVG_PRINT_base( parent ) { m_Parent = (WinEDA_BasePcbFrame*) parent; @@ -235,7 +235,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, screen->SetScalingFactor( 1.0 ); float dpi = (float)m_Parent->m_InternalUnits; - WinEDA_DrawPanel* panel = m_Parent->DrawPanel; + EDA_DRAW_PANEL* panel = m_Parent->DrawPanel; SetLocaleTo_C_standard(); // Switch the locale to standard C (needed // to print floating point numbers like 1.3) diff --git a/pcbnew/dialogs/dialog_SVG_print.h b/pcbnew/dialogs/dialog_SVG_print.h index dd88fa2e67..bbd8eb66f3 100644 --- a/pcbnew/dialogs/dialog_SVG_print.h +++ b/pcbnew/dialogs/dialog_SVG_print.h @@ -20,7 +20,7 @@ private: wxCheckBox* m_BoxSelectLayer[32]; public: - DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ); + DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ); ~DIALOG_SVG_PRINT() {} private: diff --git a/pcbnew/dialogs/dialog_print_for_modedit.cpp b/pcbnew/dialogs/dialog_print_for_modedit.cpp index af6d306e1a..f153e07cc8 100644 --- a/pcbnew/dialogs/dialog_print_for_modedit.cpp +++ b/pcbnew/dialogs/dialog_print_for_modedit.cpp @@ -37,11 +37,11 @@ static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL; class DIALOG_PRINT_FOR_MODEDIT : public DIALOG_PRINT_FOR_MODEDIT_BASE { private: - WinEDA_DrawFrame* m_Parent; - wxConfig* m_Config; + EDA_DRAW_FRAME* m_Parent; + wxConfig* m_Config; public: - DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent ); + DIALOG_PRINT_FOR_MODEDIT( EDA_DRAW_FRAME* parent ); ~DIALOG_PRINT_FOR_MODEDIT() {}; private: @@ -80,7 +80,7 @@ void WinEDA_ModuleEditFrame::ToPrinter( wxCommandEvent& event ) } /*************************************************************************************/ -DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent ) : +DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( EDA_DRAW_FRAME* parent ) : DIALOG_PRINT_FOR_MODEDIT_BASE( parent ) /*************************************************************************************/ { diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 655a64ac0b..e36ba3d6ab 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -13,8 +13,8 @@ #include "dialog_helpers.h" /* Loca functions */ -static void Exit_EditDimension( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Montre_Position_New_Dimension( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void Exit_EditDimension( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Montre_Position_New_Dimension( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* Local variables : */ static int status_dimension; /* Used in cimension creation: @@ -191,7 +191,7 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event ) /**************************************************************/ -static void Exit_EditDimension( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Exit_EditDimension( EDA_DRAW_PANEL* Panel, wxDC* DC ) /**************************************************************/ { DIMENSION* Dimension = (DIMENSION*) Panel->GetScreen()->GetCurItem(); @@ -296,7 +296,7 @@ DIMENSION* WinEDA_PcbFrame::Begin_Dimension( DIMENSION* Dimension, wxDC* DC ) /************************************************************************************/ -static void Montre_Position_New_Dimension( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Montre_Position_New_Dimension( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) /************************************************************************************/ /* redessin du contour de la piste lors des deplacements de la souris */ { diff --git a/pcbnew/drag.h b/pcbnew/drag.h index d92c4439d7..278b1a1dd9 100644 --- a/pcbnew/drag.h +++ b/pcbnew/drag.h @@ -38,10 +38,10 @@ public: extern std::vector g_DragSegmentList; /* Functions */ -void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC ); -void Build_Drag_Liste( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module ); -void Build_1_Pad_SegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, D_PAD* PtPad ); -void Collect_TrackSegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, +void Dessine_Segments_Dragges( EDA_DRAW_PANEL* panel, wxDC* DC ); +void Build_Drag_Liste( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module ); +void Build_1_Pad_SegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC, D_PAD* PtPad ); +void Collect_TrackSegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC, wxPoint& point, int MasqueLayer, int net_code ); @@ -58,5 +58,4 @@ void EraseDragList(); * flag = STARTPOINT (if the point to drag is the start point of Track) * or ENDPOINT */ -void AddSegmentToDragList( WinEDA_DrawPanel* panel, wxDC* DC, - int flag, TRACK* Track ); +void AddSegmentToDragList( EDA_DRAW_PANEL* panel, wxDC* DC, int flag, TRACK* Track ); diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index 963c008d0d..da058ae9b2 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -27,7 +27,7 @@ DRAG_SEGM::DRAG_SEGM( TRACK* segm ) /*******************************************************************/ -void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC ) +void Dessine_Segments_Dragges( EDA_DRAW_PANEL* panel, wxDC* DC ) /*******************************************************************/ /* Redraw the list of segments starting in g_DragSegmentList, while moving a footprint */ { @@ -64,7 +64,7 @@ void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC ) /*************************************************************************/ -void Build_Drag_Liste( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module ) +void Build_Drag_Liste( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module ) /*************************************************************************/ /** Build the list of track segments connected to pads of a given module * by populate the std::vector g_DragSegmentList @@ -85,7 +85,7 @@ void Build_Drag_Liste( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module ) /**********************************************************************************/ -void Build_1_Pad_SegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, D_PAD* PtPad ) +void Build_1_Pad_SegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC, D_PAD* PtPad ) /**********************************************************************************/ /** Build the list of track segments connected to a given pad * by populate the std::vector g_DragSegmentList @@ -128,8 +128,7 @@ void Build_1_Pad_SegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, D_PAD* PtPad /******************************************************************/ -void AddSegmentToDragList( WinEDA_DrawPanel* panel, wxDC* DC, - int flag, TRACK* Track ) +void AddSegmentToDragList( EDA_DRAW_PANEL* panel, wxDC* DC, int flag, TRACK* Track ) /******************************************************************/ /* Add the segment"Track" to the drag list, and erase it from screen * flag = STARTPOINT (if the point to drag is the start point of Track) or ENDPOINT @@ -158,7 +157,7 @@ void AddSegmentToDragList( WinEDA_DrawPanel* panel, wxDC* DC, /**********************************************************************************/ -void Collect_TrackSegmentsToDrag( WinEDA_DrawPanel* panel, wxDC* DC, +void Collect_TrackSegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC, wxPoint& aRefPos, int MasqueLayer, int net_code ) /**********************************************************************************/ diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h index 408e2f33ea..ec256ee4c3 100644 --- a/pcbnew/drc_stuff.h +++ b/pcbnew/drc_stuff.h @@ -72,7 +72,7 @@ #define DRCE_NETCLASS_uVIADRILLSIZE 35 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill -class WinEDA_DrawPanel; +class EDA_DRAW_PANEL; class MARKER_PCB; class DIALOG_DRC_CONTROL; diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 80b9e547af..9d12db0f6d 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -19,9 +19,9 @@ #include "module_editor_frame.h" -static void ShowEdgeModule( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void Exit_EditEdge_Module( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Move_Segment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void ShowEdgeModule( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void Exit_EditEdge_Module( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Move_Segment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); int ArcValue = 900; static wxPoint MoveVector; // Move vector for move edge @@ -72,7 +72,7 @@ void WinEDA_ModuleEditFrame::Place_EdgeMod( EDGE_MODULE* Edge ) /* Move and redraw the current edited graphic item when mouse is moving */ -static void Move_Segment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Move_Segment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BASE_SCREEN* screen = panel->GetScreen(); EDGE_MODULE* Edge = (EDGE_MODULE*) screen->GetCurItem(); @@ -97,7 +97,7 @@ static void Move_Segment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) /* Redraw the current edited (moved) graphic item */ -static void ShowEdgeModule( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void ShowEdgeModule( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BASE_SCREEN* screen = panel->GetScreen(); EDGE_MODULE* Edge = (EDGE_MODULE*) screen->GetCurItem(); @@ -266,7 +266,7 @@ void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge ) /* abort function in moving edge. */ -static void Exit_EditEdge_Module( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Exit_EditEdge_Module( EDA_DRAW_PANEL* Panel, wxDC* DC ) { EDGE_MODULE* Edge = (EDGE_MODULE*) Panel->GetScreen()->GetCurItem(); diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index f7ae815c9b..cd5001fb8a 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -14,8 +14,8 @@ #include "protos.h" -static void Move_Texte_Pcb( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void Abort_Edit_Pcb_Text( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Move_Texte_Pcb( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void Abort_Edit_Pcb_Text( EDA_DRAW_PANEL* Panel, wxDC* DC ); static TEXTE_PCB s_TextCopy( (BOARD_ITEM*) NULL ); /* copy of the edited text @@ -29,7 +29,7 @@ static TEXTE_PCB s_TextCopy( (BOARD_ITEM*) NULL ); /* copy of the edited text * * If a text is selected, its initial coord are regenerated */ -void Abort_Edit_Pcb_Text( WinEDA_DrawPanel* Panel, wxDC* DC ) +void Abort_Edit_Pcb_Text( EDA_DRAW_PANEL* Panel, wxDC* DC ) { Panel->ManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL; @@ -116,7 +116,7 @@ void WinEDA_PcbFrame::StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ) /* Move PCB text following the cursor. */ -static void Move_Texte_Pcb( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Move_Texte_Pcb( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { TEXTE_PCB* TextePcb = (TEXTE_PCB*) panel->GetScreen()->GetCurItem(); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index 8d4ea9e163..858b227498 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -14,9 +14,9 @@ #include "protos.h" -static void Exit_EditEdge( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Montre_Position_NewSegment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void Move_Segment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void Exit_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Montre_Position_NewSegment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void Move_Segment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); static wxPoint s_InitialPosition; // Initial cursor position. @@ -59,7 +59,7 @@ void WinEDA_PcbFrame::Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ) /* * Redraw segment during cursor movement. */ -static void Move_Segment( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Move_Segment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { DRAWSEGMENT* Segment = (DRAWSEGMENT*) panel->GetScreen()->GetCurItem(); int t_fill = DisplayOpt.DisplayDrawItems; @@ -168,7 +168,7 @@ void WinEDA_PcbFrame::Delete_Drawings_All_Layer( int aLayer ) } -static void Exit_EditEdge( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Exit_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ) { DRAWSEGMENT* Segment = (DRAWSEGMENT*) Panel->GetScreen()->GetCurItem(); @@ -293,8 +293,7 @@ void WinEDA_PcbFrame::End_Edge( DRAWSEGMENT* Segment, wxDC* DC ) /* Redraw segment during cursor movement */ -static void Montre_Position_NewSegment( WinEDA_DrawPanel* panel, - wxDC* DC, bool erase ) +static void Montre_Position_NewSegment( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { DRAWSEGMENT* Segment = (DRAWSEGMENT*) panel->GetScreen()->GetCurItem(); diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index ecb7ddd6e0..34feb0066f 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -17,9 +17,8 @@ #include "protos.h" -static void Exit_Editrack( WinEDA_DrawPanel* panel, wxDC* DC ); -void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, - wxDC* DC, bool erase ); +static void Exit_Editrack( EDA_DRAW_PANEL* panel, wxDC* DC ); +void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); static void ComputeBreakPoint( TRACK* track, int n, wxPoint end ); static void DeleteNullTrackSegments( BOARD* pcb, DLIST& aTrackList ); @@ -34,7 +33,7 @@ static PICKED_ITEMS_LIST s_ItemsListPicker; /* Routine to cancel the route if a track is being drawn, or exit the * application EDITRACK. */ -static void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Exit_Editrack( EDA_DRAW_PANEL* Panel, wxDC* DC ) { WinEDA_PcbFrame* frame = (WinEDA_PcbFrame*) Panel->GetParent(); TRACK* track = (TRACK*) frame->GetCurItem(); @@ -612,7 +611,7 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack ) * the magnetic hit instead of solving the violation * - should locate conflicting tracks also when we're crossing over them */ -static void PushTrack( WinEDA_DrawPanel* panel ) +static void PushTrack( EDA_DRAW_PANEL* panel ) { BOARD* pcb = ( (WinEDA_BasePcbFrame*) (panel->GetParent()) )->GetBoard(); wxPoint cursor = ActiveScreen->m_Curseur; @@ -673,9 +672,7 @@ static void PushTrack( WinEDA_DrawPanel* panel ) /* Redraw the current track beiing created when the mouse cursor is moved */ -void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ) +void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { D( g_CurrentTrackList.VerifyListIntegrity(); ); diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index de0e610868..2d6598af89 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -13,10 +13,8 @@ #include "protos.h" -static void Show_MoveTexte_Module( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); -static void AbortMoveTextModule( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Show_MoveTexte_Module( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC ); wxPoint MoveVector; // Move vector for move edge, exported @@ -125,7 +123,7 @@ void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text ) * * If a text is selected, its initial coordinates are regenerated. */ -static void AbortMoveTextModule( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC ) { BASE_SCREEN* screen = Panel->GetScreen(); TEXTE_MODULE* Text = (TEXTE_MODULE*) screen->GetCurItem(); @@ -242,8 +240,7 @@ void WinEDA_BasePcbFrame::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ) } -static void Show_MoveTexte_Module( WinEDA_DrawPanel* panel, wxDC* DC, - bool erase ) +static void Show_MoveTexte_Module( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BASE_SCREEN* screen = panel->GetScreen(); TEXTE_MODULE* Text = (TEXTE_MODULE*) screen->GetCurItem(); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 092abeef62..1e3e9297fd 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -364,10 +364,10 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( * * @return wxEmptyString if abort or fails, or the selected module name if Ok */ -wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( WinEDA_DrawFrame* aWindow, - const wxString& aLibraryFullFilename, - const wxString& aMask, - const wxString& aKeyWord ) +wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow, + const wxString& aLibraryFullFilename, + const wxString& aMask, + const wxString& aKeyWord ) { unsigned ii; char* Line; diff --git a/pcbnew/mirepcb.cpp b/pcbnew/mirepcb.cpp index 288df1e72e..11950f369a 100644 --- a/pcbnew/mirepcb.cpp +++ b/pcbnew/mirepcb.cpp @@ -15,10 +15,10 @@ /* Routines Locales */ -static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); +static void AbortMoveAndEditTarget( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* panel, + wxDC* DC, + bool erase ); /* Local variables : */ static int MireDefaultSize = 5000; @@ -169,7 +169,7 @@ void WinEDA_PcbFrame::Delete_Mire( MIREPCB* MirePcb, wxDC* DC ) } -static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void AbortMoveAndEditTarget( EDA_DRAW_PANEL* Panel, wxDC* DC ) { BASE_SCREEN* screen = Panel->GetScreen(); MIREPCB* MirePcb = (MIREPCB*) screen->GetCurItem(); @@ -279,9 +279,7 @@ void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC ) /* Redraw the contour of the track while moving the mouse */ -static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ) +static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { BASE_SCREEN* screen = panel->GetScreen(); MIREPCB* MirePcb = (MIREPCB*) screen->GetCurItem(); diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 3a50443da0..3ff1025640 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -1,6 +1,6 @@ /*********************************************************/ -/* class WinEDA_ModuleEditFrame: public WinEDA_DrawFrame */ +/* class WinEDA_ModuleEditFrame: public EDA_DRAW_FRAME */ /* Class for the footprint editor */ /*********************************************************/ diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index dc545fc6a8..dd08085c9c 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -243,7 +243,7 @@ WinEDA_ModuleEditFrame::~WinEDA_ModuleEditFrame() * the last edited item */ SetBaseScreen( NULL ); /* Do not delete (by the destructor of - * WinEDA_DrawFrame) the PCB_SCREEN handling + * EDA_DRAW_FRAME) the PCB_SCREEN handling * g_ModuleEditor_Pcb */ diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 2033455992..695b1ec67b 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -17,7 +17,7 @@ #include "drag.h" -static void Abort_MoveOrCopyModule( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC ); static MODULE* s_ModuleInitialCopy = NULL; /* Copy of module for @@ -114,7 +114,7 @@ void WinEDA_PcbFrame::StartMove_Module( MODULE* module, wxDC* DC ) /* Called on a move or copy module command abort */ -void Abort_MoveOrCopyModule( WinEDA_DrawPanel* Panel, wxDC* DC ) +void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC ) { TRACK* pt_segm; MODULE* module; @@ -231,7 +231,7 @@ MODULE* WinEDA_BasePcbFrame::Copie_Module( MODULE* module ) /* Redraw the footprint when moving the mouse. */ -void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +void Montre_Position_Empreinte( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { MODULE* module = (MODULE*) panel->GetScreen()->GetCurItem(); @@ -532,7 +532,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module, /*************************************************/ /* Redraw in XOR mode the outlines of a module. */ /*************************************************/ -void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module ) +void DrawModuleOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* module ) { int pad_fill_tmp; D_PAD* pt_pad; diff --git a/pcbnew/move-drag_pads.cpp b/pcbnew/move-drag_pads.cpp index 73927fb08d..5dea953e39 100644 --- a/pcbnew/move-drag_pads.cpp +++ b/pcbnew/move-drag_pads.cpp @@ -22,7 +22,7 @@ static wxPoint Pad_OldPos; /* Cancel move pad command. */ -static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Exit_Move_Pad( EDA_DRAW_PANEL* Panel, wxDC* DC ) { D_PAD* pad = s_CurrentSelectedPad; @@ -57,7 +57,7 @@ static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC ) /* Draw in drag mode when moving a pad. */ -static void Show_Pad_Move( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Show_Pad_Move( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { TRACK* Track; BASE_SCREEN* screen = panel->GetScreen(); diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 3906be994c..14c2b9dfec 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -19,11 +19,11 @@ #include "protos.h" -static void Show_MoveNode( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static void Show_Drag_Track_Segment_With_Cte_Slope( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); -static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Show_MoveNode( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); +static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* panel, + wxDC* DC, + bool erase ); +static void Abort_MoveTrack( EDA_DRAW_PANEL* Panel, wxDC* DC ); static bool InitialiseDragParameters(); @@ -48,7 +48,7 @@ static PICKED_ITEMS_LIST s_ItemsListPicker; /** Abort function for commands drag, copy or move track */ -static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Abort_MoveTrack( EDA_DRAW_PANEL* Panel, wxDC* DC ) { TRACK* NextS; int ii; @@ -134,7 +134,7 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC ) /* Redraw the moved node according to the mouse cursor position */ -static void Show_MoveNode( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Show_MoveNode( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { int ii; wxPoint moveVector; @@ -236,7 +236,7 @@ static void Show_MoveNode( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) * when moving segments * (i.e. when a segment length is 0) and we want keep them constant */ -static void Show_Drag_Track_Segment_With_Cte_Slope( WinEDA_DrawPanel* panel, +static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { double xi1 = 0, yi1 = 0, xi2 = 0, yi2 = 0; // calculated diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 96b7ab4c97..e51ff000d3 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -25,14 +25,14 @@ static wxSize ShapeSize; static int PolyShapeType; -static void Exit_Self( WinEDA_DrawPanel* Panel, wxDC* DC ); +static void Exit_Self( EDA_DRAW_PANEL* Panel, wxDC* DC ); static void gen_arc( std::vector & aBuffer, wxPoint aStartPoint, wxPoint aCenter, int a_ArcAngle ); -static void ShowBoundingBoxMicroWaveInductor( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); +static void ShowBoundingBoxMicroWaveInductor( EDA_DRAW_PANEL* panel, + wxDC* DC, + bool erase ); int BuildCornersList_S_Shape( std::vector & aBuffer, @@ -57,7 +57,7 @@ static int Self_On; /* This function shows on screen the bounding box of the inductor that will be * created at the end of the build inductor process */ -static void ShowBoundingBoxMicroWaveInductor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void ShowBoundingBoxMicroWaveInductor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) { /* Calculate the orientation and size of the box containing the inductor: * the box is a rectangle with height = lenght/2 @@ -106,7 +106,7 @@ static void ShowBoundingBoxMicroWaveInductor( WinEDA_DrawPanel* panel, wxDC* DC, } -void Exit_Self( WinEDA_DrawPanel* Panel, wxDC* DC ) +void Exit_Self( EDA_DRAW_PANEL* Panel, wxDC* DC ) { if( Self_On ) { diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index fcfb8b5c14..e731bccd4b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -145,8 +145,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) WinEDA_PcbFrame::Process_Special_Functions ) // Menu Help - EVT_MENU( ID_GENERAL_HELP, WinEDA_DrawFrame::GetKicadHelp ) - EVT_MENU( ID_KICAD_ABOUT, WinEDA_BasicFrame::GetKicadAbout ) + EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp ) + EVT_MENU( ID_KICAD_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) // Menu 3D Frame EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, WinEDA_PcbFrame::Show3D_Frame ) @@ -156,7 +156,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) // Horizontal toolbar EVT_TOOL( ID_TO_LIBRARY, WinEDA_PcbFrame::Process_Special_Functions ) - EVT_TOOL( ID_SHEET_SET, WinEDA_DrawFrame::Process_PageSettings ) + EVT_TOOL( ID_SHEET_SET, EDA_DRAW_FRAME::Process_PageSettings ) EVT_TOOL( wxID_CUT, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( wxID_COPY, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( wxID_PASTE, WinEDA_PcbFrame::Process_Special_Functions ) @@ -653,7 +653,7 @@ void WinEDA_PcbFrame::SetVisibleAlls( ) */ void WinEDA_PcbFrame::SetLanguage( wxCommandEvent& event ) { - WinEDA_DrawFrame::SetLanguage( event ); + EDA_DRAW_FRAME::SetLanguage( event ); m_Layers->SetLayersManagerTabsText( ); wxAuiPaneInfo& pane_info = m_auimgr.GetPane(m_Layers); pane_info.Caption( _( "Visibles" ) ); @@ -661,7 +661,7 @@ void WinEDA_PcbFrame::SetLanguage( wxCommandEvent& event ) ReFillLayerWidget(); if( m_ModuleEditFrame ) - m_ModuleEditFrame->WinEDA_DrawFrame::SetLanguage( event ); + m_ModuleEditFrame->EDA_DRAW_FRAME::SetLanguage( event ); } diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index a1e39fdf3c..cd18f8677a 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -16,7 +16,7 @@ #include "protos.h" -static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule, +static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, int aDraw_mode, int aMasklayer, PRINT_PARAMETERS::DrillShapeOptT aDrillShapeOpt ); @@ -317,7 +317,7 @@ void WinEDA_PcbFrame::PrintPage( wxDC* aDC, } -static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule, +static void Print_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, MODULE* aModule, int aDraw_mode, int aMasklayer, PRINT_PARAMETERS::DrillShapeOptT aDrillShapeOpt ) { diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 2e260a04c8..8b2f17cd0f 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -37,7 +37,7 @@ PRINT_PARAMETERS::PRINT_PARAMETERS() BOARD_PRINTOUT_CONTROLER::BOARD_PRINTOUT_CONTROLER( const PRINT_PARAMETERS& print_params, - WinEDA_DrawFrame* parent, + EDA_DRAW_FRAME* parent, const wxString& title ) : wxPrintout( title ) { @@ -236,8 +236,8 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage() GRForceBlackPen( true ); - WinEDA_DrawPanel* panel = m_Parent->DrawPanel; - EDA_Rect tmp = panel->m_ClipBox; + EDA_DRAW_PANEL* panel = m_Parent->DrawPanel; + EDA_Rect tmp = panel->m_ClipBox; // Set clip box to the max size #define MAX_VALUE (INT_MAX/2) // MAX_VALUE is the max we can use in an integer diff --git a/pcbnew/printout_controler.h b/pcbnew/printout_controler.h index 1255975e71..80668c04a1 100644 --- a/pcbnew/printout_controler.h +++ b/pcbnew/printout_controler.h @@ -52,12 +52,12 @@ public: class BOARD_PRINTOUT_CONTROLER : public wxPrintout { private: - WinEDA_DrawFrame* m_Parent; + EDA_DRAW_FRAME* m_Parent; PRINT_PARAMETERS m_PrintParams; public: BOARD_PRINTOUT_CONTROLER( const PRINT_PARAMETERS& print_params, - WinEDA_DrawFrame* parent, + EDA_DRAW_FRAME* parent, const wxString& title ); bool OnPrintPage( int page ); @@ -66,7 +66,8 @@ public: { if (page <= m_PrintParams.m_PageCount) return true; - else return false; + else + return false; } void GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo ); diff --git a/pcbnew/protos.h b/pcbnew/protos.h index f6e19ed1eb..68408ea6cb 100644 --- a/pcbnew/protos.h +++ b/pcbnew/protos.h @@ -55,11 +55,11 @@ void CreateSortedPadListByXCoord( BOARD* aBoard, std::vector* aVector ); * The starting point of a track following MUST exist: may be * Then put a 0 before calling a routine if the track is the last draw */ -void Trace_Une_Piste( WinEDA_DrawPanel* panel, - wxDC* DC, - TRACK* pt_start_piste, - int nbsegment, - int mode_color ); +void Trace_Une_Piste( EDA_DRAW_PANEL* panel, + wxDC* DC, + TRACK* pt_start_piste, + int nbsegment, + int mode_color ); /****************/ @@ -203,10 +203,8 @@ TRACK* Locate_Zone( TRACK* start_adresse, /* MODULES.C */ /*************/ int ChangeSideNumLayer( int oldlayer ); -void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module ); -void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); +void DrawModuleOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* module ); +void Montre_Position_Empreinte( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /****************/ @@ -215,8 +213,7 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack ); -void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, - wxDC* DC, bool erase ); +void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); /* Determine coordinate for a segment direction of 0, 90 or 45 degrees, * depending on it's position from the origin (ox, oy) and the current diff --git a/pcbnew/solve.cpp b/pcbnew/solve.cpp index 5c648d5588..6f7959d714 100644 --- a/pcbnew/solve.cpp +++ b/pcbnew/solve.cpp @@ -1229,7 +1229,7 @@ static void Place_Piste_en_Buffer( WinEDA_PcbFrame* pcbframe, wxDC* DC ) int dx0, dy0, dx1, dy1; int marge, via_marge; - WinEDA_DrawPanel* panel = pcbframe->DrawPanel; + EDA_DRAW_PANEL* panel = pcbframe->DrawPanel; marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentTrackWidth() / 2 ); diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 954f83be0d..2f7dae8f20 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -29,8 +29,8 @@ extern int g_DrawDefaultLineThickness; // Default line thickness, used to draw F * and we want to see pad through. * The pads must appear on the layers selected in MasqueLayer */ -static void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, - int ox, int oy, int MasqueLayer, int draw_mode ); +static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module, + int ox, int oy, int MasqueLayer, int draw_mode ); /* Draw the footprint editor BOARD, and others elements : axis, grid .. @@ -113,7 +113,7 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /* Redraw the BOARD items but not cursors, axis or grid */ -void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC, +void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, int aDrawMode, const wxPoint& offset ) { /* The order of drawing is flexible on some systems and not on others. For @@ -216,7 +216,7 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC, } -void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode ) +void BOARD::DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* DC, int aNetCode ) { int draw_mode; @@ -274,7 +274,7 @@ void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode * and we want to see pad through. * The pads must appear on the layers selected in MasqueLayer */ -void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, +void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module, int ox, int oy, int MasqueLayer, int draw_mode ) { int tmp; diff --git a/pcbnew/trpiste.cpp b/pcbnew/trpiste.cpp index 55665980c8..d616641b82 100644 --- a/pcbnew/trpiste.cpp +++ b/pcbnew/trpiste.cpp @@ -22,7 +22,7 @@ * The starting point of a track following MUST exist: may be * then put a 0 before calling a routine if the track is the last drawn. */ -void Trace_Une_Piste( WinEDA_DrawPanel* panel, wxDC* DC, TRACK* aTrackList, +void Trace_Une_Piste( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment, int draw_mode ) { // preserve the start of the list for debugging. diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index ad205bc842..c047da3eee 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -20,14 +20,14 @@ bool s_Verbose = false; // false if zone outline diags must not be shown // Outline creation: -static void Abort_Zone_Create_Outline( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Show_New_Edge_While_Move_Mouse( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); +static void Abort_Zone_Create_Outline( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ); // Corner moving -static void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC ); -static void Show_Zone_Corner_Or_Outline_While_Move_Mouse( WinEDA_DrawPanel* panel, - wxDC* DC, - bool erase ); +static void Abort_Zone_Move_Corner_Or_Outlines( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* panel, + wxDC* DC, + bool erase ); /* Local variables */ static wxPoint s_CornerInitialPosition; // Used to abort a move corner command @@ -132,7 +132,7 @@ int WinEDA_PcbFrame::Delete_LastCreatedCorner( wxDC* DC ) /*************************************************************************/ -static void Abort_Zone_Create_Outline( WinEDA_DrawPanel* Panel, wxDC* DC ) +static void Abort_Zone_Create_Outline( EDA_DRAW_PANEL* Panel, wxDC* DC ) /*************************************************************************/ /** @@ -376,7 +376,7 @@ void WinEDA_PcbFrame::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_contain /**************************************************************************/ -void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC ) +void Abort_Zone_Move_Corner_Or_Outlines( EDA_DRAW_PANEL* Panel, wxDC* DC ) /**************************************************************************/ /** @@ -426,7 +426,7 @@ void Abort_Zone_Move_Corner_Or_Outlines( WinEDA_DrawPanel* Panel, wxDC* DC ) /*************************************************************************************************/ -void Show_Zone_Corner_Or_Outline_While_Move_Mouse( WinEDA_DrawPanel* Panel, wxDC* DC, bool erase ) +void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* Panel, wxDC* DC, bool erase ) /*************************************************************************************************/ /* Redraws the zone outline when moving a corner according to the cursor position @@ -723,7 +723,7 @@ bool WinEDA_PcbFrame::End_Zone( wxDC* DC ) /******************************************************************************************/ -static void Show_New_Edge_While_Move_Mouse( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) +static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase ) /******************************************************************************************/ /* Redraws the zone outlines when moving mouse