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 The 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>
28#include <variant>
29
30class ACTION_PLUGIN;
31class PCB_SCREEN;
32class BOARD;
33class BOARD_COMMIT;
35class DESIGN_BLOCK;
37class FOOTPRINT;
38class PCB_TRACK;
39class PCB_VIA;
40class PAD;
41class PCB_SELECTION;
42class PCB_TARGET;
43class PCB_GROUP;
45class DRC;
46class DIALOG_FIND;
47class DIALOG_PLOT;
48class ZONE;
51class SELECTION;
52class PCB_MARKER;
53class BOARD_ITEM;
54class NETLIST;
55class REPORTER;
56struct PARSE_ERROR;
57class IO_ERROR;
58class FP_LIB_TABLE;
60class ACTION_MENU;
61class TOOL_ACTION;
64
65#ifdef KICAD_IPC_API
67class API_HANDLER_PCB;
69#endif
70
71enum LAST_PATH_TYPE : unsigned int;
72
73namespace PCB { struct IFACE; } // KIFACE is in pcbnew.cpp
74
81{
82public:
83 virtual ~PCB_EDIT_FRAME();
84
93 void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
94
95 void OnQuit( wxCommandEvent& event );
96
102 bool IsContentModified() const override;
103
108
113
118 void UpdateUserInterface();
119
120 void HardRedraw() override;
121
125 void RebuildAndRefresh();
126
135 void ExecuteRemoteCommand( const char* cmdline ) override;
136
137 void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
138
142 std::vector<BOARD_ITEM*> FindItemsFromSyncSelection( std::string syncStr );
143
147 static const wxString SearchPaneName() { return wxT( "Search" ); }
148
152 void ShowFindDialog();
153
157 void FindNext( bool reverse = false );
158
159 bool LayerManagerShown();
160 bool PropertiesShown();
161 bool NetInspectorShown();
162
163 void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
164 void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
165
166 void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
167 bool aShowEdit );
168 void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit );
169
173 EDA_ANGLE GetRotationAngle() const override;
174
178 COLOR4D GetGridColor() override;
179
183 void SetGridColor( const COLOR4D& aColor ) override;
184
189 static bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
190
195 static std::vector<std::variant<ACTION_PLUGIN*, const PLUGIN_ACTION*>> GetOrderedActionPlugins();
196
197 void SaveProjectLocalSettings() override;
198
205 bool LoadProjectSettings();
206
207 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
208
209 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
210
214 void LoadDrawingSheet();
215
221 wxString GetLastPath( LAST_PATH_TYPE aType );
222
234 void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
235
240 void ResolveDRCExclusions( bool aCreateMarkers );
241
242 void Process_Special_Functions( wxCommandEvent& event );
243 void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
244
245
246
255 void ReCreateLayerBox( bool aForceResizeToolbar = true );
256
257
264 void OnModify() override;
265
269 void SetActiveLayer( PCB_LAYER_ID aLayer ) override
270 {
271 SetActiveLayer( aLayer, false );
272 }
273
279 void SetActiveLayer( PCB_LAYER_ID aLayer, bool aForceRedraw );
280
281 void OnDisplayOptionsChanged() override;
282
290 bool IsElementVisible( GAL_LAYER_ID aElement ) const;
291
299 void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
300
302 void ActivateGalCanvas() override;
303
304 void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString, wxWindow* aParent = nullptr );
305
306 void PrepareLayerIndicator( bool aForceRebuild = false );
307
308 void ToggleLayersManager();
309
310 void ToggleNetInspector();
311
312 void ToggleSearch();
313
314 bool IsSearchPaneShown() { return m_auimgr.GetPane( SearchPaneName() ).IsShown(); }
315 void FocusSearch();
316
317 void ToggleLibraryTree() override;
318
337 int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM, bool aOnlySMD,
338 bool aNoTHItems, bool aExcludeDNP, bool aExcludeBOM, bool aTopSide,
339 bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin,
340 bool aNegateBottomX );
341
342 void OnFileHistory( wxCommandEvent& event );
343 void OnClearFileHistory( wxCommandEvent& aEvent );
344
345 bool SaveBoard( bool aSaveAs = false, bool aSaveCopy = false );
346
359 bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
360
372 bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
373 bool aChangeProject = true );
374
387 bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false,
388 bool aHeadless = false );
389
397 bool Clear_Pcb( bool doAskAboutUnsavedChanges, bool aFinal = false );
398
400 void SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr ) override
401 {
402 SetBoard( aBoard, true, aReporter );
403 }
404
405 void SetBoard( BOARD* aBoard, bool aBuildConnectivity, PROGRESS_REPORTER* aReporter = nullptr );
406
408 BOARD_ITEM_CONTAINER* GetModel() const override;
409
410 std::unique_ptr<GRID_HELPER> MakeGridHelper() override;
411
413 void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
414
415 bool SaveBoardAsDesignBlock( const wxString& aLibraryName );
416
417 bool SaveSelectionAsDesignBlock( const wxString& aLibraryName );
418
419 bool SaveBoardToDesignBlock( const LIB_ID& aLibId );
420
421 bool SaveSelectionToDesignBlock( const LIB_ID& aLibId );
422
424
436 void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
437 wxString* aLibPath = nullptr );
438
463 bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
464 bool aIncludeUnspecified, bool aIncludeDNP,
465 bool aExport3DFiles, bool aUseRelativePaths,
466 const wxString& a3D_Subdir, double aXRef, double aYRef );
467
472
485 bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
486 bool aUseThou, double aXRef, double aYRef,
487 bool aIncludeUnspecified, bool aIncludeDNP );
488
493
501 bool ExportSpecctraFile( const wxString& aFullFilename );
502
509 bool ImportSpecctraSession( const wxString& aFullFilename );
510
511 // Footprint editing (see also PCB_BASE_FRAME)
512 void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
513
514 int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
515
526 void ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, BOARD_COMMIT& aCommit,
527 bool deleteExtraTexts = true,
528 bool resetTextLayers = true,
529 bool resetTextEffects = true,
530 bool resetTextPositions = true,
531 bool resetTextContent = true,
532 bool resetFabricationAttrs = true,
533 bool resetClearanceOverrides = true,
534 bool reset3DModels = true,
535 bool* aUpdated = nullptr );
536
543 void OnEditItemRequest( BOARD_ITEM* aItem ) override;
544
550 void SwitchLayer( PCB_LAYER_ID layer ) override;
551
564 void SetTrackSegmentWidth( PCB_TRACK* aItem, PICKED_ITEMS_LIST* aItemsListPicker,
565 bool aUseDesignRules );
566
567
571 void Edit_Zone_Params( ZONE* zone_container );
572
573 // Properties dialogs
574 void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
575 void InstallNetlistFrame();
576
583 bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
584
592 int TestStandalone();
593
602 bool ReadNetlistFromFile( const wxString& aFilename, NETLIST& aNetlist, REPORTER& aReporter );
603
610 void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
611
622 void SendSelectItemsToSch( const std::deque<EDA_ITEM*>& aItems, EDA_ITEM* aFocusItem,
623 bool aForce );
624
631 void SendCrossProbeItem( BOARD_ITEM* aSyncItem );
632
638 void SendCrossProbeNetName( const wxString& aNetName );
639
640 void ShowChangedLanguage() override;
641
645 void OnBoardLoaded();
646
655 void UpdateTitle();
656
660 void CommonSettingsChanged( int aFlags ) override;
661
665 void ThemeChanged() override;
666
667 void ProjectChanged() override;
668
669 bool CanAcceptApiCommands() override;
670
671 wxString GetCurrentFileName() const override;
672
673 SELECTION& GetCurrentSelection() override;
674
676
678
680
682
684
691 bool DoAutoSave();
692
693 DECLARE_EVENT_TABLE()
694
695protected:
714
716
717 void doReCreateMenuBar() override;
718
719 void configureToolbars() override;
720
721 // The Tool Framework initialization
722 void setupTools();
723 void setupUIConditions() override;
724
730 void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
731
735 void buildActionPluginMenus( ACTION_MENU* aActionMenu );
736
740 void addActionPluginTools( ACTION_TOOLBAR* aToolbar );
741
747 void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
748
754 void OnActionPluginMenu( wxCommandEvent& aEvent);
755
761 void OnActionPluginButton( wxCommandEvent& aEvent );
762
764
771 bool doAutoSave() override { return DoAutoSave(); }
772
779 bool importFile( const wxString& aFileName, int aFileType,
780 const std::map<std::string, UTF8>* aProperties = nullptr );
781
791 bool saveBoardAsFile( BOARD* aBoard, const wxString& aFileName, bool aHeadless = false );
792
793 bool saveSelectionToDesignBlock( const wxString& aNickname, PCB_SELECTION& aSelection, DESIGN_BLOCK& aBlock );
794
795
796 bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
797 void doCloseWindow() override;
798
799 // protected so that PCB::IFACE::CreateWindow() is the only factory.
800 PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
801
802 void onSize( wxSizeEvent& aEvent );
803
804 int inferLegacyEdgeClearance( BOARD* aBoard, bool aShowUserMsg = true );
805
806 void redrawNetnames();
807
808 void saveProjectSettings() override;
809
810 void onCloseModelessBookReporterDialogs( wxCommandEvent& aEvent );
811
812#ifdef KICAD_IPC_API
813 void onPluginAvailabilityChanged( wxCommandEvent& aEvt );
814#endif
815
816public:
817 wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
818 wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
819
823
824 bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
825
826 bool m_probingSchToPcb; // Recursion guard when synchronizing selection from schematic
827
828 // Cross-probe flashing support
831 std::vector<KIID> m_crossProbeFlashItems;
832 bool m_crossProbeFlashing = false;
833
834 void StartCrossProbeFlash( const std::vector<BOARD_ITEM*>& aItems );
835 void OnCrossProbeFlashTimer( wxTimerEvent& aEvent );
836
837private:
838 friend struct PCB::IFACE;
840
849
856
857 std::vector<LIB_ID> m_designBlockHistoryList;
859
860 const std::map<std::string, UTF8>* m_importProperties; // Properties used for non-KiCad import.
861
866
868
869#ifdef KICAD_IPC_API
870 std::unique_ptr<API_HANDLER_PCB> m_apiHandler;
871 std::unique_ptr<API_HANDLER_COMMON> m_apiHandlerCommon;
872#endif
873};
874
875#endif // __PCB_EDIT_FRAME_H__
PLUGIN_ACTION_SCOPE
Definition api_plugin.h:56
BOX2< VECTOR2D > BOX2D
Definition box2.h:923
Define the structure of a menu based on ACTIONs.
Definition action_menu.h:47
This is the parent class from where any action plugin class must derive.
Define the structure of a toolbar with buttons that invoke ACTIONs.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
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:322
A dialog to set the plot options and create plot files in various formats.
Definition dialog_plot.h:41
wxAuiManager m_auimgr
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
A general implementation of a COLLECTORS_GUIDE.
Definition collectors.h:324
Used when the right click button is pressed, or when the select tool is in effect.
Definition collectors.h:207
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
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.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:286
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:49
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
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:79
PCB_BASE_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
Abstract dimension API.
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:99
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aOnlySMD, bool aNoTHItems, bool aExcludeDNP, bool aExcludeBOM, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
Create an ASCII footprint position file.
bool saveBoardAsFile(BOARD *aBoard, const wxString &aFileName, bool aHeadless=false)
Save a board object to a file.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
int m_crossProbeFlashPhase
Phase counter.
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.
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.
std::vector< LIB_ID > m_designBlockHistoryList
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:72
wxTimer m_crossProbeFlashTimer
Timer to toggle selection visibility for flash.
void StartCrossProbeFlash(const std::vector< BOARD_ITEM * > &aItems)
void OnCrossProbeFlashTimer(wxTimerEvent &aEvent)
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
bool DoAutoSave()
Perform auto save when the board has been modified and not saved within the auto save interval.
void UpdateTrackWidthSelectBox(wxChoice *aTrackWidthSelectBox, bool aShowNetclass, bool aShowEdit)
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Change the visibility of an element category.
void OnExportSTEP()
Export the current BOARD to a STEP assembly.
static std::vector< std::variant< ACTION_PLUGIN *, const PLUGIN_ACTION * > > GetOrderedActionPlugins()
Return ordered list of plugins in sequence in which they should appear on toolbar or in settings.
bool SaveBoardToDesignBlock(const LIB_ID &aLibId)
DIALOG_BOOK_REPORTER * m_inspectDrcErrorDlg
void OnClearFileHistory(wxCommandEvent &aEvent)
bool SaveBoard(bool aSaveAs=false, bool aSaveCopy=false)
std::unique_ptr< GRID_HELPER > MakeGridHelper() 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)
void CommonSettingsChanged(int aFlags) override
Called after the preferences dialog is run.
BOARD_ITEM_CONTAINER * GetModel() const override
DIALOG_BOOK_REPORTER * GetInspectDrcErrorDialog()
bool saveSelectionToDesignBlock(const wxString &aNickname, PCB_SELECTION &aSelection, DESIGN_BLOCK &aBlock)
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString, wxWindow *aParent=nullptr)
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
Check if this frame is ready to accept API commands.
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
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 OnExportHyperlynx()
Export the current BOARD to a Hyperlynx HYP file.
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...
bool SavePcbCopy(const wxString &aFileName, bool aCreateProject=false, bool aHeadless=false)
Write the board data structures to aFileName.
void RunActionPlugin(ACTION_PLUGIN *aActionPlugin)
Execute action plugin's Run() method and updates undo buffer.
void PythonSyncProjectName()
Synchronize the project name from KiCad's environment into the Python interpreter.
bool m_show_layer_manager_tools
void SetTrackSegmentWidth(PCB_TRACK *aItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseDesignRules)
Modify one track segment width or one via diameter (using DRC control).
PCB_DESIGN_BLOCK_PANE * GetDesignBlockPane() const
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)
void addActionPluginTools(ACTION_TOOLBAR *aToolbar)
Append action plugin buttons to given toolbar.
int TestStandalone()
Test if standalone mode.
void ShowFootprintPropertiesDialog(FOOTPRINT *aFootprint)
bool SaveSelectionAsDesignBlock(const wxString &aLibraryName)
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
bool m_crossProbeFlashing
Currently flashing guard.
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 OnBoardLoaded()
Update the state of the GUI after a new board is loaded or created.
void Edit_Zone_Params(ZONE *zone_container)
Edit params (layer, clearance, ...) for a zone outline.
void ToggleLibraryTree() override
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:164
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...
DIALOG_BOOK_REPORTER * GetFootprintDiffDialog()
bool SaveSelectionToDesignBlock(const LIB_ID &aLibId)
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.
std::vector< KIID > m_crossProbeFlashItems
Items to flash (by UUID)
void UpdateTitle()
Set the main window title bar text.
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetTextPositions=true, bool resetTextContent=true, bool resetFabricationAttrs=true, bool resetClearanceOverrides=true, bool reset3DModels=true, bool *aUpdated=nullptr)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
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...
void ActivateGalCanvas() override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
bool SaveBoardAsDesignBlock(const wxString &aLibraryName)
wxChoice * m_SelViaSizeBox
void Process_Special_Functions(wxCommandEvent &event)
Definition edit.cpp:54
void configureToolbars() override
std::vector< BOARD_ITEM * > FindItemsFromSyncSelection(std::string syncStr)
Used to find items by selection synchronization spec string.
friend class APPEARANCE_CONTROLS
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 onCloseModelessBookReporterDialogs(wxCommandEvent &aEvent)
PCB_DESIGN_BLOCK_PANE * m_designBlocksPane
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
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.
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
Save 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 OnFileHistory(wxCommandEvent &event)
DIALOG_BOOK_REPORTER * GetInspectConstraintsDialog()
A set of BOARD_ITEMs (i.e., without duplicates).
Definition pcb_group.h:53
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:73
Represent a single user action.
Handle a list of polygons defining a copper zone.
Definition zone.h:74
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition layer_ids.h:228
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.
A filename or source description, a problem input line, a line number, a byte offset,...
Store the previous layer toolbar icon state information.