From 42022adb3f5cdabd70c5e7e100350297c1ee7a31 Mon Sep 17 00:00:00 2001 From: charras Date: Thu, 30 Jul 2009 11:04:07 +0000 Subject: [PATCH] code cleaning --- include/pcbstruct.h | 2 +- include/wxBasePcbFrame.h | 368 ++++++++++++++++++ include/wxPcbStruct.h | 332 +--------------- pcbnew/attribut.cpp | 1 + pcbnew/automove.cpp | 1 + pcbnew/autoplac.cpp | 1 + pcbnew/autorout.cpp | 1 + pcbnew/block.cpp | 1 + pcbnew/block_module_editor.cpp | 1 + pcbnew/board_undo_redo.cpp | 1 + pcbnew/build_BOM_from_board.cpp | 1 + pcbnew/class_track.cpp | 2 +- pcbnew/class_zone.cpp | 2 +- pcbnew/clean.cpp | 1 + pcbnew/controle.cpp | 1 + pcbnew/cotation.cpp | 2 +- pcbnew/cross-probing.cpp | 1 + pcbnew/deltrack.cpp | 4 +- pcbnew/dialog_copper_zones.cpp | 1 + pcbnew/dialog_design_rules.cpp | 1 + pcbnew/dialog_display_options.cpp | 1 + pcbnew/dialog_drc.cpp | 1 + pcbnew/dialog_freeroute_exchange.cpp | 1 + pcbnew/dialog_general_options.cpp | 1 + pcbnew/dialog_netlist.cpp | 1 + pcbnew/dialog_orient_footprints.cpp | 1 + pcbnew/dialog_pcb_text_properties.cpp | 1 + .../dialog_pcbnew_config_libs_and_paths.cpp | 1 + pcbnew/dialog_print_using_printer.cpp | 2 +- pcbnew/dialog_track_options.cpp | 1 + pcbnew/drc.cpp | 3 +- pcbnew/edgemod.cpp | 3 +- pcbnew/edit.cpp | 1 + pcbnew/edit_pcb_text.cpp | 2 +- pcbnew/edit_track_width.cpp | 3 +- pcbnew/editedge.cpp | 3 +- pcbnew/editmod.cpp | 2 +- pcbnew/editrack-part2.cpp | 3 +- pcbnew/editrack.cpp | 5 +- pcbnew/export_gencad.cpp | 5 +- pcbnew/files.cpp | 3 +- pcbnew/find.cpp | 1 + pcbnew/gen_modules_placefile.cpp | 1 + pcbnew/gendrill.cpp | 3 +- pcbnew/hotkeys.cpp | 1 + pcbnew/initpcb.cpp | 2 +- pcbnew/ioascii.cpp | 1 + pcbnew/librairi.cpp | 1 + pcbnew/loadcmp.cpp | 1 + pcbnew/menubarmodedit.cpp | 11 +- pcbnew/menubarpcb.cpp | 1 + pcbnew/mirepcb.cpp | 3 +- pcbnew/modedit.cpp | 1 + pcbnew/modedit_onclick.cpp | 5 +- pcbnew/modedit_undo_redo.cpp | 2 +- pcbnew/modeditoptions.cpp | 7 +- pcbnew/moduleframe.cpp | 1 + pcbnew/modules.cpp | 1 + pcbnew/move_or_drag_track.cpp | 3 +- pcbnew/muonde.cpp | 1 + pcbnew/muwave_command.cpp | 1 + pcbnew/netlist.cpp | 1 + pcbnew/onleftclick.cpp | 5 +- pcbnew/onrightclick.cpp | 5 +- pcbnew/pcbcfg.cpp | 1 + pcbnew/pcbframe.cpp | 3 +- pcbnew/pcbnew.cpp | 1 + pcbnew/pcbplot.cpp | 13 +- pcbnew/router.cpp | 1 + pcbnew/set_color.cpp | 8 +- pcbnew/set_color.h | 4 - pcbnew/solve.cpp | 2 +- pcbnew/specctra_import.cpp | 1 + pcbnew/surbrill.cpp | 2 +- pcbnew/swap_layers.cpp | 1 + pcbnew/tool_modedit.cpp | 1 + pcbnew/tool_onrightclick.cpp | 5 +- pcbnew/tool_pcb.cpp | 3 +- pcbnew/tracepcb.cpp | 2 +- pcbnew/via_edit.cpp | 4 +- pcbnew/xchgmod.cpp | 1 + pcbnew/zone_filling_algorithm.cpp | 1 + pcbnew/zones_by_polygon.cpp | 1 + pcbnew/zones_non_copper_type_functions.cpp | 1 + 84 files changed, 477 insertions(+), 407 deletions(-) create mode 100644 include/wxBasePcbFrame.h diff --git a/include/pcbstruct.h b/include/pcbstruct.h index 1672782073..70065342bb 100644 --- a/include/pcbstruct.h +++ b/include/pcbstruct.h @@ -129,7 +129,7 @@ class RATSNEST_ITEM; /* main window classes : */ -#include "wxPcbStruct.h" +#include "wxBasePcbFrame.h" /* Class to handle a board */ #include "class_board.h" diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h new file mode 100644 index 0000000000..1c646df7e8 --- /dev/null +++ b/include/wxBasePcbFrame.h @@ -0,0 +1,368 @@ +/***********************************************************/ +/* wxPcbStruct.h: */ +/* Classes used in pcbnew, cvpcb and gerbview */ +/***********************************************************/ + +#ifndef WX_BASE_PCB_FRAME_H +#define WX_BASE_PCB_FRAME_H + + +#include + +#include "wxstruct.h" +#include "base_struct.h" + +#ifndef PCB_INTERNAL_UNIT +#define PCB_INTERNAL_UNIT 10000 +#endif + + +/* Forward declarations of classes. */ +class PCB_SCREEN; +class WinEDA_Toolbar; +class WinEDA_CvpcbFrame; +class WinEDA_PcbFrame; +class WinEDA_ModuleEditFrame; +class BOARD; +class TEXTE_PCB; +class MODULE; +class TRACK; +class SEGZONE; +class SEGVIA; +class D_PAD; +class TEXTE_MODULE; +class MIREPCB; +class COTATION; +class EDGE_MODULE; +class WinEDA3D_DrawFrame; +class DRC; +class ZONE_CONTAINER; +class DRAWSEGMENT; +class GENERAL_COLLECTOR; +class GENERAL_COLLECTORS_GUIDE; + + +/******************************************************************/ +/* class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview */ +/******************************************************************/ + +class WinEDA_BasePcbFrame : public WinEDA_DrawFrame +{ +public: + + bool m_DisplayPadFill; // How show pads + bool m_DisplayPadNum; // show pads numbers + + int m_DisplayModEdge; // How show module drawings + int m_DisplayModText; // How show module texts + bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode, TRUE = filled */ + int m_UserGridUnits; + wxRealPoint m_UserGridSize; + + WinEDA3D_DrawFrame* m_Draw3DFrame; + WinEDA_ModuleEditFrame* m_ModuleEditFrame; + +protected: + BOARD* m_Pcb; + GENERAL_COLLECTOR* m_Collector; + +public: + WinEDA_BasePcbFrame( wxWindow* father, int idtype, + const wxString& title, + const wxPoint& pos, const wxSize& size, + long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); + + ~WinEDA_BasePcbFrame(); + + /** + * Function SetBoard + * sets the m_Pcb member in such as way as to ensure deleting any previous + * BOARD. + * @param aBoard The BOARD to put into the frame. + */ + void SetBoard( BOARD* aBoard ); + + BOARD* GetBoard() + { + wxASSERT( m_Pcb ); // phasing out m_Pcb for gerbview + return m_Pcb; + } + + + // General + virtual void OnCloseWindow( wxCloseEvent& Event ) = 0; + virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { } + virtual void ReCreateHToolbar() = 0; + virtual void ReCreateVToolbar() = 0; + virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; + virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0; + virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; + virtual void ReCreateMenuBar(); + virtual void SetToolID( int id, int new_cursor_id, + const wxString& title ); + virtual void UpdateStatusBar(); + + PCB_SCREEN* GetScreen() const { return (PCB_SCREEN*) WinEDA_DrawFrame::GetBaseScreen(); } + + BASE_SCREEN* GetBaseScreen() const; + + int BestZoom(); + + virtual void Show3D_Frame( wxCommandEvent& event ); + +public: + + // Read/write fonctions: + EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum ); + int ReadListeSegmentDescr( FILE* File, + TRACK* PtSegm, int StructType, + int* LineNum, int NumSegm ); + + int ReadSetup( FILE* File, int* LineNum ); + int ReadGeneralDescrPcb( FILE* File, int* LineNum ); + + // PCB handling + bool Clear_Pcb( bool query ); + + + /** + * Function PcbGeneralLocateAndDisplay + * searches for an item under the mouse cursor. + * Items are searched first on the current working layer. + * If nothing found, an item will be searched without layer restriction. If + * more than one item is found meeting the current working layer criterion, then + * a popup menu is shown which allows the user to pick which item he/she is + * interested in. Once an item is chosen, then it is make the "current item" + * and the status window is updated to reflect this. + * + * @param aHotKeyCode The hotkey which relates to the caller and determines the + * type of search to be performed. If zero, then the mouse tools will be + * tested instead. + */ + BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 ); + + void ProcessItemSelection( wxCommandEvent& event ); + + /** + * Function SetCurItem + * sets the currently selected item and displays it in the MsgPanel. + * If the given item is NULL then the MsgPanel is erased and there is no + * currently selected item. This function is intended to make the process + * of "selecting" an item more formal, and to indivisibly tie the operation + * of selecting an item to displaying it using BOARD_ITEM::Display_Infos(). + * @param aItem The BOARD_ITEM to make the selected item or NULL if none. + */ + void SetCurItem( BOARD_ITEM* aItem ); + BOARD_ITEM* GetCurItem(); + + /** + * Function GetCollectorsGuide + * @return GENERAL_COLLECTORS_GUIDE - that considers the global configuration options. + */ + GENERAL_COLLECTORS_GUIDE GetCollectorsGuide(); + + + /** + * Function CursorGoto + * positions the cursor at a given coordinate and reframes the drawing if the + * requested point is out of view. + * @param aPos The point to go to. + */ + void CursorGoto( const wxPoint& aPos ); + + + /* Place un repere sur l'ecran au point de coordonnees PCB pos */ + void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap, + int DrawMode, int color, int type ); + + // Gestion des modules + void InstallModuleOptionsFrame( MODULE* Module, wxDC * DC ); + MODULE* Copie_Module( MODULE* module ); + MODULE* Exchange_Module( wxWindow* winaff, + MODULE* old_module, + MODULE* new_module ); + + /** Function Save_Module_In_Library + * Save in an existing library a given footprint + * @param aLibName = name of the library to use + * @param aModule = the given footprint + * @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found + * @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name + * @param aCreateDocFile = true to creates the associated doc file + * @return : 1 if OK,0 if abort + */ + int Save_Module_In_Library( const wxString& aLibName, + MODULE* aModule, bool aOverwrite, + bool aDisplayDialog, bool aCreateDocFile ); + + void Archive_Modules( const wxString& LibName, bool NewModulesOnly ); + MODULE* Select_1_Module_From_BOARD( BOARD* Pcb ); + MODULE* GetModuleByName(); + + // Modules (footprints) + MODULE* Create_1_Module( wxDC* DC, const wxString& module_name ); + void Edit_Module( MODULE* module, wxDC* DC ); + void Rotate_Module( wxDC* DC, + MODULE* module, + int angle, + bool incremental ); + void Place_Module( MODULE* module, wxDC* DC, bool aDoNotRecreateRatsnest = false ); + void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); + + // Graphic items edition: + void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC ); + + // module texts + void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ); + void DeleteTextModule( TEXTE_MODULE* Text ); + void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ); + void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC ); + TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC ); + + void InstallPadOptionsFrame( D_PAD* pad, wxDC* DC, const wxPoint& pos ); + void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, + wxDC* DC, const wxPoint& pos ); + + // Pads sur modules + void AddPad( MODULE* Module, bool draw ); + void DeletePad( D_PAD* Pad ); + void StartMovePad( D_PAD* Pad, wxDC* DC ); + void RotatePad( D_PAD* Pad, wxDC* DC ); + void PlacePad( D_PAD* Pad, wxDC* DC ); + void Export_Pad_Settings( D_PAD* aPad ); + void Import_Pad_Settings( D_PAD* aPad, bool aDraw ); + void Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw ); + + + // loading footprints + /** function Get_Librairie_Module + * + * Read active libraries or one library to find and load a given module + * If found the lodule is linked to the tail of linked list of modules + * @param aLibrary: the full filename of the library to read. If empty, all active libraries are read + * @param aModuleName = module name to load + * @param aDisplayMessageError = true to display an error message if any. + * @return a MODULE * pointer to the new module, or NULL + * + */ + MODULE* Get_Librairie_Module( const wxString& aLibraryFullFilename, + const wxString& aModuleName, + bool aDisplayMessageError ); + + /** Function Select_1_Module_From_List + * Display a list of modules found in active libraries or a given library + * @param aLibraryFullFilename = library to list (if aLibraryFullFilename == void, list all modules) + * @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used ) + * @param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list + * ( aKeyWord = wxEmptyString if not used ) + * + * @return wxEmptyString if abort or fails, or the selected module name if Ok + */ + wxString Select_1_Module_From_List( + WinEDA_DrawFrame* active_window, const wxString& aLibraryFullFilename, + const wxString& aMask, const wxString& aKeyWord ); + + MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); + + // ratsnest functions + void Compile_Ratsnest( wxDC* DC, bool affiche ); /* Recalcul complet du chevelu */ + int Test_1_Net_Ratsnest( wxDC* DC, int net_code ); + void build_ratsnest_module( wxDC* DC, MODULE* Module ); + void trace_ratsnest_module( wxDC* DC ); + void Build_Board_Ratsnest( wxDC* DC ); + void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 ); + void trace_ratsnest_pad( wxDC* DC ); + void build_ratsnest_pad( BOARD_ITEM* ref, + const wxPoint& refpos, + bool init ); + + void Tst_Ratsnest( wxDC* DC, int ref_netcode ); + void test_connexions( wxDC* DC ); + void test_1_net_connexion( wxDC* DC, int net_code ); + void RecalculateAllTracksNetcode( ); + + // Plotting + void ToPlotter( wxCommandEvent& event ); + void Genere_GERBER( const wxString& FullFileName, int Layer, + bool PlotOriginIsAuxAxis, + GRTraceMode trace_mode ); + void Genere_HPGL( const wxString& FullFileName, int Layer, + GRTraceMode trace_mode); + void Genere_PS( const wxString& FullFileName, int Layer, + bool useA4, GRTraceMode trace_mode ); + void Genere_DXF( const wxString& FullFileName, int Layer, + GRTraceMode trace_mode); + void Plot_Layer(Plotter *plotter, int Layer, GRTraceMode trace_mode ); + void Plot_Standard_Layer( Plotter *plotter, int masque_layer, + int garde, bool trace_via, + GRTraceMode trace_mode ); + void Plot_Serigraphie( Plotter *plotter, int masque_layer, + GRTraceMode trace_mode); + void PlotDrillMark(Plotter *plotter, GRTraceMode trace_mode ); + + /** Function SaveCopyInUndoList (virtual pure) + * Creates a new entry in undo list of commands. + * add a picker to handle aItemToCopy + * @param aItemToCopy = the board item modified by the command to undo + * @param aTypeCommand = command type (see enum UndoRedoOpType) + * @param aTransformPoint = the reference point of the transformation, for commands like move + */ + virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy, UndoRedoOpType aTypeCommand, + const wxPoint& aTransformPoint = wxPoint(0,0) ) = 0; + + /* Block operations: */ + /** + * Function Block_Delete + * deletes all tracks and segments within the selected block. + * Defined separately in pcbnew and gerbview + * + * @param DC A device context to draw on. + */ + void Block_Delete( wxDC* DC ); + void Block_Rotate( wxDC* DC ); + void Block_Invert( wxDC* DC ); + /** + * Function Block_Move + * moves all tracks and segments within the selected block. + * New location is determined by the current offset from the selected block's original location. + * Defined separately in pcbnew and gerbview + * + * @param DC A device context to draw on. + */ + void Block_Move( wxDC* DC ); + /** + * Function Block_Mirror_X + * mirrors all tracks and segments within the currently selected block in the X axis. + * + * @param DC A device context to draw on. + */ + void Block_Mirror_X( wxDC* DC ); + /** + * Function Block_Duplicate + * copies-and-moves all tracks and segments within the selected block. + * New location is determined by the current offset from the selected block's original location. + * Defined separately in pcbnew and gerbview + * + * @param DC A device context to draw on. + */ + void Block_Duplicate( wxDC* DC ); + + + // layerhandling: + // (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided) + int SelectLayer( int default_layer, int min_layer, int max_layer, + bool null_layer = false ); + void SelectLayerPair(); + virtual void SwitchLayer( wxDC* DC, int layer ); + + // divers + void AddHistory( int value, KICAD_T type ); // Add value in data list history + void InstallGridFrame( const wxPoint& pos ); + + virtual void LoadSettings(); + virtual void SaveSettings(); + + DECLARE_EVENT_TABLE() +}; + +#endif /* WX_BASE_PCB_FRAME_H */ diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 63ebac233b..c4d397ce10 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1,6 +1,5 @@ /***********************************************************/ -/* wxPcbStruct.h: */ -/* Classes used in pcbnew, cvpcb and gerbview */ +/* wxPcbStruct.h */ /***********************************************************/ #ifndef WXPCB_STRUCT_H @@ -20,7 +19,6 @@ /* Forward declarations of classes. */ class PCB_SCREEN; class WinEDA_Toolbar; -class WinEDA_PcbFrame; class WinEDA_ModuleEditFrame; class BOARD; class TEXTE_PCB; @@ -41,334 +39,16 @@ class GENERAL_COLLECTOR; class GENERAL_COLLECTORS_GUIDE; -/******************************************************************/ -/* class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview */ -/******************************************************************/ +/** + * @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview +*/ -class WinEDA_BasePcbFrame : public WinEDA_DrawFrame -{ -public: - - bool m_DisplayPadFill; // How show pads - bool m_DisplayPadNum; // show pads numbers - - int m_DisplayModEdge; // How show module drawings - int m_DisplayModText; // How show module texts - bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode, TRUE = filled */ - int m_UserGridUnits; - wxRealPoint m_UserGridSize; - - WinEDA3D_DrawFrame* m_Draw3DFrame; - WinEDA_ModuleEditFrame* m_ModuleEditFrame; - -protected: - BOARD* m_Pcb; - GENERAL_COLLECTOR* m_Collector; - -public: - WinEDA_BasePcbFrame( wxWindow* father, int idtype, - const wxString& title, - const wxPoint& pos, const wxSize& size, - long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); - - ~WinEDA_BasePcbFrame(); - - /** - * Function SetBoard - * sets the m_Pcb member in such as way as to ensure deleting any previous - * BOARD. - * @param aBoard The BOARD to put into the frame. - */ - void SetBoard( BOARD* aBoard ); - - BOARD* GetBoard() - { - wxASSERT( m_Pcb ); // phasing out m_Pcb for gerbview - return m_Pcb; - } - - - // General - virtual void OnCloseWindow( wxCloseEvent& Event ) = 0; - virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { } - virtual void ReCreateHToolbar() = 0; - virtual void ReCreateVToolbar() = 0; - virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; - virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0; - virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; - virtual void ReCreateMenuBar(); - virtual void SetToolID( int id, int new_cursor_id, - const wxString& title ); - virtual void UpdateStatusBar(); - - PCB_SCREEN* GetScreen() const { return (PCB_SCREEN*) WinEDA_DrawFrame::GetBaseScreen(); } - - BASE_SCREEN* GetBaseScreen() const; - - int BestZoom(); - - virtual void Show3D_Frame( wxCommandEvent& event ); - -public: - - // Read/write fonctions: - EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum ); - int ReadListeSegmentDescr( FILE* File, - TRACK* PtSegm, int StructType, - int* LineNum, int NumSegm ); - - int ReadSetup( FILE* File, int* LineNum ); - int ReadGeneralDescrPcb( FILE* File, int* LineNum ); - - // PCB handling - bool Clear_Pcb( bool query ); - - - /** - * Function PcbGeneralLocateAndDisplay - * searches for an item under the mouse cursor. - * Items are searched first on the current working layer. - * If nothing found, an item will be searched without layer restriction. If - * more than one item is found meeting the current working layer criterion, then - * a popup menu is shown which allows the user to pick which item he/she is - * interested in. Once an item is chosen, then it is make the "current item" - * and the status window is updated to reflect this. - * - * @param aHotKeyCode The hotkey which relates to the caller and determines the - * type of search to be performed. If zero, then the mouse tools will be - * tested instead. - */ - BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 ); - - void ProcessItemSelection( wxCommandEvent& event ); - - /** - * Function SetCurItem - * sets the currently selected item and displays it in the MsgPanel. - * If the given item is NULL then the MsgPanel is erased and there is no - * currently selected item. This function is intended to make the process - * of "selecting" an item more formal, and to indivisibly tie the operation - * of selecting an item to displaying it using BOARD_ITEM::Display_Infos(). - * @param aItem The BOARD_ITEM to make the selected item or NULL if none. - */ - void SetCurItem( BOARD_ITEM* aItem ); - BOARD_ITEM* GetCurItem(); - - /** - * Function GetCollectorsGuide - * @return GENERAL_COLLECTORS_GUIDE - that considers the global configuration options. - */ - GENERAL_COLLECTORS_GUIDE GetCollectorsGuide(); - - - /** - * Function CursorGoto - * positions the cursor at a given coordinate and reframes the drawing if the - * requested point is out of view. - * @param aPos The point to go to. - */ - void CursorGoto( const wxPoint& aPos ); - - - /* Place un repere sur l'ecran au point de coordonnees PCB pos */ - void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap, - int DrawMode, int color, int type ); - - // Gestion des modules - void InstallModuleOptionsFrame( MODULE* Module, wxDC * DC ); - MODULE* Copie_Module( MODULE* module ); - MODULE* Exchange_Module( wxWindow* winaff, - MODULE* old_module, - MODULE* new_module ); - - /** Function Save_Module_In_Library - * Save in an existing library a given footprint - * @param aLibName = name of the library to use - * @param aModule = the given footprint - * @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found - * @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name - * @param aCreateDocFile = true to creates the associated doc file - * @return : 1 if OK,0 if abort - */ - int Save_Module_In_Library( const wxString& aLibName, - MODULE* aModule, bool aOverwrite, - bool aDisplayDialog, bool aCreateDocFile ); - - void Archive_Modules( const wxString& LibName, bool NewModulesOnly ); - MODULE* Select_1_Module_From_BOARD( BOARD* Pcb ); - MODULE* GetModuleByName(); - - // Modules (footprints) - MODULE* Create_1_Module( wxDC* DC, const wxString& module_name ); - void Edit_Module( MODULE* module, wxDC* DC ); - void Rotate_Module( wxDC* DC, - MODULE* module, - int angle, - bool incremental ); - void Place_Module( MODULE* module, wxDC* DC, bool aDoNotRecreateRatsnest = false ); - void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); - - // Graphic items edition: - void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC ); - - // module texts - void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ); - void DeleteTextModule( TEXTE_MODULE* Text ); - void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ); - void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC ); - TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC ); - - void InstallPadOptionsFrame( D_PAD* pad, wxDC* DC, const wxPoint& pos ); - void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, - wxDC* DC, const wxPoint& pos ); - - // Pads sur modules - void AddPad( MODULE* Module, bool draw ); - void DeletePad( D_PAD* Pad ); - void StartMovePad( D_PAD* Pad, wxDC* DC ); - void RotatePad( D_PAD* Pad, wxDC* DC ); - void PlacePad( D_PAD* Pad, wxDC* DC ); - void Export_Pad_Settings( D_PAD* aPad ); - void Import_Pad_Settings( D_PAD* aPad, bool aDraw ); - void Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw ); - - - // loading footprints - /** function Get_Librairie_Module - * - * Read active libraries or one library to find and load a given module - * If found the lodule is linked to the tail of linked list of modules - * @param aLibrary: the full filename of the library to read. If empty, all active libraries are read - * @param aModuleName = module name to load - * @param aDisplayMessageError = true to display an error message if any. - * @return a MODULE * pointer to the new module, or NULL - * - */ - MODULE* Get_Librairie_Module( const wxString& aLibraryFullFilename, - const wxString& aModuleName, - bool aDisplayMessageError ); - - /** Function Select_1_Module_From_List - * Display a list of modules found in active libraries or a given library - * @param aLibraryFullFilename = library to list (if aLibraryFullFilename == void, list all modules) - * @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used ) - * @param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list - * ( aKeyWord = wxEmptyString if not used ) - * - * @return wxEmptyString if abort or fails, or the selected module name if Ok - */ - wxString Select_1_Module_From_List( - WinEDA_DrawFrame* active_window, const wxString& aLibraryFullFilename, - const wxString& aMask, const wxString& aKeyWord ); - - MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); - - // ratsnest functions - void Compile_Ratsnest( wxDC* DC, bool affiche ); /* Recalcul complet du chevelu */ - int Test_1_Net_Ratsnest( wxDC* DC, int net_code ); - void build_ratsnest_module( wxDC* DC, MODULE* Module ); - void trace_ratsnest_module( wxDC* DC ); - void Build_Board_Ratsnest( wxDC* DC ); - void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 ); - void trace_ratsnest_pad( wxDC* DC ); - void build_ratsnest_pad( BOARD_ITEM* ref, - const wxPoint& refpos, - bool init ); - - void Tst_Ratsnest( wxDC* DC, int ref_netcode ); - void test_connexions( wxDC* DC ); - void test_1_net_connexion( wxDC* DC, int net_code ); - void RecalculateAllTracksNetcode( ); - - // Plotting - void ToPlotter( wxCommandEvent& event ); - void Genere_GERBER( const wxString& FullFileName, int Layer, - bool PlotOriginIsAuxAxis, - GRTraceMode trace_mode ); - void Genere_HPGL( const wxString& FullFileName, int Layer, - GRTraceMode trace_mode); - void Genere_PS( const wxString& FullFileName, int Layer, - bool useA4, GRTraceMode trace_mode ); - void Genere_DXF( const wxString& FullFileName, int Layer, - GRTraceMode trace_mode); - void Plot_Layer(Plotter *plotter, int Layer, GRTraceMode trace_mode ); - void Plot_Standard_Layer( Plotter *plotter, int masque_layer, - int garde, bool trace_via, - GRTraceMode trace_mode ); - void Plot_Serigraphie( Plotter *plotter, int masque_layer, - GRTraceMode trace_mode); - void PlotDrillMark(Plotter *plotter, GRTraceMode trace_mode ); - - /** Function SaveCopyInUndoList (virtual pure) - * Creates a new entry in undo list of commands. - * add a picker to handle aItemToCopy - * @param aItemToCopy = the board item modified by the command to undo - * @param aTypeCommand = command type (see enum UndoRedoOpType) - * @param aTransformPoint = the reference point of the transformation, for commands like move - */ - virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy, UndoRedoOpType aTypeCommand, - const wxPoint& aTransformPoint = wxPoint(0,0) ) = 0; - - /* Block operations: */ - /** - * Function Block_Delete - * deletes all tracks and segments within the selected block. - * Defined separately in pcbnew and gerbview - * - * @param DC A device context to draw on. - */ - void Block_Delete( wxDC* DC ); - void Block_Rotate( wxDC* DC ); - void Block_Invert( wxDC* DC ); - /** - * Function Block_Move - * moves all tracks and segments within the selected block. - * New location is determined by the current offset from the selected block's original location. - * Defined separately in pcbnew and gerbview - * - * @param DC A device context to draw on. - */ - void Block_Move( wxDC* DC ); - /** - * Function Block_Mirror_X - * mirrors all tracks and segments within the currently selected block in the X axis. - * - * @param DC A device context to draw on. - */ - void Block_Mirror_X( wxDC* DC ); - /** - * Function Block_Duplicate - * copies-and-moves all tracks and segments within the selected block. - * New location is determined by the current offset from the selected block's original location. - * Defined separately in pcbnew and gerbview - * - * @param DC A device context to draw on. - */ - void Block_Duplicate( wxDC* DC ); - - - // layerhandling: - // (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided) - int SelectLayer( int default_layer, int min_layer, int max_layer, - bool null_layer = false ); - void SelectLayerPair(); - virtual void SwitchLayer( wxDC* DC, int layer ); - - // divers - void AddHistory( int value, KICAD_T type ); // Add value in data list history - void InstallGridFrame( const wxPoint& pos ); - - virtual void LoadSettings(); - virtual void SaveSettings(); - - DECLARE_EVENT_TABLE() -}; /*****************************************************/ -/* class WinEDA_PcbFrame: public WinEDA_BasePcbFrame */ +/* class WinEDA_PcbFrame: the main frame for Pcbnew */ /*****************************************************/ -class WinEDA_PcbFrame : public WinEDA_BasePcbFrame +class WinEDA_PcbFrame: public WinEDA_BasePcbFrame { public: WinEDAChoiceBox* m_SelLayerBox; diff --git a/pcbnew/attribut.cpp b/pcbnew/attribut.cpp index 2f57482aa3..37017ae2d2 100644 --- a/pcbnew/attribut.cpp +++ b/pcbnew/attribut.cpp @@ -7,6 +7,7 @@ #include "class_drawpanel.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "protos.h" diff --git a/pcbnew/automove.cpp b/pcbnew/automove.cpp index 3e8b938c5e..9893b1e80f 100644 --- a/pcbnew/automove.cpp +++ b/pcbnew/automove.cpp @@ -12,6 +12,7 @@ #include "confirm.h" #include "kicad_string.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "cell.h" #include "id.h" diff --git a/pcbnew/autoplac.cpp b/pcbnew/autoplac.cpp index a8f7c5fc17..a32a7e2bef 100644 --- a/pcbnew/autoplac.cpp +++ b/pcbnew/autoplac.cpp @@ -10,6 +10,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "zones.h" #include "cell.h" diff --git a/pcbnew/autorout.cpp b/pcbnew/autorout.cpp index bc67f7714b..c0bdd12b84 100644 --- a/pcbnew/autorout.cpp +++ b/pcbnew/autorout.cpp @@ -8,6 +8,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "cell.h" #include "zones.h" diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index edc489714e..91faab1f3c 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -11,6 +11,7 @@ #include "block_commande.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "pcbplot.h" #include "trigo.h" diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 0479a30edd..e2e83156eb 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -12,6 +12,7 @@ #include "block_commande.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "pcbplot.h" #include "trigo.h" diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 25b2b79d05..a512da4f75 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -7,6 +7,7 @@ #include "class_drawpanel.h" #include "pcbnew.h" +#include "wxPcbStruct.h" /* Functions to undo and redo edit commands. * commmands to undo are stored in CurrentScreen->m_UndoList diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index 637156c341..887a8ac1cc 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -7,6 +7,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index b86ccef695..ab66ca7fef 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -854,7 +854,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) { wxString msg; int text_pos; - BOARD* board = ( (WinEDA_PcbFrame*) frame )->GetBoard(); + BOARD* board = ( (WinEDA_BasePcbFrame*)frame)->GetBoard(); #ifdef RATSNET_DEBUG DbgDisplayTrackInfos( this ); diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 3bba06ddf9..a3f0ead2f6 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -883,7 +883,7 @@ void ZONE_CONTAINER::DisplayInfo( WinEDA_DrawFrame* frame ) { if( GetNet() >= 0 ) { - NETINFO_ITEM* equipot = ( (WinEDA_PcbFrame*) frame )->GetBoard()->FindNet( GetNet() ); + NETINFO_ITEM* equipot = ( (WinEDA_BasePcbFrame*) frame )->GetBoard()->FindNet( GetNet() ); if( equipot ) msg = equipot->GetNetname(); diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index f026a0e18c..ca7dfdcc73 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -11,6 +11,7 @@ #include "class_drawpanel.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "protos.h" diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 6437fb79c9..72160c1096 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -8,6 +8,7 @@ #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" #include "id.h" diff --git a/pcbnew/cotation.cpp b/pcbnew/cotation.cpp index d3c5c9e7a3..177012dab4 100644 --- a/pcbnew/cotation.cpp +++ b/pcbnew/cotation.cpp @@ -6,7 +6,7 @@ #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" /* Routines Locales */ static void Exit_EditCotation( WinEDA_DrawPanel* Panel, wxDC* DC ); diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 5e883802af..a145ab2c52 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -15,6 +15,7 @@ #include "appl_wxstruct.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "eda_dde.h" #include "id.h" #include "collectors.h" diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 01a65636fd..96ff075bf4 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -4,11 +4,13 @@ /*********************************************/ #include "fctsys.h" -#include "gr_basic.h" + #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" + #include "protos.h" diff --git a/pcbnew/dialog_copper_zones.cpp b/pcbnew/dialog_copper_zones.cpp index 93d8c2993a..98010861c2 100644 --- a/pcbnew/dialog_copper_zones.cpp +++ b/pcbnew/dialog_copper_zones.cpp @@ -16,6 +16,7 @@ #include "confirm.h" #include "PolyLine.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "trigo.h" #include "autorout.h" #include "zones.h" diff --git a/pcbnew/dialog_design_rules.cpp b/pcbnew/dialog_design_rules.cpp index 8d94b2a612..e7d893e804 100644 --- a/pcbnew/dialog_design_rules.cpp +++ b/pcbnew/dialog_design_rules.cpp @@ -12,6 +12,7 @@ #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" #include "dialog_design_rules.h" diff --git a/pcbnew/dialog_display_options.cpp b/pcbnew/dialog_display_options.cpp index b7310e6842..8cbdf18787 100644 --- a/pcbnew/dialog_display_options.cpp +++ b/pcbnew/dialog_display_options.cpp @@ -10,6 +10,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" diff --git a/pcbnew/dialog_drc.cpp b/pcbnew/dialog_drc.cpp index 5121e1172b..2db46eeaa6 100644 --- a/pcbnew/dialog_drc.cpp +++ b/pcbnew/dialog_drc.cpp @@ -10,6 +10,7 @@ #include "wxstruct.h" #include "dialog_drc.h" #include "common.h" +#include "wxPcbStruct.h" /* class DIALOG_DRC_CONTROL: a dialog to set DRC parameters (clearance, min cooper size) * and run DRC tests diff --git a/pcbnew/dialog_freeroute_exchange.cpp b/pcbnew/dialog_freeroute_exchange.cpp index 5fca672483..a08412772f 100644 --- a/pcbnew/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialog_freeroute_exchange.cpp @@ -20,6 +20,7 @@ #include "common.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_freeroute_exchange.h" diff --git a/pcbnew/dialog_general_options.cpp b/pcbnew/dialog_general_options.cpp index 5e9a123af1..1249b1eeed 100644 --- a/pcbnew/dialog_general_options.cpp +++ b/pcbnew/dialog_general_options.cpp @@ -11,6 +11,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" diff --git a/pcbnew/dialog_netlist.cpp b/pcbnew/dialog_netlist.cpp index 6a66c1af56..00ce199bda 100644 --- a/pcbnew/dialog_netlist.cpp +++ b/pcbnew/dialog_netlist.cpp @@ -7,6 +7,7 @@ #include "fctsys.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_netlist.h" diff --git a/pcbnew/dialog_orient_footprints.cpp b/pcbnew/dialog_orient_footprints.cpp index 2a41ab1fc7..f5c4129732 100644 --- a/pcbnew/dialog_orient_footprints.cpp +++ b/pcbnew/dialog_orient_footprints.cpp @@ -19,6 +19,7 @@ #include "confirm.h" #include "kicad_string.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_orient_footprints.h" diff --git a/pcbnew/dialog_pcb_text_properties.cpp b/pcbnew/dialog_pcb_text_properties.cpp index 9ac8f7cbf3..bb7aa1def0 100644 --- a/pcbnew/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialog_pcb_text_properties.cpp @@ -7,6 +7,7 @@ #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "drawtxt.h" #include "confirm.h" diff --git a/pcbnew/dialog_pcbnew_config_libs_and_paths.cpp b/pcbnew/dialog_pcbnew_config_libs_and_paths.cpp index f13354b23d..237ab8f00d 100644 --- a/pcbnew/dialog_pcbnew_config_libs_and_paths.cpp +++ b/pcbnew/dialog_pcbnew_config_libs_and_paths.cpp @@ -15,6 +15,7 @@ #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_pcbnew_config_libs_and_paths.h" diff --git a/pcbnew/dialog_print_using_printer.cpp b/pcbnew/dialog_print_using_printer.cpp index 60c403a146..4add0d3458 100644 --- a/pcbnew/dialog_print_using_printer.cpp +++ b/pcbnew/dialog_print_using_printer.cpp @@ -176,7 +176,7 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) msg = _( "Layer" ); msg << wxT( " " ) << ii + 1; #else - msg = ( (WinEDA_PcbFrame*) m_Parent )->GetBoard()->GetLayerName( ii ); + msg = ( (WinEDA_BasePcbFrame*) m_Parent )->GetBoard()->GetLayerName( ii ); #endif m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg ); diff --git a/pcbnew/dialog_track_options.cpp b/pcbnew/dialog_track_options.cpp index 227c73c56e..9cc3668b8c 100644 --- a/pcbnew/dialog_track_options.cpp +++ b/pcbnew/dialog_track_options.cpp @@ -10,6 +10,7 @@ #include "fctsys.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_track_options.h" diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index abb4fedb2d..1a6ebb5b56 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -31,8 +31,9 @@ #include "fctsys.h" #include "common.h" -#include "pcbnew.h" #include "class_drawpanel.h" +#include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "trigo.h" #include "gestfich.h" diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 13e8c64cb7..53fc9b50c9 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -10,14 +10,13 @@ */ #include "fctsys.h" -#include "gr_basic.h" #include "trigo.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" /* Routines Locales */ diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index bd04dc8e07..70029d533d 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -11,6 +11,7 @@ #include "id.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "protos.h" diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index c817aa1d3f..12dc133520 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -8,7 +8,7 @@ #include "class_drawpanel.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" /* Local functions */ static void Move_Texte_Pcb( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index ff8a0f0709..8e9f9c424e 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -4,13 +4,12 @@ /***************************************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "protos.h" /* Routines Locales */ diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index eb941c56fe..8aac87d297 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -5,12 +5,13 @@ /******************************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" + #include "protos.h" /* Routines Locales */ diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index d7f110b2ae..73673ee58a 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -9,7 +9,7 @@ #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "trigo.h" #include "bitmaps.h" #include "3d_struct.h" diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 00ddd513f2..7d8b941bb3 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -4,12 +4,13 @@ /*******************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" + #include "protos.h" diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index 598c46e339..e8e09337b0 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -4,17 +4,16 @@ /*******************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" -#include "protos.h" #include "drc_stuff.h" #include "trigo.h" +#include "protos.h" /* Routines Locales */ static void Exit_Editrack( WinEDA_DrawPanel* panel, wxDC* DC ); diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index 2996b84acd..59f472da00 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -10,12 +10,9 @@ #include "appl_wxstruct.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "trigo.h" -#include "bitmaps.h" -#include "protos.h" -#include "id.h" - bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame ); static void CreateTracksInfoData( FILE* file, BOARD* pcb ); static void CreateBoardSection( FILE* file, BOARD* pcb ); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 47f7b3c3d4..b3847e9a90 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -9,6 +9,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" #include "id.h" @@ -268,7 +269,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append ) // Display the loaded board: DrawPanel->Refresh( true); wxSafeYield(); // Needed if we want to see the board now. - + // Compile rastnest and displays net info Compile_Ratsnest( NULL, true ); GetBoard()->DisplayInfo( this ); diff --git a/pcbnew/find.cpp b/pcbnew/find.cpp index 543c28869d..c8bf396202 100644 --- a/pcbnew/find.cpp +++ b/pcbnew/find.cpp @@ -17,6 +17,7 @@ #include "confirm.h" #include "kicad_string.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp index a397032928..dfec840e2a 100644 --- a/pcbnew/gen_modules_placefile.cpp +++ b/pcbnew/gen_modules_placefile.cpp @@ -12,6 +12,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "trigo.h" #include "appl_wxstruct.h" diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 53ce0b6e9e..e6f6cc80e3 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -5,8 +5,6 @@ #include "fctsys.h" #include "appl_wxstruct.h" -using namespace std; - #include #include "common.h" @@ -16,6 +14,7 @@ using namespace std; #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "pcbplot.h" #include "macros.h" #include "appl_wxstruct.h" diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index c0631d06d2..9320f16549 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -5,6 +5,7 @@ #include "fctsys.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" #include "class_drawpanel.h" #include "confirm.h" diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index e4c9d5f6d3..aa3f670020 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -8,7 +8,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "protos.h" diff --git a/pcbnew/ioascii.cpp b/pcbnew/ioascii.cpp index 03b1acea85..370d4504a8 100644 --- a/pcbnew/ioascii.cpp +++ b/pcbnew/ioascii.cpp @@ -12,6 +12,7 @@ #include "kicad_string.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #ifdef PCBNEW #include "autorout.h" diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index fe46728c16..bb9edb6e9b 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -12,6 +12,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" /* diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 793c2b0d8d..1eda54bebd 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -14,6 +14,7 @@ #include "appl_wxstruct.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" class ModList diff --git a/pcbnew/menubarmodedit.cpp b/pcbnew/menubarmodedit.cpp index b805c49dc2..9a47bd39e5 100644 --- a/pcbnew/menubarmodedit.cpp +++ b/pcbnew/menubarmodedit.cpp @@ -2,14 +2,11 @@ /* menubarmodedit.cpp - creation du menu general de l'editeur de module*/ /***********************************************************************/ -#ifdef __GNUG__ -#pragma implementation -#endif - #include "fctsys.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "bitmaps.h" #include "protos.h" @@ -26,7 +23,7 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar() { wxMenuBar * menuBar = GetMenuBar(); wxMenuItem * item; - + if( ! menuBar ) { menuBar = new wxMenuBar(); @@ -52,14 +49,14 @@ wxMenuItem * item; item->SetBitmap(grid_xpm); sizes_menu->Append(item); - + //////////////// // Menu Help: // //////////////// wxMenu *helpMenu = new wxMenu; // Contents - item = new wxMenuItem(helpMenu , + item = new wxMenuItem(helpMenu , ID_GENERAL_HELP, _("&Contents"), // Menu entry name _("Open the pcbnew manual")); // Statusbar message diff --git a/pcbnew/menubarpcb.cpp b/pcbnew/menubarpcb.cpp index 599ee44622..f270742d73 100644 --- a/pcbnew/menubarpcb.cpp +++ b/pcbnew/menubarpcb.cpp @@ -5,6 +5,7 @@ #include "appl_wxstruct.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "bitmaps.h" #include "protos.h" #include "hotkeys.h" diff --git a/pcbnew/mirepcb.cpp b/pcbnew/mirepcb.cpp index 39f3e59f1f..e7ead52506 100644 --- a/pcbnew/mirepcb.cpp +++ b/pcbnew/mirepcb.cpp @@ -3,12 +3,11 @@ /*********************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" /* Routines Locales */ diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index affd470adf..34eb3429d3 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -14,6 +14,7 @@ #include "3d_viewer.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" #include "collectors.h" diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index b2a76e74c1..6bb148ae07 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -2,16 +2,13 @@ /* modedit_onclick.cpp */ /************************/ -#ifdef __GNUG__ -#pragma implementation -#endif - #include "fctsys.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "bitmaps.h" #include "protos.h" diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 99fdf6553d..a1de7b9a11 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -7,7 +7,7 @@ #include "common.h" #include "pcbnew.h" -#include "id.h" +#include "wxPcbStruct.h" #include "protos.h" diff --git a/pcbnew/modeditoptions.cpp b/pcbnew/modeditoptions.cpp index f78e8631da..7d6f99709c 100644 --- a/pcbnew/modeditoptions.cpp +++ b/pcbnew/modeditoptions.cpp @@ -9,22 +9,17 @@ */ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "pcbplot.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "id.h" #include "protos.h" -/* Fonctions locales */ - -/* variables locales */ /***********************************************************************/ diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index d8ad18fb37..3bc9f1eca1 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -12,6 +12,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "bitmaps.h" #include "protos.h" #include "id.h" diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 168016af1f..529eb6e640 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -11,6 +11,7 @@ #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "trigo.h" #include "protos.h" diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 74ac9a2d67..bcc9128630 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -4,13 +4,12 @@ /****************************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "trigo.h" #include "drag.h" diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 6d0cd6af63..0564d41e10 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -12,6 +12,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" /* Fonctions locales */ diff --git a/pcbnew/muwave_command.cpp b/pcbnew/muwave_command.cpp index d06c458a78..fa32a490e7 100644 --- a/pcbnew/muwave_command.cpp +++ b/pcbnew/muwave_command.cpp @@ -7,6 +7,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index d0802b4f7a..6df607fdc3 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -29,6 +29,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_netlist.h" diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 600bb06f16..3f8ea3f9b9 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -5,16 +5,13 @@ /**************************************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "id.h" -#include "protos.h" -#include "eda_dde.h" diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 807f2abb40..fc768b8387 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -10,11 +10,12 @@ #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" +//#include "autorout.h" #include "id.h" #include "hotkeys.h" #include "collectors.h" -#include "protos.h" +//#include "protos.h" /* Bitmaps */ diff --git a/pcbnew/pcbcfg.cpp b/pcbnew/pcbcfg.cpp index 60ecc420fc..d40307ee18 100644 --- a/pcbnew/pcbcfg.cpp +++ b/pcbnew/pcbcfg.cpp @@ -11,6 +11,7 @@ #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "pcbplot.h" #include "pcbcfg.h" #include "worksheet.h" diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 56d99b6a42..fa0fc40141 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -8,6 +8,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "collectors.h" #include "bitmaps.h" #include "protos.h" @@ -371,7 +372,7 @@ void WinEDA_PcbFrame::SetToolbars() size_t i; int ii, jj; bool state; - + if( m_ID_current_state == ID_TRACK_BUTT ) { if( Drc_On ) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index d5e7b26469..96585d9f8e 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -11,6 +11,7 @@ #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "plot_common.h" #include "gestfich.h" #include "pcbplot.h" diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 55d0f6ceb4..1b55de8c42 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -9,6 +9,7 @@ #include "confirm.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "pcbplot.h" #include "worksheet.h" #include "id.h" @@ -533,7 +534,7 @@ void WinEDA_PlotFrame::OnSetScaleOpt( wxCommandEvent& event ) /* Disable sheet reference for scale != 1:1 */ bool scale1 = (m_Scale_Opt->GetSelection() == 1); m_Plot_Sheet_Ref->Enable( scale1 ); - if (!scale1) + if (!scale1) m_Plot_Sheet_Ref->SetValue(false); } @@ -757,7 +758,7 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) break; case PLOT_FORMAT_DXF: - g_pcb_plot_options.Scale = 1.0; + g_pcb_plot_options.Scale = 1.0; ext = wxT( "dxf" ); wildcard = _( "DXF files (.dxf)|*.dxf" ); break; @@ -792,23 +793,23 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event ) switch( format ) { case PLOT_FORMAT_POST: - m_Parent->Genere_PS( fn.GetFullPath(), layer_to_plot, useA4(), + m_Parent->Genere_PS( fn.GetFullPath(), layer_to_plot, useA4(), g_pcb_plot_options.Trace_Mode ); break; case PLOT_FORMAT_GERBER: m_Parent->Genere_GERBER( fn.GetFullPath(), layer_to_plot, - s_PlotOriginIsAuxAxis, + s_PlotOriginIsAuxAxis, g_pcb_plot_options.Trace_Mode ); break; case PLOT_FORMAT_HPGL: - m_Parent->Genere_HPGL( fn.GetFullPath(), layer_to_plot, + m_Parent->Genere_HPGL( fn.GetFullPath(), layer_to_plot, g_pcb_plot_options.Trace_Mode ); break; case PLOT_FORMAT_DXF: - m_Parent->Genere_DXF( fn.GetFullPath(), layer_to_plot, + m_Parent->Genere_DXF( fn.GetFullPath(), layer_to_plot, g_pcb_plot_options.Trace_Mode ); break; } diff --git a/pcbnew/router.cpp b/pcbnew/router.cpp index f4820ee3f3..54fb6e9b0d 100644 --- a/pcbnew/router.cpp +++ b/pcbnew/router.cpp @@ -11,6 +11,7 @@ #include "kicad_string.h" #include "gestfich.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "zones.h" #include "cell.h" diff --git a/pcbnew/set_color.cpp b/pcbnew/set_color.cpp index b15f6465b1..c91731bbd5 100644 --- a/pcbnew/set_color.cpp +++ b/pcbnew/set_color.cpp @@ -5,17 +5,15 @@ /*Set up the items and layer colors and show/no show options */ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "set_color.h" -#endif - #include "fctsys.h" #include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" + +//#include "protos.h" // temporary variable used to handle grid visibility: bool s_showGrid; diff --git a/pcbnew/set_color.h b/pcbnew/set_color.h index 2e4a60045e..af87c9aa13 100644 --- a/pcbnew/set_color.h +++ b/pcbnew/set_color.h @@ -5,10 +5,6 @@ #ifndef SET_COLOR_H #define SET_COLOR_H -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "set_color.cpp" -#endif - #include "wx/statline.h" class wxBoxSizer; diff --git a/pcbnew/solve.cpp b/pcbnew/solve.cpp index a7ea6fd26c..649fb532ed 100644 --- a/pcbnew/solve.cpp +++ b/pcbnew/solve.cpp @@ -11,11 +11,11 @@ #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "zones.h" #include "protos.h" -#include #include "cell.h" /* Routines definies ici : */ diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index a02e66f4dd..4ee3323754 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -37,6 +37,7 @@ #include "class_drawpanel.h" // DrawPanel #include "confirm.h" // DisplayError() #include "gestfich.h" // EDA_FileSelector() +#include "wxPcbStruct.h" diff --git a/pcbnew/surbrill.cpp b/pcbnew/surbrill.cpp index d315864b19..de68160fda 100644 --- a/pcbnew/surbrill.cpp +++ b/pcbnew/surbrill.cpp @@ -9,7 +9,7 @@ #include "kicad_string.h" #include "pcbnew.h" -#include "protos.h" +#include "wxPcbStruct.h" #include "collectors.h" diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index 7b3568466b..2d510e5056 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -9,6 +9,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 0ed6f22032..289f303911 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -6,6 +6,7 @@ #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "protos.h" diff --git a/pcbnew/tool_onrightclick.cpp b/pcbnew/tool_onrightclick.cpp index 6e3bb2409c..1b2c6fb33a 100644 --- a/pcbnew/tool_onrightclick.cpp +++ b/pcbnew/tool_onrightclick.cpp @@ -3,16 +3,13 @@ /********************************************************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "confirm.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "id.h" -#include "protos.h" - /*****************************************************************/ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event ) diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 98b5e174d6..51f59ac2bf 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -6,8 +6,7 @@ #include "common.h" #include "pcbnew.h" - -#include "protos.h" +#include "wxPcbStruct.h" #include "bitmaps.h" diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index a35670544e..e9c4ac1e63 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -16,7 +16,7 @@ #include "class_drawpanel.h" #include "pcbnew.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "pcbplot.h" #include "protos.h" diff --git a/pcbnew/via_edit.cpp b/pcbnew/via_edit.cpp index c943ae14c0..cc3878ee70 100644 --- a/pcbnew/via_edit.cpp +++ b/pcbnew/via_edit.cpp @@ -3,11 +3,11 @@ /**********************************************/ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "id.h" @@ -105,7 +105,7 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via break; default: - DisplayError( this, wxT( "WinEDA_PcbFrame::Via_Edition() error: unknown command" ) ); + wxMessageBox( wxT( "WinEDA_PcbFrame::Via_Edition() error: unknown command" ) ); break; } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 4c2fe6df47..daeeb3049a 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -10,6 +10,7 @@ #include "confirm.h" #include "kicad_string.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "dialog_exchange_modules_base.h" diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index 5c5a0e936e..723c6f6ad8 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -9,6 +9,7 @@ #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "autorout.h" #include "zones.h" diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 6ccbab8fb5..eb518cf066 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -10,6 +10,7 @@ #include "class_drawpanel.h" #include "confirm.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "zones.h" #include "id.h" #include "protos.h" diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index b064e341af..cbc580073f 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -5,6 +5,7 @@ #include "confirm.h" #include "common.h" #include "pcbnew.h" +#include "wxPcbStruct.h" #include "zones.h"