KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_edit_frame.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2010 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2010-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __PCB_EDIT_FRAME_H__
22#define __PCB_EDIT_FRAME_H__
23
24#include "pcb_base_edit_frame.h"
25#include "zones.h"
26#include <mail_type.h>
27
28class ACTION_PLUGIN;
29class PCB_SCREEN;
30class BOARD;
31class BOARD_COMMIT;
34class FOOTPRINT;
35class PCB_TRACK;
36class PCB_VIA;
37class PAD;
38class PCB_TARGET;
39class PCB_GROUP;
41class DRC;
42class DIALOG_FIND;
43class DIALOG_PLOT;
44class ZONE;
47class SELECTION;
48class PCB_MARKER;
49class BOARD_ITEM;
51class NETLIST;
52class REPORTER;
53struct PARSE_ERROR;
54class IO_ERROR;
55class FP_LIB_TABLE;
57class ACTION_MENU;
58class TOOL_ACTION;
60
61#ifdef KICAD_IPC_API
63class API_HANDLER_PCB;
65#endif
66
67enum LAST_PATH_TYPE : unsigned int;
68
69namespace PCB { struct IFACE; } // KIFACE is in pcbnew.cpp
70
77{
78public:
79 virtual ~PCB_EDIT_FRAME();
80
89 void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
90
91 void OnQuit( wxCommandEvent& event );
92
98 bool IsContentModified() const override;
99
104
109
114 void UpdateUserInterface();
115
116 void HardRedraw() override;
117
121 void RebuildAndRefresh();
122
131 void ExecuteRemoteCommand( const char* cmdline ) override;
132
133 void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
134
138 std::vector<BOARD_ITEM*> FindItemsFromSyncSelection( std::string syncStr );
139
143 static const wxString SearchPaneName() { return wxT( "Search" ); }
144
148 void ShowFindDialog();
149
153 void FindNext( bool reverse = false );
154
158 void ToPlotter( int aID );
159
163 void ExportSVG( wxCommandEvent& event );
164
165 // User interface update command event handlers.
166 void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
167
168 bool LayerManagerShown();
169 bool PropertiesShown();
170 bool NetInspectorShown();
171
172 void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
173 void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
174 void OnUpdateSelectAutoWidth( wxUpdateUIEvent& aEvent );
175
176 void RunEeschema();
177
178 void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
179 bool aShowEdit );
180 void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit );
181
185 EDA_ANGLE GetRotationAngle() const override;
186
190 COLOR4D GetGridColor() override;
191
195 void SetGridColor( const COLOR4D& aColor ) override;
196
201 static bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
202
207 static std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
208
209 void SaveProjectLocalSettings() override;
210
217 bool LoadProjectSettings();
218
219 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
220
221 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
222
226 void LoadDrawingSheet();
227
233 wxString GetLastPath( LAST_PATH_TYPE aType );
234
246 void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
247
252 void ResolveDRCExclusions( bool aCreateMarkers );
253
254 void Process_Special_Functions( wxCommandEvent& event );
255 void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
256
257 void ReCreateHToolbar() override;
258 void ReCreateAuxiliaryToolbar() override;
259 void ReCreateVToolbar() override;
260 void ReCreateOptToolbar() override;
261 void UpdateToolbarControlSizes() override;
262
271 void ReCreateLayerBox( bool aForceResizeToolbar = true );
272
273
280 void OnModify() override;
281
285 void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
286
287 void OnDisplayOptionsChanged() override;
288
296 bool IsElementVisible( GAL_LAYER_ID aElement ) const;
297
305 void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
306
308 void ActivateGalCanvas() override;
309
310 void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString );
311
312 void PrepareLayerIndicator( bool aForceRebuild = false );
313
314 void ToggleLayersManager();
315
316 void ToggleNetInspector();
317
318 void ToggleSearch();
319
337 int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM, bool aOnlySMD,
338 bool aNoTHItems, bool aExcludeDNP, bool aTopSide, bool aBottomSide,
339 bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX );
340
344 void GenFootprintsReport( wxCommandEvent& event );
345
349 void GenIPC2581File( wxCommandEvent& event );
350
354 void GenODBPPFiles( wxCommandEvent& event );
355
363 bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
364
365 void GenD356File( wxCommandEvent& event );
366
367 void OnFileHistory( wxCommandEvent& event );
368 void OnClearFileHistory( wxCommandEvent& aEvent );
369
375 void Files_io( wxCommandEvent& event );
376
390 bool Files_io_from_id( int aId );
391
404 bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
405
417 bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
418 bool aChangeProject = true );
419
431 bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false );
432
440 bool Clear_Pcb( bool doAskAboutUnsavedChanges, bool aFinal = false );
441
443 void SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr ) override
444 {
445 SetBoard( aBoard, true, aReporter );
446 }
447
448 void SetBoard( BOARD* aBoard, bool aBuildConnectivity, PROGRESS_REPORTER* aReporter = nullptr );
449
451 BOARD_ITEM_CONTAINER* GetModel() const override;
452
453 std::unique_ptr<GRID_HELPER> MakeGridHelper() override;
454
456 void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
457
463 void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
464
476 void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
477 wxString* aLibPath = nullptr );
478
482 void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
483
487 void ExportToGenCAD( wxCommandEvent& event );
488
492 void OnExportVRML( wxCommandEvent& event );
493
518 bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
519 bool aIncludeUnspecified, bool aIncludeDNP,
520 bool aExport3DFiles, bool aUseRelativePaths,
521 const wxString& a3D_Subdir, double aXRef, double aYRef );
522
526 void OnExportIDF3( wxCommandEvent& event );
527
531 void OnExportHyperlynx( wxCommandEvent& event );
532
545 bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
546 bool aUseThou, double aXRef, double aYRef,
547 bool aIncludeUnspecified, bool aIncludeDNP );
548
552 void OnExportSTEP( wxCommandEvent& event );
553
561 bool ExportSpecctraFile( const wxString& aFullFilename );
562
569 bool ImportSpecctraSession( const wxString& aFullFilename );
570
571 // Footprint editing (see also PCB_BASE_FRAME)
572 void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
573
574 int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
575
586 void ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, BOARD_COMMIT& aCommit,
587 bool deleteExtraTexts = true, bool resetTextLayers = true,
588 bool resetTextEffects = true, bool resetFabricationAttrs = true,
589 bool resetTextContent = true, bool reset3DModels = true,
590 bool* aUpdated = nullptr );
591
598 void OnEditItemRequest( BOARD_ITEM* aItem ) override;
599
605 void SwitchLayer( PCB_LAYER_ID layer ) override;
606
619 void SetTrackSegmentWidth( PCB_TRACK* aItem, PICKED_ITEMS_LIST* aItemsListPicker,
620 bool aUseDesignRules );
621
622
626 void Edit_Zone_Params( ZONE* zone_container );
627
628 // Properties dialogs
629 void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
630 void InstallNetlistFrame();
631
638 bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
639
647 int TestStandalone();
648
657 bool ReadNetlistFromFile( const wxString& aFilename, NETLIST& aNetlist, REPORTER& aReporter );
658
665 void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
666
677 void SendSelectItemsToSch( const std::deque<EDA_ITEM*>& aItems, EDA_ITEM* aFocusItem,
678 bool aForce );
679
686 void SendCrossProbeItem( BOARD_ITEM* aSyncItem );
687
693 void SendCrossProbeNetName( const wxString& aNetName );
694
695 void ShowChangedLanguage() override;
696
705 void UpdateTitle();
706
710 void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
711
715 void ThemeChanged() override;
716
717 void ProjectChanged() override;
718
719 bool CanAcceptApiCommands() override;
720
721 wxString GetCurrentFileName() const override;
722
723 SELECTION& GetCurrentSelection() override;
724
726
728
730
732
734
735 DECLARE_EVENT_TABLE()
736
737protected:
742 {
747
749 : previous_requested_scale( 0 ),
750 previous_Route_Layer_TOP_color( COLOR4D::UNSPECIFIED ),
751 previous_Route_Layer_BOTTOM_color( COLOR4D::UNSPECIFIED ),
752 previous_background_color( COLOR4D::UNSPECIFIED )
753 {
754 }
755 };
756
758
759 void doReCreateMenuBar() override;
760
761 // The Tool Framework initialization
762 void setupTools();
763 void setupUIConditions() override;
764
770 void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
771
775 void buildActionPluginMenus( ACTION_MENU* aActionMenu );
776
781
787 void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
788
794 void OnActionPluginMenu( wxCommandEvent& aEvent);
795
801 void OnActionPluginButton( wxCommandEvent& aEvent );
802
803 PLUGIN_ACTION_SCOPE PluginActionScope() const override { return PLUGIN_ACTION_SCOPE::PCB; }
804
808 void onBoardLoaded();
809
816 bool doAutoSave() override;
817
824 bool importFile( const wxString& aFileName, int aFileType,
825 const std::map<std::string, UTF8>* aProperties = nullptr );
826
827 bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
828 void doCloseWindow() override;
829
830 // protected so that PCB::IFACE::CreateWindow() is the only factory.
831 PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
832
833 void onSize( wxSizeEvent& aEvent );
834
835 int inferLegacyEdgeClearance( BOARD* aBoard, bool aShowUserMsg = true );
836
837 void redrawNetnames();
838
839 void saveProjectSettings() override;
840
841 void onCloseModelessBookReporterDialogs( wxCommandEvent& aEvent );
842
843#ifdef KICAD_IPC_API
844 void onPluginAvailabilityChanged( wxCommandEvent& aEvt );
845#endif
846
847public:
848 PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
849
850 wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
851 wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
852
856
857 bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
858
859 bool m_probingSchToPcb; // Recursion guard when synchronizing selection from schematic
860
861private:
862 friend struct PCB::IFACE;
864
873
880
881 const std::map<std::string, UTF8>* m_importProperties; // Properties used for non-KiCad import.
882
887
889
890#ifdef KICAD_IPC_API
891 std::unique_ptr<API_HANDLER_PCB> m_apiHandler;
892 std::unique_ptr<API_HANDLER_COMMON> m_apiHandlerCommon;
893#endif
894};
895
896#endif // __PCB_EDIT_FRAME_H__
PLUGIN_ACTION_SCOPE
Definition: api_plugin.h:55
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:49
This is the parent class from where any action plugin class must derive.
Definition: action_plugin.h:39
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
Abstract interface for BOARD_ITEMs capable of storing other items inside.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:79
Update the BOARD with a new netlist.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
A dialog to set the plot options and create plot files in various formats.
Definition: dialog_plot.h:41
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:319
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:202
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:77
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:40
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:284
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
Definition: pcb_netlist.h:241
Definition: pad.h:54
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:59
Common, abstract interface for edit frames.
Abstract dimension API.
The main frame for Pcbnew.
void HardRedraw() override
Rebuild the GAL and redraws the screen.
void OnDisplayOptionsChanged() override
void OnEditItemRequest(BOARD_ITEM *aItem) override
Install the corresponding dialog editor for the given item.
Definition: edit.cpp:111
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
void FindNext(bool reverse=false)
Find the next item using our existing search parameters.
void LoadDrawingSheet()
Load the drawing sheet file.
void ResolveDRCExclusions(bool aCreateMarkers)
If aCreateMarkers then create DRC exclusion markers from the serialized data.
void SetBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr) override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
TOOL_ACTION * GetExportNetlistAction()
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.
void GenIPC2581File(wxCommandEvent &event)
Create and IPC2581 output file.
bool doAutoSave() override
Perform auto save when the board has been modified and not saved within the auto save interval.
void OnModify() override
Must be called after a board change to set the modified flag.
void ThemeChanged() override
Called when light/dark theme is changed.
PCB_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
Definition: netlist.cpp:53
void SwitchLayer(PCB_LAYER_ID layer) override
Change the active layer in the editor.
Definition: edit.cpp:84
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void RecreateBOMFileFromBoard(wxCommandEvent &aEvent)
Create a BOM file from the current loaded board.
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void ReCreateHToolbar() override
void UpdateTrackWidthSelectBox(wxChoice *aTrackWidthSelectBox, bool aShowNetclass, bool aShowEdit)
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Change the visibility of an element category.
DIALOG_BOOK_REPORTER * m_inspectDrcErrorDlg
void OnClearFileHistory(wxCommandEvent &aEvent)
std::unique_ptr< GRID_HELPER > MakeGridHelper() override
void ReCreateVToolbar() override
virtual ~PCB_EDIT_FRAME()
void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) override
Switch currently used canvas (Cairo / OpenGL).
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit)
BOARD_ITEM_CONTAINER * GetModel() const override
DIALOG_BOOK_REPORTER * GetInspectDrcErrorDialog()
void OnExportSTEP(wxCommandEvent &event)
Export the current BOARD to a STEP assembly.
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aOnlySMD, bool aNoTHItems, bool aExcludeDNP, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
Create an ASCII footprint position file.
static std::vector< ACTION_PLUGIN * > GetOrderedActionPlugins()
Return ordered list of plugins in sequence in which they should appear on toolbar or in settings.
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool resetTextContent=true, bool reset3DModels=true, bool *aUpdated=nullptr)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
bool SavePcbCopy(const wxString &aFileName, bool aCreateProject=false)
Write the board data structures to aFileName.
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Load a KiCad board (.kicad_pcb) from aFileName.
DIALOG_FIND * m_findDialog
LAYER_TOOLBAR_ICON_VALUES m_prevIconVal
void doReCreateMenuBar() override
DIALOG_BOOK_REPORTER * m_inspectConstraintsDlg
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Receive KIWAY_EXPRESS messages from other players.
bool IsElementVisible(GAL_LAYER_ID aElement) const
Test whether a given element category is visible.
bool CanAcceptApiCommands() override
Checks if this frame is ready to accept API commands.
void GenD356File(wxCommandEvent &event)
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
void onBoardLoaded()
Update the state of the GUI after a new board is loaded or created.
void SetGridColor(const COLOR4D &aColor) override
void ExportFootprintsToLibrary(bool aStoreInNewLib, const wxString &aLibName=wxEmptyString, wxString *aLibPath=nullptr)
Save footprints in a library:
void ProjectChanged() override
Notification event that the project has changed.
void OnActionPluginButton(wxCommandEvent &aEvent)
Launched by the button when an action is called.
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
Definition: netlist.cpp:87
void OnExportIDF3(wxCommandEvent &event)
Export the current BOARD to a IDFv3 board and lib files.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void doCloseWindow() override
bool ImportSpecctraSession(const wxString &aFullFilename)
Import a specctra *.ses file and use it to relocate MODULEs and to replace all vias and tracks in an ...
void ReCreateLayerBox(bool aForceResizeToolbar=true)
Recreate the layer box by clearing the old list and building a new one from the new layer names and c...
void SaveProjectLocalSettings() override
Save changes to the project local settings.
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command send by Eeschema via a socket, port KICAD_PCB_PORT_SERVICE_NUMBER (currently...
void RunActionPlugin(ACTION_PLUGIN *aActionPlugin)
Execute action plugin's Run() method and updates undo buffer.
bool Files_io_from_id(int aId)
Read and write board files according to aId.
void PythonSyncProjectName()
Synchronize the project name from KiCad's environment into the Python interpreter.
bool m_show_layer_manager_tools
void OnExportVRML(wxCommandEvent &event)
Export the current BOARD to a VRML file.
void SetTrackSegmentWidth(PCB_TRACK *aItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseDesignRules)
Modify one track segment width or one via diameter (using DRC control).
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void GenODBPPFiles(wxCommandEvent &event)
Create and Generate ODB++ output files.
void PrepareLayerIndicator(bool aForceRebuild=false)
void ShowFindDialog()
Show the Find dialog.
void onSize(wxSizeEvent &aEvent)
void buildActionPluginMenus(ACTION_MENU *aActionMenu)
Fill action menu with all registered action plugins.
int ShowExchangeFootprintsDialog(FOOTPRINT *aFootprint, bool aUpdateMode, bool aSelectedMode)
int TestStandalone()
Test if standalone mode.
void ShowFootprintPropertiesDialog(FOOTPRINT *aFootprint)
void OnExportHyperlynx(wxCommandEvent &event)
Export the current BOARD to a Hyperlynx HYP file.
bool IsContentModified() const override
Get if the current board has been modified but not saved.
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
void PythonSyncEnvironmentVariables()
Synchronize the environment variables from KiCad's environment into the Python interpreter.
bool Clear_Pcb(bool doAskAboutUnsavedChanges, bool aFinal=false)
Delete all and reinitialize the current board.
Definition: initpcb.cpp:42
void SendCrossProbeItem(BOARD_ITEM *aSyncItem)
Send a message to the schematic editor so that it may move its cursor to an item with the same refere...
PLUGIN_ACTION_SCOPE PluginActionScope() const override
void ReCreateOptToolbar() override
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
BOX2D m_lastNetnamesViewport
Keep track of viewport so that track net labels can be adjusted when it changes.
void ReCreateAuxiliaryToolbar() override
void Edit_Zone_Params(ZONE *zone_container)
Edit params (layer, clearance, ...) for a zone outline.
bool FetchNetlistFromSchematic(NETLIST &aNetlist, const wxString &aAnnotateMessage)
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
Definition: netlist.cpp:159
void SendSelectItemsToSch(const std::deque< EDA_ITEM * > &aItems, EDA_ITEM *aFocusItem, bool aForce)
Send a message to the schematic editor to try to find schematic counterparts of specified PCB items a...
void OnUpdateSelectAutoWidth(wxUpdateUIEvent &aEvent)
void ExportSVG(wxCommandEvent &event)
Show the Export to SVG file dialog.
void RecreateCmpFileFromBoard(wxCommandEvent &aEvent)
Recreates a .cmp file from the current loaded board.
DIALOG_BOOK_REPORTER * GetFootprintDiffDialog()
void UpdateToolbarControlSizes() override
Update the sizes of any controls in the toolbars of the frame.
EDA_ANGLE GetRotationAngle() const override
Return the angle used for rotate operations.
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
COLOR4D GetGridColor() override
void RebuildAndRefresh()
Rebuilds board connectivity, refreshes canvas.
void Files_io(wxCommandEvent &event)
Call Files_io_from_id with the wxCommandEvent id.
void UpdateTitle()
Set the main window title bar text.
int inferLegacyEdgeClearance(BOARD *aBoard, bool aShowUserMsg=true)
DIALOG_BOOK_REPORTER * m_footprintDiffDlg
const std::map< std::string, UTF8 > * m_importProperties
static bool GetActionPluginButtonVisible(const wxString &aPluginPath, bool aPluginDefault)
Return true if button visibility action plugin setting was set to true or it is unset and plugin defa...
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
void ExportToGenCAD(wxCommandEvent &event)
Create a file in GenCAD 1.4 format from the current board.
void ActivateGalCanvas() override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
wxChoice * m_SelViaSizeBox
void Process_Special_Functions(wxCommandEvent &event)
Definition: edit.cpp:53
std::vector< BOARD_ITEM * > FindItemsFromSyncSelection(std::string syncStr)
Used to find items by selection synchronization spec string.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void OnQuit(wxCommandEvent &event)
bool ExportVRML_File(const wxString &aFullFileName, double aMMtoWRMLunit, bool aIncludeUnspecified, bool aIncludeDNP, bool aExport3DFiles, bool aUseRelativePaths, const wxString &a3D_Subdir, double aXRef, double aYRef)
Create the file(s) exporting current BOARD to a VRML file.
void OnActionPluginMenu(wxCommandEvent &aEvent)
Launched by the menu when an action is called.
void GenFootprintsReport(wxCommandEvent &event)
Call DoGenFootprintsReport to create a footprint report file.
void onCloseModelessBookReporterDialogs(wxCommandEvent &aEvent)
bool SavePcbFile(const wxString &aFileName, bool addToHistory=true, bool aChangeProject=true)
Write the board data structures to a aFileName.
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
bool ExportSpecctraFile(const wxString &aFullFilename)
Export the current BOARD to a specctra dsn file.
DIALOG_BOARD_SETUP * m_boardSetupDlg
bool DoGenFootprintsReport(const wxString &aFullFilename, bool aUnitsMM)
Create an ASCII footprint report file giving some infos on footprints and board outlines.
DIALOG_BOOK_REPORTER * GetInspectClearanceDialog()
bool importFile(const wxString &aFileName, int aFileType, const std::map< std::string, UTF8 > *aProperties=nullptr)
Load the given filename but sets the path to the current project path.
bool Export_IDF3(BOARD *aPcb, const wxString &aFullFileName, bool aUseThou, double aXRef, double aYRef, bool aIncludeUnspecified, bool aIncludeDNP)
Create an IDF3 compliant BOARD (*.emn) and LIBRARY (*.emp) file.
Definition: export_idf.cpp:608
wxTimer * m_eventCounterTimer
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void saveProjectSettings() override
Saves any design-related project settings associated with this frame.
void SendCrossProbeNetName(const wxString &aNetName)
Send a net name to Eeschema for highlighting.
static const wxString SearchPaneName()
wxChoice * m_SelTrackWidthBox
DIALOG_BOOK_REPORTER * m_inspectClearanceDlg
void AddActionPluginTools()
Append action plugin buttons to main toolbar.
void OnFileHistory(wxCommandEvent &event)
void ToPlotter(int aID)
Open a dialog frame to create plot and drill files relative to the current board.
DIALOG_BOOK_REPORTER * GetInspectConstraintsDialog()
A set of BOARD_ITEMs (i.e., without duplicates).
Definition: pcb_group.h:52
Class to display a pcb layer list in a wxBitmapComboBox.
A holder to handle information on schematic or board items.
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:72
Represent a single user action.
Definition: tool_action.h:269
Handle a list of polygons defining a copper zone.
Definition: zone.h:73
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:191
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
LAST_PATH_TYPE
For storing PcbNew MRU paths of various types.
Definition: project_file.h:48
A filename or source description, a problem input line, a line number, a byte offset,...
Definition: ki_exception.h:120
Store the previous layer toolbar icon state information.