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

657 lines
26 KiB

17 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
17 years ago
14 years ago
17 years ago
17 years ago
17 years ago
++PCBNew * Removed Pcb_Frame argument from BOARD() constructor, since it precludes having a BOARD being edited by more than one editor, it was a bad design. And this meant removing m_PcbFrame from BOARD. * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed, such as dialog_mask_clearance, dialog_drc, etc. * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it with build_version.h's #define BOARD_FILE_VERSION, although there may be a better place for this constant. * Made the public functions in PARAM_CFG_ARRAY be type const. void SaveParam(..) const and void ReadParam(..) const * PARAM_CFG_BASE now has virtual destructor since we have various way of destroying the derived class and boost::ptr_vector must be told about this. * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use an automatic PARAM_CFG_ARRAY which is on the stack.\ * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array, since it has to access the current BOARD and the BOARD can change. Remember BOARD_DESIGN_SETTINGS are now in the BOARD. * Made the m_BoundingBox member private, this was a brutally hard task, and indicative of the lack of commitment to accessors and object oriented design on the part of KiCad developers. We must do better. Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox(). * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
14 years ago
14 years ago
17 years ago
17 years ago
16 years ago
17 years ago
17 years ago
17 years ago
++PCBNew * Removed Pcb_Frame argument from BOARD() constructor, since it precludes having a BOARD being edited by more than one editor, it was a bad design. And this meant removing m_PcbFrame from BOARD. * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed, such as dialog_mask_clearance, dialog_drc, etc. * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it with build_version.h's #define BOARD_FILE_VERSION, although there may be a better place for this constant. * Made the public functions in PARAM_CFG_ARRAY be type const. void SaveParam(..) const and void ReadParam(..) const * PARAM_CFG_BASE now has virtual destructor since we have various way of destroying the derived class and boost::ptr_vector must be told about this. * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use an automatic PARAM_CFG_ARRAY which is on the stack.\ * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array, since it has to access the current BOARD and the BOARD can change. Remember BOARD_DESIGN_SETTINGS are now in the BOARD. * Made the m_BoundingBox member private, this was a brutally hard task, and indicative of the lack of commitment to accessors and object oriented design on the part of KiCad developers. We must do better. Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox(). * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
14 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
17 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
++PCBNew * Removed Pcb_Frame argument from BOARD() constructor, since it precludes having a BOARD being edited by more than one editor, it was a bad design. And this meant removing m_PcbFrame from BOARD. * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed, such as dialog_mask_clearance, dialog_drc, etc. * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it with build_version.h's #define BOARD_FILE_VERSION, although there may be a better place for this constant. * Made the public functions in PARAM_CFG_ARRAY be type const. void SaveParam(..) const and void ReadParam(..) const * PARAM_CFG_BASE now has virtual destructor since we have various way of destroying the derived class and boost::ptr_vector must be told about this. * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use an automatic PARAM_CFG_ARRAY which is on the stack.\ * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array, since it has to access the current BOARD and the BOARD can change. Remember BOARD_DESIGN_SETTINGS are now in the BOARD. * Made the m_BoundingBox member private, this was a brutally hard task, and indicative of the lack of commitment to accessors and object oriented design on the part of KiCad developers. We must do better. Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox(). * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
14 years ago
14 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
16 years ago
16 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
17 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
  6. * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, you may find one here:
  20. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  21. * or you may search the http://www.gnu.org website for the version 2 license,
  22. * or you may write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  24. */
  25. /**
  26. * @file wxBasePcbFrame.h
  27. * @brief Classes used in Pcbnew, CvPcb and GerbView.
  28. */
  29. #ifndef WX_BASE_PCB_FRAME_H_
  30. #define WX_BASE_PCB_FRAME_H_
  31. #include <vector>
  32. #include <draw_frame.h>
  33. #include <base_struct.h>
  34. #include <eda_text.h> // EDA_DRAW_MODE_T
  35. #include <richio.h>
  36. #include <class_pcb_screen.h>
  37. /* Forward declarations of classes. */
  38. class BOARD;
  39. class BOARD_CONNECTED_ITEM;
  40. class MODULE;
  41. class TRACK;
  42. class D_PAD;
  43. class TEXTE_MODULE;
  44. class EDA_3D_FRAME;
  45. class GENERAL_COLLECTOR;
  46. class GENERAL_COLLECTORS_GUIDE;
  47. class BOARD_DESIGN_SETTINGS;
  48. class ZONE_SETTINGS;
  49. class PCB_PLOT_PARAMS;
  50. class FP_LIB_TABLE;
  51. class FPID;
  52. class TOOL_MANAGER;
  53. class TOOL_DISPATCHER;
  54. /**
  55. * class PCB_BASE_FRAME
  56. * basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
  57. */
  58. class PCB_BASE_FRAME : public EDA_DRAW_FRAME
  59. {
  60. public:
  61. bool m_DisplayPadFill; // How show pads
  62. bool m_DisplayViaFill; // How show vias
  63. bool m_DisplayPadNum; // show pads numbers
  64. int m_DisplayModEdge; // How to display module drawings (line/ filled / sketch)
  65. int m_DisplayModText; // How to display module texts (line/ filled / sketch)
  66. bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled.
  67. EDA_UNITS_T m_UserGridUnit;
  68. wxRealPoint m_UserGridSize;
  69. int m_FastGrid1; // 1st fast grid setting (index in EDA_DRAW_FRAME::m_gridSelectBox)
  70. int m_FastGrid2; // 2nd fast grid setting (index in EDA_DRAW_FRAME::m_gridSelectBox)
  71. EDA_3D_FRAME* m_Draw3DFrame;
  72. protected:
  73. BOARD* m_Pcb;
  74. GENERAL_COLLECTOR* m_Collector;
  75. /// Auxiliary tool bar typically shown below the main tool bar at the top of the
  76. /// main window.
  77. wxAuiToolBar* m_auxiliaryToolBar;
  78. TOOL_MANAGER& m_toolManager;
  79. TOOL_DISPATCHER* m_toolDispatcher;
  80. void updateGridSelectBox();
  81. void updateZoomSelectBox();
  82. virtual void unitsChangeRefresh();
  83. /**
  84. * Function loadFootprint
  85. * attempts to load \a aFootprintId from the footprint library table.
  86. *
  87. * @param aFootprintId is the #FPID of component footprint to load.
  88. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the
  89. * libraries in the table returned from #FootprintLibs().
  90. * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error
  91. * occurs while reading footprint library files.
  92. */
  93. MODULE* loadFootprint( const FPID& aFootprintId )
  94. throw( IO_ERROR, PARSE_ERROR );
  95. ///> Rendering order of layers on GAL-based canvas (lower index in the array
  96. ///> means that layer is displayed closer to the user, ie. on the top).
  97. static const LAYER_NUM GAL_LAYER_ORDER[];
  98. public:
  99. PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
  100. const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
  101. long aStyle, const wxString& aFrameName );
  102. ~PCB_BASE_FRAME();
  103. /**
  104. * Function LoadFootprint
  105. * attempts to load \a aFootprintId from the footprint library table.
  106. *
  107. * @param aFootprintId is the #FPID of component footprint to load.
  108. * @return the #MODULE if found or NULL if \a aFootprintId not found in any of the
  109. * libraries in table returned from #FootprintLibs().
  110. */
  111. MODULE* LoadFootprint( const FPID& aFootprintId );
  112. /**
  113. * Function GetBoardBoundingBox
  114. * calculates the bounding box containing all board items (or board edge segments).
  115. * @param aBoardEdgesOnly is true if we are interested in board edge segments only.
  116. * @return EDA_RECT - the board's bounding box
  117. */
  118. EDA_RECT GetBoardBoundingBox( bool aBoardEdgesOnly = false ) const;
  119. void SetPageSettings( const PAGE_INFO& aPageSettings ); // overload
  120. const PAGE_INFO& GetPageSettings() const; // overload
  121. const wxSize GetPageSizeIU() const; // overload
  122. const wxPoint& GetAuxOrigin() const; // overload
  123. void SetAuxOrigin( const wxPoint& aPoint ); // overload
  124. const wxPoint& GetGridOrigin() const; // overload
  125. void SetGridOrigin( const wxPoint& aPoint ); // overload
  126. const TITLE_BLOCK& GetTitleBlock() const; // overload
  127. void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload
  128. /**
  129. * Function GetDesignSettings
  130. * returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame.
  131. * Overloaded in FOOTPRINT_EDIT_FRAME.
  132. */
  133. virtual BOARD_DESIGN_SETTINGS& GetDesignSettings() const;
  134. virtual void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSettings );
  135. const ZONE_SETTINGS& GetZoneSettings() const;
  136. void SetZoneSettings( const ZONE_SETTINGS& aSettings );
  137. /**
  138. * Function GetPlotSettings
  139. * returns the PCB_PLOT_PARAMS for the BOARD owned by this frame.
  140. * Overloaded in FOOTPRINT_EDIT_FRAME.
  141. */
  142. virtual const PCB_PLOT_PARAMS& GetPlotSettings() const;
  143. virtual void SetPlotSettings( const PCB_PLOT_PARAMS& aSettings );
  144. /**
  145. * Function SetBoard
  146. * sets the m_Pcb member in such as way as to ensure deleting any previous
  147. * BOARD.
  148. * @param aBoard The BOARD to put into the frame.
  149. */
  150. virtual void SetBoard( BOARD* aBoard );
  151. BOARD* GetBoard() const
  152. {
  153. wxASSERT( m_Pcb );
  154. return m_Pcb;
  155. }
  156. // General
  157. virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
  158. virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { }
  159. virtual void ReCreateHToolbar() = 0;
  160. virtual void ReCreateVToolbar() = 0;
  161. virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
  162. virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0;
  163. virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
  164. virtual void ReCreateMenuBar();
  165. virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg );
  166. virtual void UpdateStatusBar();
  167. PCB_SCREEN* GetScreen() const { return (PCB_SCREEN*) EDA_DRAW_FRAME::GetScreen(); }
  168. /**
  169. * Function BestZoom
  170. * @return the "best" zoom to show the entire board or footprint on the screen.
  171. */
  172. virtual double BestZoom();
  173. virtual void Show3D_Frame( wxCommandEvent& event );
  174. // Read/write functions:
  175. EDA_ITEM* ReadDrawSegmentDescr( LINE_READER* aReader );
  176. int ReadListeSegmentDescr( LINE_READER* aReader,
  177. TRACK* PtSegm,
  178. int StructType,
  179. int NumSegm );
  180. int ReadSetup( LINE_READER* aReader );
  181. int ReadGeneralDescrPcb( LINE_READER* aReader );
  182. /**
  183. * Function PcbGeneralLocateAndDisplay
  184. * searches for an item under the mouse cursor.
  185. * Items are searched first on the current working layer.
  186. * If nothing found, an item will be searched without layer restriction.
  187. * If more than one item is found meeting the current working layer
  188. * criterion, then a popup menu is shown which allows the user to pick
  189. * which item he/she is interested in. Once an item is chosen, then it
  190. * is make the "current item" and the status window is updated to reflect
  191. * this.
  192. *
  193. * @param aHotKeyCode The hotkey which relates to the caller and determines
  194. * the type of search to be performed. If zero, then
  195. * the mouse tools will be tested instead.
  196. */
  197. BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 );
  198. void ProcessItemSelection( wxCommandEvent& event );
  199. /**
  200. * Function SetCurItem
  201. * sets the currently selected item and displays it in the MsgPanel.
  202. * If the given item is NULL then the MsgPanel is erased and there is no
  203. * currently selected item. This function is intended to make the process
  204. * of "selecting" an item more formal, and to indivisibly tie the operation
  205. * of selecting an item to displaying it using BOARD_ITEM::Display_Infos().
  206. * @param aItem The BOARD_ITEM to make the selected item or NULL if none.
  207. * @param aDisplayInfo = true to display item info, false if not (default = true)
  208. */
  209. void SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo = true );
  210. BOARD_ITEM* GetCurItem();
  211. /**
  212. * Function GetCollectorsGuide
  213. * @return GENERAL_COLLECTORS_GUIDE - that considers the global
  214. *configuration options.
  215. */
  216. GENERAL_COLLECTORS_GUIDE GetCollectorsGuide();
  217. /**
  218. * Function CursorGoto
  219. * positions the cursor at a given coordinate and reframes the drawing if the
  220. * requested point is out of view.
  221. * @param aPos is the point to go to.
  222. * @param aWarp is true if the pointer should be warped to the new position.
  223. */
  224. void CursorGoto( const wxPoint& aPos, bool aWarp = true );
  225. /**
  226. * Function Save_Module_In_Library
  227. * Save in an existing library a given footprint
  228. * @param aLibName = name of the library to use
  229. * @param aModule = the given footprint
  230. * @param aOverwrite = true to overwrite an existing footprint, false to
  231. * abort if an existing footprint with same name is found
  232. * @param aDisplayDialog = true to display a dialog to enter or confirm the
  233. * footprint name
  234. * @return : true if OK, false if abort
  235. */
  236. bool Save_Module_In_Library( const wxString& aLibName,
  237. MODULE* aModule,
  238. bool aOverwrite,
  239. bool aDisplayDialog );
  240. /**
  241. * Function SelectLibrary
  242. * puts up a dialog and allows the user to pick a library, for unspecified use.
  243. *
  244. * @param aNicknameExisting is the current choice to highlight
  245. *
  246. * @return wxString - the library or wxEmptyString on abort.
  247. */
  248. wxString SelectLibrary( const wxString& aNicknameExisting );
  249. MODULE* GetModuleByName();
  250. /**
  251. * Function OnModify
  252. * Virtual
  253. * Must be called after a change
  254. * in order to set the "modify" flag of the current screen
  255. * and update the date in frame reference
  256. * do not forget to call this basic OnModify function to update info
  257. * in derived OnModify functions
  258. */
  259. virtual void OnModify();
  260. // Modules (footprints)
  261. /**
  262. * Function Create_1_Module
  263. * Creates a new module or footprint : A new module contains 2 texts :
  264. * First = REFERENCE
  265. * Second = VALUE: "VAL**"
  266. * the new module is added to the board module list
  267. * @param aModuleName = name of the new footprint
  268. * (will be the component reference in board)
  269. * @return a pointer to the new module
  270. */
  271. MODULE* Create_1_Module( const wxString& aModuleName );
  272. void Edit_Module( MODULE* module, wxDC* DC );
  273. void Rotate_Module( wxDC* DC, MODULE* module, double angle, bool incremental );
  274. /**
  275. * Function PlaceModule
  276. * places \a aModule at the current cursor position and updates module coordinates
  277. * with the new position.
  278. *
  279. * @param aModule A MODULE object point of the module to be placed.
  280. * @param aDC A wxDC object point of the device context to draw \a aModule on
  281. * or NULL if no display screen need updated.
  282. * @param aDoNotRecreateRatsnest A bool true redraws the module rats nest.
  283. */
  284. void PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreateRatsnest = false );
  285. // module texts
  286. void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
  287. void DeleteTextModule( TEXTE_MODULE* Text );
  288. void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
  289. void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC );
  290. TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
  291. /**
  292. * Function ResetTextSize
  293. * resets given field text size and width to current settings in
  294. * Preferences->Dimensions->Texts and Drawings.
  295. * @param aItem is the item to be reset, either TEXTE_PCB or TEXTE_MODULE.
  296. * @param aDC is the drawing context.
  297. */
  298. void ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC );
  299. /**
  300. * Function ResetModuleTextSizes
  301. * resets text size and width of all module text fields of given field
  302. * type to current settings in Preferences->Dimensions->Texts and Drawings.
  303. * @param aFilter is a filter: footprint names must match this filter.
  304. * an empty filter, or "*" do not filter anything.
  305. * @param aRef = true to modify the reference of footprints.
  306. * @param aValue = true to modify the value of footprints.
  307. * @param aOthers = true to modify the other fields of footprints.
  308. */
  309. void ResetModuleTextSizes( const wxString & aFilter, bool aRef,
  310. bool aValue, bool aOthers );
  311. void InstallPadOptionsFrame( D_PAD* pad );
  312. void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC );
  313. void AddPad( MODULE* Module, bool draw );
  314. /**
  315. * Function DeletePad
  316. * Delete the pad aPad.
  317. * Refresh the modified screen area
  318. * Refresh modified parameters of the parent module (bounding box, last date)
  319. * @param aPad = the pad to delete
  320. * @param aQuery = true to prompt for confirmation, false to delete silently
  321. */
  322. void DeletePad( D_PAD* aPad, bool aQuery = true );
  323. /**
  324. * Function StartMovePad
  325. * Initialize a drag or move pad command
  326. * @param aPad = the pad to move or drag
  327. * @param aDC = the current device context
  328. * @param aDragConnectedTracks = true to drag connected tracks,
  329. * false to just move the pad
  330. */
  331. void StartMovePad( D_PAD* aPad, wxDC* aDC, bool aDragConnectedTracks );
  332. void RotatePad( D_PAD* Pad, wxDC* DC );
  333. void PlacePad( D_PAD* Pad, wxDC* DC );
  334. void Export_Pad_Settings( D_PAD* aPad );
  335. void Import_Pad_Settings( D_PAD* aPad, bool aDraw );
  336. /**
  337. * Function GlobalChange_PadSettings
  338. * Function to change pad caracteristics for the given footprint
  339. * or all footprints which look like the given footprint
  340. * @param aPad is the pattern. The given footprint is the parent of this pad
  341. * @param aSameFootprints: if true, make changes on all identical footprints
  342. * @param aPadShapeFilter: if true, make changes only on pads having the same shape as aPad
  343. * @param aPadOrientFilter: if true, make changes only on pads having the same orientation as aPad
  344. * @param aPadLayerFilter: if true, make changes only on pads having the same layers as aPad
  345. * @param aRedraw: if true: redraws the footprint
  346. * @param aSaveForUndo: if true: create an entry in the Undo/Redo list
  347. * (usually: true in Schematic editor, false in Module editor)
  348. */
  349. void GlobalChange_PadSettings( D_PAD* aPad,
  350. bool aSameFootprints,
  351. bool aPadShapeFilter,
  352. bool aPadOrientFilter,
  353. bool aPadLayerFilter,
  354. bool aRedraw,
  355. bool aSaveForUndo );
  356. /**
  357. * Function SelectFootprint
  358. * displays a list of modules found in all libraries or a given library
  359. *
  360. * @param aWindow = the current window ( parent window )
  361. *
  362. * @param aLibraryName = library to list (if aLibraryFullFilename is empty, then list all modules).
  363. * This is a nickname for the FP_LIB_TABLE build.
  364. *
  365. * @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used )
  366. *
  367. * @param aKeyWord = keyword list, to display a filtered list of module
  368. * having one (or more) of these keywords in their
  369. * keyword list ( aKeyWord = wxEmptyString if not used )
  370. *
  371. * @param aTable is the #FP_LIB_TABLE to search.
  372. *
  373. * @return wxEmptyString if abort or fails, or the selected module name if Ok
  374. */
  375. wxString SelectFootprint( EDA_DRAW_FRAME* aWindow,
  376. const wxString& aLibraryName,
  377. const wxString& aMask,
  378. const wxString& aKeyWord,
  379. FP_LIB_TABLE* aTable );
  380. /**
  381. * Function LoadModuleFromLibrary
  382. * opens a dialog to select a footprint, and loads it into current board.
  383. *
  384. * @param aLibrary = the library name to use, or empty string to search
  385. * in all loaded libraries
  386. * @param aTable is the #FP_LIB_TABLE containing the avaiable footprint libraries.
  387. * @param aUseFootprintViewer = true to show the option
  388. * allowing the footprint selection by the footprint viewer
  389. * @param aDC (can be NULL ) = the current Device Context, to draw the new footprint
  390. */
  391. MODULE* LoadModuleFromLibrary( const wxString& aLibrary,
  392. FP_LIB_TABLE* aTable,
  393. bool aUseFootprintViewer = true,
  394. wxDC* aDC = NULL );
  395. /**
  396. * Function SelectFootprintFromLibBrowser
  397. * launches the footprint viewer to select the name of a footprint to load.
  398. *
  399. * @return the selected footprint name or an empty string if no selection was made.
  400. */
  401. wxString SelectFootprintFromLibBrowser();
  402. /**
  403. * Function FootprintLibs
  404. * @return the project #FP_LIB_TABLE.
  405. */
  406. FP_LIB_TABLE* FootprintLibs() const;
  407. // ratsnest functions
  408. /**
  409. * Function Compile_Ratsnest
  410. * Create the entire board ratsnest.
  411. * Must be called after a board change (changes for
  412. * pads, footprints or a read netlist ).
  413. * @param aDC = the current device context (can be NULL)
  414. * @param aDisplayStatus : if true, display the computation results
  415. */
  416. void Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus );
  417. /**
  418. * Function build_ratsnest_module
  419. * Build a ratsnest relative to one footprint. This is a simplified computation
  420. * used only in move footprint. It is not optimal, but it is fast and sufficient
  421. * to help a footprint placement
  422. * It shows the connections from a pad to the nearest connected pad
  423. * @param aModule = module to consider.
  424. */
  425. void build_ratsnest_module( MODULE* aModule );
  426. /**
  427. * Function TraceModuleRatsNest
  428. * display the rats nest of a moving footprint, computed by
  429. * build_ratsnest_module()
  430. */
  431. void TraceModuleRatsNest( wxDC* aDC );
  432. /**
  433. * Function Build_Board_Ratsnest.
  434. * Calculates the full ratsnest depending only on pads.
  435. */
  436. void Build_Board_Ratsnest();
  437. /**
  438. * function Displays the general ratsnest
  439. * Only ratsnest with the status bit CH_VISIBLE is set are displayed
  440. * @param aDC = the current device context (can be NULL)
  441. * @param aNetcode if > 0, Display only the ratsnest relative to the
  442. * corresponding net_code
  443. */
  444. void DrawGeneralRatsnest( wxDC* aDC, int aNetcode = 0 );
  445. /**
  446. * Function TraceAirWiresToTargets
  447. * This functions shows airwires to nearest connecting points (pads)
  448. * from the current new track end during track creation
  449. * Uses data prepared by BuildAirWiresTargetsList()
  450. * @param aDC = the current device context
  451. */
  452. void TraceAirWiresToTargets( wxDC* aDC );
  453. /**
  454. * Function BuildAirWiresTargetsList
  455. * Build a list of candidates that can be a coonection point
  456. * when a track is started.
  457. * This functions prepares data to show airwires to nearest connecting points (pads)
  458. * from the current new track to candidates during track creation
  459. * @param aItemRef = the item connected to the starting point of the new track (track or pad)
  460. * @param aPosition = the position of the new track end (usually the mouse cursor on grid)
  461. * @param aInit = true to build full candidate list or false to update data
  462. * When aInit = false, aItemRef is not used (can be NULL)
  463. */
  464. void BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef,
  465. const wxPoint& aPosition, bool aInit );
  466. /**
  467. * Function TestForActiveLinksInRatsnest
  468. * Explores the full rats nest list (which must exist) to determine
  469. * the ACTIVE links in the full rats nest list
  470. * When tracks exist between pads, a link can connect 2 pads already connected by a track
  471. * and the link is said inactive.
  472. * When a link connects 2 pads not already connected by a track, the link is said active.
  473. * @param aNetCode = net code to test. If 0, test all nets
  474. */
  475. void TestForActiveLinksInRatsnest( int aNetCode );
  476. /**
  477. * Function TestConnections
  478. * tests the connections relative to all nets.
  479. * <p>
  480. * This function update the status of the ratsnest ( flag CH_ACTIF = 0 if a connection
  481. * is found, = 1 else) track segments are assumed to be sorted by net codes.
  482. * This is the case because when a new track is added, it is inserted in the linked list
  483. * according to its net code. and when nets are changed (when a new netlist is read)
  484. * tracks are sorted before using this function.
  485. * </p>
  486. */
  487. void TestConnections();
  488. /**
  489. * Function TestNetConnection
  490. * tests the connections relative to \a aNetCode. Track segments are assumed to be
  491. * sorted by net codes.
  492. * @param aDC Current Device Context
  493. * @param aNetCode The net code to test
  494. */
  495. void TestNetConnection( wxDC* aDC, int aNetCode );
  496. /**
  497. * Function RecalculateAllTracksNetcode
  498. * search connections between tracks and pads and propagate pad net codes to the track
  499. * segments.
  500. */
  501. void RecalculateAllTracksNetcode();
  502. /* Functions relative to Undo/redo commands:
  503. */
  504. /**
  505. * Function SaveCopyInUndoList (virtual pure)
  506. * Creates a new entry in undo list of commands.
  507. * add a picker to handle aItemToCopy
  508. * @param aItemToCopy = the board item modified by the command to undo
  509. * @param aTypeCommand = command type (see enum UNDO_REDO_T)
  510. * @param aTransformPoint = the reference point of the transformation, for
  511. * commands like move
  512. */
  513. virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
  514. UNDO_REDO_T aTypeCommand,
  515. const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
  516. /**
  517. * Function SaveCopyInUndoList (virtual pure, overloaded).
  518. * Creates a new entry in undo list of commands.
  519. * add a list of pickers to handle a list of items
  520. * @param aItemsList = the list of items modified by the command to undo
  521. * @param aTypeCommand = command type (see enum UNDO_REDO_T)
  522. * @param aTransformPoint = the reference point of the transformation,
  523. * for commands like move
  524. */
  525. virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
  526. UNDO_REDO_T aTypeCommand,
  527. const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
  528. /** Install the dialog box for layer selection
  529. * @param aDefaultLayer = Preselection (NB_PCB_LAYERS for "(Deselect)" layer)
  530. * @param aNotAllowedLayersMask = a layer mask for not allowed layers
  531. * (= 0 to show all layers in use)
  532. * @param aDlgPosition = position of dialog ( defualt = centered)
  533. * @return the selected layer id
  534. */
  535. LAYER_NUM SelectLayer( LAYER_NUM aDefaultLayer,
  536. LAYER_MSK aNotAllowedLayersMask = 0,
  537. wxPoint aDlgPosition = wxDefaultPosition );
  538. /* Display a list of two copper layers to choose a pair of copper layers
  539. * the layer pair is used to fast switch between copper layers when placing vias
  540. */
  541. void SelectCopperLayerPair();
  542. virtual void SwitchLayer( wxDC* DC, LAYER_NUM layer );
  543. void LoadSettings( wxConfigBase* aCfg ); // override virtual
  544. void SaveSettings( wxConfigBase* aCfg ); // override virtual
  545. bool InvokeDialogGrid();
  546. void OnTogglePolarCoords( wxCommandEvent& aEvent );
  547. void OnTogglePadDrawMode( wxCommandEvent& aEvent );
  548. // User interface update event handlers.
  549. void OnUpdateCoordType( wxUpdateUIEvent& aEvent );
  550. void OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent );
  551. void OnUpdateSelectGrid( wxUpdateUIEvent& aEvent );
  552. void OnUpdateSelectZoom( wxUpdateUIEvent& aEvent );
  553. /**
  554. * Function SetFastGrid1()
  555. *
  556. * Switches grid settings to the 1st "fast" setting predefined by user.
  557. */
  558. void SetFastGrid1();
  559. /**
  560. * Function SetFastGrid2()
  561. *
  562. * Switches grid settings to the 1st "fast" setting predefined by user.
  563. */
  564. void SetFastGrid2();
  565. DECLARE_EVENT_TABLE()
  566. };
  567. #endif // WX_BASE_PCB_FRAME_H_