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
18 * along with this program. If not, see <https://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 <board.h>
27#include <mail_type.h>
29#include <variant>
30
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;
48class DIALOG_PLOT;
49class ZONE;
52class SELECTION;
53class PCB_MARKER;
54class BOARD_ITEM;
55class NETLIST;
56class REPORTER;
57struct PARSE_ERROR;
58class IO_ERROR;
59class FP_LIB_TABLE;
61class ACTION_MENU;
62class TOOL_ACTION;
67class WX_INFOBAR;
68
70class API_HANDLER_PCB;
73
74enum LAST_PATH_TYPE : unsigned int;
75
76namespace PCB { struct IFACE; } // KIFACE is in pcbnew.cpp
77
78wxDECLARE_EVENT( EDA_EVT_PCB_LAST_SCH_SHEET_CHANGED, wxCommandEvent );
79
86{
87public:
88 virtual ~PCB_EDIT_FRAME();
89
90 void OnQuit( wxCommandEvent& event );
91
97 bool IsContentModified() const override;
98
103 void UpdateUserInterface();
104
105 void HardRedraw() override;
106
115 void ExecuteRemoteCommand( const char* cmdline ) override;
116
117 void HandleRemoteNetHighlight( const std::vector<wxString>& aNetNames );
118
119 void KiwayMailIn( KIWAY_MAIL_EVENT& aEvent ) override;
120
121 void SetLastSchematicSheetPath( const KIID_PATH& aPath );
123
127 static const wxString SearchPaneName() { return wxT( "Search" ); }
128 static const wxString ConstraintsPaneName() { return wxT( "Constraints" ); }
129
132
135
139 void ShowFindDialog();
140
145
150
154 void FindNext( bool reverse = false );
155
156 bool LayerManagerShown();
157 bool PropertiesShown();
158 bool NetInspectorShown();
159
160 void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
161 void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
162
163 void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
164 bool aShowEdit );
165 void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit );
166
170 void UpdateViaStackSelectBox( wxChoice* aViaStackSelectBox );
171
179
184 void SetCurrentVariant( const wxString& aVariantName );
185
189 void onVariantSelected( wxCommandEvent& aEvent );
190
194 EDA_ANGLE GetRotationAngle() const override;
195
199 COLOR4D GetGridColor() override;
200
204 void SetGridColor( const COLOR4D& aColor ) override;
205
210 static bool GetPluginActionButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
211
216 static std::vector<const PLUGIN_ACTION*> GetOrderedPluginActions();
217
218 void SaveProjectLocalSettings() override;
219
226 bool LoadProjectSettings();
227
230
238
241
242 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
243
244 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
245
249 void LoadDrawingSheet();
250
256 wxString GetLastPath( LAST_PATH_TYPE aType );
257
270 void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
271
276 void ResolveDRCExclusions( bool aCreateMarkers );
277
278 void Process_Special_Functions( wxCommandEvent& event );
279 void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
280
284 void SelectViaStack_Event( wxCommandEvent& event );
285
286
295 void ReCreateLayerBox( bool aForceResizeToolbar = true );
296
297
304 void OnModify() override;
305
309 void OnBoardItemsChanged( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override;
310
314 void SetActiveLayer( PCB_LAYER_ID aLayer ) override
315 {
316 SetActiveLayer( aLayer, false );
317 }
318
324 void SetActiveLayer( PCB_LAYER_ID aLayer, bool aForceRedraw );
325
326 void OnDisplayOptionsChanged() override;
327
335 bool IsElementVisible( GAL_LAYER_ID aElement ) const;
336
344 void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
345
347 void ActivateGalCanvas() override;
348
355 void RefreshDrillSymbols( int aUpdateFlags ) override;
356
357 void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString, wxWindow* aParent = nullptr );
358
359 void PrepareLayerIndicator( bool aForceRebuild = false );
360
361 void ToggleLayersManager();
362
363 void ToggleNetInspector();
364
365 void ToggleSearch();
366
367 bool IsSearchPaneShown() { return m_auimgr.GetPane( SearchPaneName() ).IsShown(); }
368 void FocusSearch();
369
370 void ToggleLibraryTree() override;
371
390 int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM, bool aOnlySMD,
391 bool aNoTHItems, bool aExcludeDNP, bool aExcludeBOM, bool aTopSide,
392 bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin,
393 bool aNegateBottomX );
394
395 void OnFileHistory( wxCommandEvent& event );
396 void OnClearFileHistory( wxCommandEvent& aEvent );
397
398 bool SaveBoard( bool aSaveAs = false, bool aSaveCopy = false );
399
412 bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
413
420 bool ReloadFromDisk();
421
433 bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
434 bool aChangeProject = true );
435
448 bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false,
449 bool aHeadless = false );
450
458 bool Clear_Pcb( bool doAskAboutUnsavedChanges, bool aFinal = false );
459
461 void SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr ) override
462 {
463 SetBoard( aBoard, true, aReporter );
464 }
465
466 void SetBoard( BOARD* aBoard, bool aBuildConnectivity, PROGRESS_REPORTER* aReporter = nullptr );
467
469 BOARD_ITEM_CONTAINER* GetModel() const override;
470
471 std::unique_ptr<GRID_HELPER> MakeGridHelper() override;
472
474 void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
475
476 bool SaveBoardAsDesignBlock( const wxString& aLibraryName );
477
478 bool SaveSelectionAsDesignBlock( const wxString& aLibraryName );
479
480 bool UpdateDesignBlockFromBoard( const LIB_ID& aLibId );
481
482 bool UpdateDesignBlockFromSelection( const LIB_ID& aLibId );
483
485
497 void ExportFootprintsToLibrary( bool aStoreInNewLib );
498
525 bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
526 bool aIncludeUnspecified, bool aIncludeDNP,
527 bool aExport3DFiles, bool aUseRelativePaths,
528 const wxString& a3D_Subdir, double aXRef, double aYRef );
529
537 bool ExportSpecctraFile( const wxString& aFullFilename );
538
548 bool ImportSpecctraSession( const wxString& aFullFilename );
549
550 // Footprint editing (see also PCB_BASE_FRAME)
551 void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
552
553 int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
554
560 void OnEditItemRequest( BOARD_ITEM* aItem ) override;
561
567 void SwitchLayer( PCB_LAYER_ID layer ) override;
568
581 void SetTrackSegmentWidth( PCB_TRACK* aItem, PICKED_ITEMS_LIST* aItemsListPicker,
582 bool aUseDesignRules );
583
584
588 void Edit_Zone_Params( ZONE* zone_container );
589
590 // Properties dialogs
591 void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
592 void InstallNetlistFrame();
593
600 bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
601
609 int TestStandalone();
610
619 bool ReadNetlistFromFile( const wxString& aFilename, NETLIST& aNetlist, REPORTER& aReporter );
620
627 void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
628
639 void SendSelectItemsToSch( const std::deque<EDA_ITEM*>& aItems, EDA_ITEM* aFocusItem,
640 bool aForce );
641
648 void SendCrossProbeItem( BOARD_ITEM* aSyncItem );
649
655 void SendCrossProbeNetName( const wxString& aNetName );
656
657 void ShowChangedLanguage() override;
658
662 void OnBoardLoaded();
663
672 void UpdateTitle();
673
677 void CommonSettingsChanged( int aFlags ) override;
678
682 void ThemeChanged() override;
683
684 void ProjectChanged() override;
685
686 bool CanAcceptApiCommands() override;
687
688 wxString GetCurrentFileName() const override;
689
690 SELECTION& GetCurrentSelection() override;
691
693
695
697
699
701
704
711 bool DoAutoSave();
712
713 void ClearToolbarControl( int aId ) override;
714
715 DECLARE_EVENT_TABLE()
716
717protected:
736
738
739 void doReCreateMenuBar() override;
740
741 void configureToolbars() override;
742
743 void ReCreateAuxiliaryToolbar() override;
744
745 // The Tool Framework initialization
746 void setupTools();
747 void setupUIConditions() override;
748
754 void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
755
757
764 bool doAutoSave() override { return DoAutoSave(); }
765
766 bool canRunAutoSave() const override;
767
774
782 bool importFile( const wxString& aFileName, int aFileType,
783 const std::map<std::string, UTF8>* aProperties = nullptr );
784
796 std::vector<std::unique_ptr<FOOTPRINT>> aDefinitions, const wxString& aBoardPath );
797
807 bool saveBoardAsFile( BOARD& aBoard, const wxString& aFileName, bool aHeadless = false );
808
809 bool saveSelectionToDesignBlock( const wxString& aNickname, PCB_SELECTION& aSelection, DESIGN_BLOCK& aBlock );
810
811
812 bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
813 void doCloseWindow() override;
814
815 // protected so that PCB::IFACE::CreateWindow() is the only factory.
816 PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
817
818 int inferLegacyEdgeClearance( BOARD* aBoard, bool aShowUserMsg = true );
819
820 void redrawNetnames();
821
822 void saveProjectSettings() override;
823
824 void onCloseModelessBookReporterDialogs( wxCommandEvent& aEvent );
825 void onCloseFootprintFieldsTableDialog( wxCommandEvent& aEvent );
826
827 void onPluginAvailabilityChanged( wxCommandEvent& aEvt );
828
829public:
830 wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
831 wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
832 wxChoice* m_SelViaStackBox; // a choice box to display and select current via stack preset
833 wxChoice* m_CurrentVariantCtrl; // a choice box to display and select current variant
834
838
839 bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
840
841 bool m_ProbingSchToPcb; // Recursion guard when synchronizing selection from schematic
842
848 std::size_t m_textVarListenerHandle = 0;
850
857
858 void StartCrossProbeFlash( const std::vector<BOARD_ITEM*>& aItems );
859 void OnCrossProbeFlashTimer( wxTimerEvent& aEvent );
860 void UpdateProperties() override;
861
862private:
865
867 void addExclusionMarkers( const std::vector<PCB_MARKER*>& aMarkers );
868
869 friend struct PCB::IFACE;
871
880
889
890 std::vector<LIB_ID> m_designBlockHistoryList;
892 // Tool Reset() reads this before the ctor creates the panel.
894
900
901 const std::map<std::string, UTF8>* m_importProperties; // Properties used for non-KiCad import.
902
908
910
911 // Cross-probe flashing support
914 std::vector<KIID> m_crossProbeFlashItems;
915 bool m_crossProbeFlashing = false;
916
917 // Most recent schematic path (default to root), used in the footprint fields
918 // table to enable the same schematic scope limiting as the symbol fields table
920
921 std::unique_ptr<API_HANDLER_PCB> m_apiHandler;
922 std::unique_ptr<API_HANDLER_COMMON> m_apiHandlerCommon;
923 std::unique_ptr<API_HANDLER_LIBRARIES> m_apiLibrariesHandler;
924};
925
926#endif // __PCB_EDIT_FRAME_H__
BOX2< VECTOR2D > BOX2D
Definition box2.h:918
Define the structure of a menu based on ACTIONs.
Definition action_menu.h:43
Base class for API handlers related to library management.
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:99
Update the BOARD with a new netlist.
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
A dialog to set the plot options and create plot files in various formats.
Definition dialog_plot.h:38
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:320
Used when the right click button is pressed, or when the select tool is in effect.
Definition collectors.h:203
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:101
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition kiway_mail.h:34
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:348
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
Definition pad.h:61
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition page_info.h:75
Dockable panel listing the board's geometric constraints (issue #2329).
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
std::size_t m_textVarListenerHandle
Reactive text-var invalidation listener state.
static bool GetPluginActionButtonVisible(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 OnEditItemRequest(BOARD_ITEM *aItem) override
Install the corresponding dialog editor for the given item.
Definition edit.cpp:95
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.
void SelectViaStack_Event(wxCommandEvent &event)
Handle the via stack preset selector on the auxiliary toolbar.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool interactiveOperationInProgress() const
Return true when an interactive tool operation (routing, dragging, point editing, zone filling,...
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.
bool saveBoardAsFile(BOARD &aBoard, const wxString &aFileName, bool aHeadless=false)
Save a board object to a file.
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 addExclusionMarkers(const std::vector< PCB_MARKER * > &aMarkers)
Add the markers a resolve created for exclusions and redraw every excluded marker.
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.
void SwitchLayer(PCB_LAYER_ID layer) override
Change the active layer in the editor.
Definition edit.cpp:68
wxTimer m_crossProbeFlashTimer
Timer to toggle selection visibility for flash.
void StartCrossProbeFlash(const std::vector< BOARD_ITEM * > &aItems)
void OnCrossProbeFlashTimer(wxTimerEvent &aEvent)
std::unique_ptr< API_HANDLER_PCB > m_apiHandler
void KiwayMailIn(KIWAY_MAIL_EVENT &aEvent) override
Receive KIWAY_MAIL_EVENT messages from other players.
bool CloseFootprintFieldsTableDialog()
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
DIALOG_FOOTPRINT_FIELDS_TABLE * m_footprintFieldsTableDialog
bool ReloadFromDisk()
Reload the board from disk.
void UpdateVariantSelectionCtrl()
Update the variant selection dropdown with the current board's variant names.
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.
DIALOG_BOOK_REPORTER * m_inspectDrcErrorDlg
void SetLastSchematicSheetPath(const KIID_PATH &aPath)
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 RefreshProjectSettings()
Update what depends on the board's project settings after they changed in memory.
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit)
void CommonSettingsChanged(int aFlags) override
Called after the preferences dialog is run.
void ShowFindByPropertiesDialog()
Show the Find by Properties dialog.
BOARD_ITEM_CONTAINER * GetModel() const override
DIALOG_BOOK_REPORTER * GetInspectDrcErrorDialog()
void SetCurrentVariant(const wxString &aVariantName)
Set the current variant on the board and update the drawing sheet's cached variant name and descripti...
bool saveSelectionToDesignBlock(const wxString &aNickname, PCB_SELECTION &aSelection, DESIGN_BLOCK &aBlock)
KIID_PATH GetLastSchematicSheetPath() const
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString, wxWindow *aParent=nullptr)
void ApplyProjectFileSettings()
Apply what the project file sets and this frame caches, leaving the local settings alone.
std::unique_ptr< API_HANDLER_COMMON > m_apiHandlerCommon
DIALOG_FOOTPRINT_FIELDS_TABLE * GetFootprintFieldsTableDialog()
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
bool UpdateDesignBlockFromBoard(const LIB_ID &aLibId)
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void onCloseFootprintFieldsTableDialog(wxCommandEvent &aEvent)
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 ExportFootprintsToLibrary(bool aStoreInNewLib)
Save footprints in a library:
void SetGridColor(const COLOR4D &aColor) override
void ProjectChanged() override
Notification event that the project has changed.
bool UpdateDesignBlockFromSelection(const LIB_ID &aLibId)
static const wxString ConstraintsPaneName()
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.
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 footprints and to replace all vias and tracks in ...
WX_INFOBAR * m_loadNoticeInfoBar
Secondary infobar that stacks above the main one; reserved for load-time notices (currently the WRL -...
void ClearToolbarControl(int aId) override
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.
KIID_PATH m_lastSchematicSheetPath
static std::vector< const PLUGIN_ACTION * > GetOrderedPluginActions()
Return ordered list of plugins in sequence in which they should appear on toolbar or in 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 detachTextVarTracker()
Drop every cached reference into the current BOARD's text-var tracker.
void onPluginAvailabilityChanged(wxCommandEvent &aEvt)
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.
wxChoice * m_CurrentVariantCtrl
int ShowExchangeFootprintsDialog(FOOTPRINT *aFootprint, bool aUpdateMode, bool aSelectedMode)
int TestStandalone()
Test if standalone mode.
void ShowFootprintPropertiesDialog(FOOTPRINT *aFootprint)
void UpdateProperties() override
bool canRunAutoSave() const override
Return true when it is safe to run an autosave snapshot right now.
bool SaveSelectionAsDesignBlock(const wxString &aLibraryName)
PANEL_CONSTRAINTS * m_constraintsPanel
Dockable geometric-constraint list (#2329).
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...
bool Clear_Pcb(bool doAskAboutUnsavedChanges, bool aFinal=false)
Delete all and reinitialize the current board.
Definition initpcb.cpp:38
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
std::unique_ptr< API_HANDLER_LIBRARIES > m_apiLibrariesHandler
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 ReCreateAuxiliaryToolbar() override
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 OnBoardItemsChanged(BOARD &aBoard, std::vector< BOARD_ITEM * > &aItems) override
Keep the selection and view in step with generated tables rebuilt outside a commit.
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 HandleRemoteNetHighlight(const std::vector< wxString > &aNetNames)
DIALOG_BOOK_REPORTER * GetFootprintDiffDialog()
EDA_ANGLE GetRotationAngle() const override
Return the angle used for rotate operations.
void ToggleConstraintsPanel()
Show/hide the dockable geometric-constraint list pane, refreshing it when shown (#2329).
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
COLOR4D GetGridColor() override
std::vector< KIID > m_crossProbeFlashItems
Items to flash (by UUID)
void UpdateTitle()
Set the main window title bar text.
void RefreshDrillSymbols(int aUpdateFlags) override
Tell every hole to redraw its drill symbol.
int inferLegacyEdgeClearance(BOARD *aBoard, bool aShowUserMsg=true)
DIALOG_BOOK_REPORTER * m_footprintDiffDlg
const std::map< std::string, UTF8 > * m_importProperties
void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
bool SaveBoardAsDesignBlock(const wxString &aLibraryName)
void recompileDesignRules()
Recompile the design rules, reporting a parse error in the infobar.
wxChoice * m_SelViaSizeBox
void Process_Special_Functions(wxCommandEvent &event)
Definition edit.cpp:50
void onVariantSelected(wxCommandEvent &aEvent)
Event handler for variant selection changes in the toolbar.
void configureToolbars() override
friend class APPEARANCE_CONTROLS
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void OnQuit(wxCommandEvent &event)
void reconcileImportedFootprintLibraries(std::vector< std::unique_ptr< FOOTPRINT > > aDefinitions, const wxString &aBoardPath)
Reconcile the footprint-library references of a freshly imported non-KiCad board so that every board ...
void UpdateViaStackSelectBox(wxChoice *aViaStackSelectBox)
Fill the via stack preset selector with the board's defined presets plus an edit entry.
void NotifyFindByPropertiesDialog()
Notify the Find by Properties dialog that the selection has changed.
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.
double m_lastNetnamesScale
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
void ReloadProjectFileSettings()
Bring the frame in line with a project file that was reread from disk.
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.
wxChoice * m_SelViaStackBox
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_FIND_BY_PROPERTIES * m_findByPropertiesDialog
PANEL_CONSTRAINTS * GetConstraintsPanel() const
The dockable geometric-constraint list pane (#2329), or nullptr.
DIALOG_BOOK_REPORTER * m_inspectClearanceDlg
void OnFileHistory(wxCommandEvent &event)
DIALOG_BOOK_REPORTER * GetInspectConstraintsDialog()
class TEXT_VAR_TRACKER * m_textVarListenerTracker
A set of BOARD_ITEMs (i.e., without duplicates).
Definition pcb_group.h:51
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
Coordinates the dependency index with change notifications.
Represent a single user action.
A modified version of the wxInfoBar class that allows us to:
Definition wx_infobar.h:77
Handle a list of polygons defining a copper zone.
Definition zone.h:70
#define UNSPECIFIED
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition layer_ids.h:224
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
wxDECLARE_EVENT(EDA_EVT_PCB_LAST_SCH_SHEET_CHANGED, wxCommandEvent)
PLUGIN_ACTION_SCOPE
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.