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.

407 lines
14 KiB

17 years ago
17 years ago
17 years ago
5 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
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
++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
++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
++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
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
16 years ago
17 years ago
5 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2008-2016 Wayne Stambaugh <stambaughw@gmail.com>
  6. * Copyright (C) 1992-2021 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 pcb_base_frame.h
  27. * @brief Classes used in Pcbnew, CvPcb and GerbView.
  28. */
  29. #ifndef PCB_BASE_FRAME_H
  30. #define PCB_BASE_FRAME_H
  31. #include <eda_item.h>
  32. #include <board.h>
  33. #include <eda_draw_frame.h>
  34. #include <outline_mode.h>
  35. #include <lib_id.h>
  36. #include <pcb_display_options.h>
  37. #include <pcb_draw_panel_gal.h>
  38. #include <pcb_origin_transforms.h>
  39. #include <pcb_screen.h>
  40. #include <richio.h>
  41. #include <vector>
  42. /* Forward declarations of classes. */
  43. class APP_SETTINGS_BASE;
  44. class BOARD;
  45. class BOARD_CONNECTED_ITEM;
  46. class COLOR_SETTINGS;
  47. class FOOTPRINT;
  48. class PAD;
  49. class EDA_3D_VIEWER_FRAME;
  50. class GENERAL_COLLECTOR;
  51. class GENERAL_COLLECTORS_GUIDE;
  52. class BOARD_DESIGN_SETTINGS;
  53. class ZONE_SETTINGS;
  54. class PCB_PLOT_PARAMS;
  55. class FP_LIB_TABLE;
  56. class PCBNEW_SETTINGS;
  57. class FOOTPRINT_EDITOR_SETTINGS;
  58. struct MAGNETIC_SETTINGS;
  59. class PROGRESS_REPORTER;
  60. wxDECLARE_EVENT( BOARD_CHANGED, wxCommandEvent );
  61. /**
  62. * Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
  63. */
  64. class PCB_BASE_FRAME : public EDA_DRAW_FRAME
  65. {
  66. public:
  67. PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
  68. const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
  69. long aStyle, const wxString& aFrameName );
  70. ~PCB_BASE_FRAME();
  71. /**
  72. * @return a reference to the child 3D viewer frame, when exists, or NULL
  73. */
  74. EDA_3D_VIEWER_FRAME* Get3DViewerFrame();
  75. /**
  76. * Update the 3D view, if the viewer is opened by this frame.
  77. *
  78. * @param aMarkDirty alerts the 3D view that data is stale (it may not refresh instantly)
  79. * @param aRefresh will tell the 3D view to refresh immediately
  80. * @param aTitle is the new title of the 3D frame, or nullptr to do not change the
  81. * frame title
  82. */
  83. virtual void Update3DView( bool aMarkDirty, bool aRefresh,
  84. const wxString* aTitle = nullptr );
  85. /**
  86. * Attempt to load \a aFootprintId from the footprint library table.
  87. *
  88. * @param aFootprintId is the #LIB_ID of component footprint to load.
  89. * @return the #FOOTPRINT if found or NULL if \a aFootprintId not found in any of the
  90. * libraries in table returned from #Prj().PcbFootprintLibs().
  91. */
  92. FOOTPRINT* LoadFootprint( const LIB_ID& aFootprintId );
  93. /**
  94. * Calculate the bounding box containing all board items (or board edge segments).
  95. *
  96. * @param aBoardEdgesOnly is true if we are interested in board edge segments only.
  97. * @return the board's bounding box.
  98. */
  99. EDA_RECT GetBoardBoundingBox( bool aBoardEdgesOnly = false ) const;
  100. const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override
  101. {
  102. /* "Zoom to Fit" calls this with "aIncludeAllVisible" as true. Since that feature
  103. * always ignored the page and border, this function returns a bbox without them
  104. * as well when passed true. This technically is not all things visible, but it
  105. * keeps behavior consistent.
  106. *
  107. * When passed false, this function returns a bbox of just the board edge. This
  108. * allows things like fabrication text or anything else outside the board edge to
  109. * be ignored, and just zooms up to the board itself.
  110. *
  111. * Calling "GetBoardBoundingBox(true)" when edge cuts are turned off will return
  112. * the entire page and border, so we call "GetBoardBoundingBox(false)" instead.
  113. */
  114. if( aIncludeAllVisible || !m_pcb->IsLayerVisible( Edge_Cuts ) )
  115. return GetBoardBoundingBox( false );
  116. else
  117. return GetBoardBoundingBox( true );
  118. }
  119. virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
  120. const PAGE_INFO& GetPageSettings() const override;
  121. const wxSize GetPageSizeIU() const override;
  122. const wxPoint& GetGridOrigin() const override;
  123. void SetGridOrigin( const wxPoint& aPoint ) override;
  124. const wxPoint& GetAuxOrigin() const;
  125. const wxPoint GetUserOrigin() const;
  126. /**
  127. * Return a reference to the default ORIGIN_TRANSFORMS object
  128. */
  129. ORIGIN_TRANSFORMS& GetOriginTransforms() override;
  130. const TITLE_BLOCK& GetTitleBlock() const override;
  131. void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) override;
  132. /**
  133. * Returns the BOARD_DESIGN_SETTINGS for the open project.
  134. */
  135. virtual BOARD_DESIGN_SETTINGS& GetDesignSettings() const;
  136. /**
  137. * Helper to retrieve the current color settings.
  138. */
  139. virtual COLOR_SETTINGS* GetColorSettings( bool aForceRefresh = false ) const override
  140. {
  141. wxFAIL_MSG( "Color settings requested for a PCB_BASE_FRAME that does not override!" );
  142. return nullptr;
  143. }
  144. PCBNEW_SETTINGS& Settings() { return *m_settings; }
  145. const PCBNEW_SETTINGS& Settings() const { return *m_settings; }
  146. void SetDrawBgColor( const COLOR4D& aColor ) override;
  147. /**
  148. * Display options control the way tracks, vias, outlines and other things are shown
  149. * (for instance solid or sketch mode).
  150. */
  151. const PCB_DISPLAY_OPTIONS& GetDisplayOptions() const { return m_displayOptions; }
  152. /**
  153. * Updates the current display options from the given options struct
  154. * @param aOptions is the options struct to apply
  155. * @param aRefresh will refresh the view after updating
  156. */
  157. void SetDisplayOptions( const PCB_DISPLAY_OPTIONS& aOptions, bool aRefresh = true );
  158. const ZONE_SETTINGS& GetZoneSettings() const;
  159. void SetZoneSettings( const ZONE_SETTINGS& aSettings );
  160. /**
  161. * Return the #PCB_PLOT_PARAMS for the BOARD owned by this frame.
  162. */
  163. virtual const PCB_PLOT_PARAMS& GetPlotSettings() const;
  164. virtual void SetPlotSettings( const PCB_PLOT_PARAMS& aSettings );
  165. /**
  166. * Set the #m_Pcb member in such as way as to ensure deleting any previous #BOARD.
  167. */
  168. virtual void SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr );
  169. BOARD* GetBoard() const
  170. {
  171. wxASSERT( m_pcb );
  172. return m_pcb;
  173. }
  174. /**
  175. * @return the primary data model.
  176. */
  177. virtual BOARD_ITEM_CONTAINER* GetModel() const = 0;
  178. EDA_ITEM* GetItem( const KIID& aId ) const override;
  179. void FocusOnItem( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer = UNDEFINED_LAYER );
  180. void HideSolderMask();
  181. void ShowSolderMask();
  182. // General
  183. virtual void ReCreateOptToolbar() override { }
  184. virtual void ShowChangedLanguage() override;
  185. virtual void ReCreateMenuBar() override;
  186. virtual void UpdateStatusBar() override;
  187. PCB_SCREEN* GetScreen() const override { return (PCB_SCREEN*) EDA_DRAW_FRAME::GetScreen(); }
  188. /**
  189. * Shows the 3D view frame.
  190. *
  191. * If it does not exist, it is created. If it exists, it is brought to the foreground.
  192. */
  193. EDA_3D_VIEWER_FRAME* CreateAndShow3D_Frame();
  194. /**
  195. * @return global configuration options.
  196. */
  197. GENERAL_COLLECTORS_GUIDE GetCollectorsGuide();
  198. /**
  199. * Put up a dialog and allows the user to pick a library, for unspecified use.
  200. *
  201. * @param aNicknameExisting is the current choice to highlight.
  202. * @return the library or wxEmptyString on abort.
  203. */
  204. wxString SelectLibrary( const wxString& aNicknameExisting );
  205. /**
  206. * @return a reference to the footprint found by its reference on the current board. The
  207. * reference is entered by the user from a dialog (by awxTextCtlr, or a list of
  208. * available references)
  209. */
  210. FOOTPRINT* GetFootprintFromBoardByReference();
  211. /**
  212. * Must be called after a change in order to set the "modify" flag of the current screen
  213. * and update the date in frame reference.
  214. *
  215. * Do not forget to call this basic OnModify function to update info in derived OnModify
  216. * functions.
  217. */
  218. virtual void OnModify();
  219. /**
  220. * Creates a new footprint, at position 0,0.
  221. *
  222. * The new footprint contains only 2 texts: a reference and a value:
  223. * Reference = REF**
  224. * Value = "VAL**" or Footprint name in lib
  225. *
  226. * @note They are dummy texts, which will be replaced by the actual texts when the
  227. * footprint is placed on a board and a netlist is read.
  228. *
  229. * @param aFootprintName is the name of the new footprint in library.
  230. * @param aQuiet prevents user dialogs from being shown
  231. */
  232. FOOTPRINT* CreateNewFootprint( const wxString& aFootprintName, bool aQuiet = false );
  233. /**
  234. * Places \a aFootprint at the current cursor position and updates footprint coordinates
  235. * with the new position.
  236. *
  237. * @param aRecreateRatsnest A bool true redraws the footprint ratsnest.
  238. */
  239. void PlaceFootprint( FOOTPRINT* aFootprint, bool aRecreateRatsnest = true );
  240. void ShowPadPropertiesDialog( PAD* aPad );
  241. /**
  242. * Open a dialog to select a footprint.
  243. *
  244. * @param aPreslect if valid, the #LIB_ID to select (otherwise the global history is used).
  245. */
  246. FOOTPRINT* SelectFootprintFromLibTree( LIB_ID aPreselect = LIB_ID() );
  247. /**
  248. * Add the given footprint to the board.
  249. *
  250. * @param aDC is the current Device Context, to draw the new footprint (can be NULL ).
  251. */
  252. virtual void AddFootprintToBoard( FOOTPRINT* aFootprint );
  253. /**
  254. * Launch the footprint viewer to select the name of a footprint to load.
  255. *
  256. * @return the selected footprint name or an empty string if no selection was made.
  257. */
  258. wxString SelectFootprintFromLibBrowser();
  259. /**
  260. * Create the entire board ratsnest.
  261. *
  262. * This must be called after a board change (changes for pads, footprints or a read
  263. * netlist ).
  264. *
  265. * @param aDC is the current device context (can be NULL).
  266. * @param aDisplayStatus if true, display the computation results.
  267. */
  268. void Compile_Ratsnest( bool aDisplayStatus );
  269. /**
  270. * Create a new entry in undo list of commands.
  271. *
  272. * @param aItemToCopy is the board item modified by the command to undo.
  273. * @param aTypeCommand is the command type (see enum #UNDO_REDO).
  274. */
  275. virtual void SaveCopyInUndoList( EDA_ITEM* aItemToCopy, UNDO_REDO aTypeCommand ) = 0;
  276. /**
  277. * Creates a new entry in undo list of commands.
  278. *
  279. * @param aItemsList is the list of items modified by the command to undo.
  280. * @param aTypeCommand is the command type (see enum #UNDO_REDO)
  281. */
  282. virtual void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
  283. UNDO_REDO aTypeCommand ) = 0;
  284. /**
  285. * Show the dialog box for a layer selection.
  286. *
  287. * @param aDefaultLayer is the default layer to select. Use UNDEFINED_LAYER if no selection
  288. * is desired.
  289. * @param aNotAllowedLayersMask is a layer mask for not allowed layers. Use 0 to show all
  290. * layers in use.
  291. * @param aDlgPosition is the position of dialog (default is centered).
  292. * @return the selected layer id.
  293. */
  294. PCB_LAYER_ID SelectOneLayer( PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask = LSET(),
  295. wxPoint aDlgPosition = wxDefaultPosition );
  296. /**
  297. * Change the active layer in the frame
  298. *
  299. * @param aLayer New layer to make active
  300. */
  301. virtual void SwitchLayer( PCB_LAYER_ID aLayer );
  302. virtual void SetActiveLayer( PCB_LAYER_ID aLayer ) { GetScreen()->m_Active_Layer = aLayer; }
  303. virtual PCB_LAYER_ID GetActiveLayer() const { return GetScreen()->m_Active_Layer; }
  304. SEVERITY GetSeverity( int aErrorCode ) const override;
  305. virtual void OnDisplayOptionsChanged() {}
  306. void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
  307. void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
  308. PCBNEW_SETTINGS* GetPcbNewSettings() const;
  309. FOOTPRINT_EDITOR_SETTINGS* GetFootprintEditorSettings() const;
  310. virtual MAGNETIC_SETTINGS* GetMagneticItemsSettings();
  311. void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
  312. /**
  313. * Display the current grid pane on the status bar.
  314. */
  315. void DisplayGridMsg() override;
  316. PCB_DRAW_PANEL_GAL* GetCanvas() const override;
  317. virtual void ActivateGalCanvas() override;
  318. protected:
  319. bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
  320. /**
  321. * Attempts to load \a aFootprintId from the footprint library table.
  322. *
  323. * @param aFootprintId is the #LIB_ID of component footprint to load.
  324. * @return the #FOOTPRINT if found or NULL if \a aFootprintId not found in any of the
  325. * libraries in the table returned from #Prj().PcbFootprintLibs().
  326. * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error
  327. * occurs while reading footprint library files.
  328. */
  329. FOOTPRINT* loadFootprint( const LIB_ID& aFootprintId );
  330. virtual void unitsChangeRefresh() override;
  331. protected:
  332. BOARD* m_pcb;
  333. PCB_DISPLAY_OPTIONS m_displayOptions;
  334. PCB_ORIGIN_TRANSFORMS m_originTransforms;
  335. PCBNEW_SETTINGS* m_settings; // No ownership, just a shortcut
  336. };
  337. #endif // PCB_BASE_FRAME_H