KiCad PCB EDA Suite
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-2021 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 <unordered_map>
25 #include <map>
26 #include "pcb_base_edit_frame.h"
27 #include "zones.h"
28 #include <mail_type.h>
29 
30 class ACTION_PLUGIN;
31 class PCB_SCREEN;
32 class BOARD;
33 class BOARD_COMMIT;
35 class FOOTPRINT;
36 class PCB_TRACK;
37 class PCB_VIA;
38 class PAD;
39 class PCB_TARGET;
40 class PCB_GROUP;
41 class PCB_DIMENSION_BASE;
42 class DRC;
43 class DIALOG_FIND;
44 class DIALOG_PLOT;
45 class ZONE;
46 class GENERAL_COLLECTOR;
48 class SELECTION;
49 class PCB_MARKER;
50 class BOARD_ITEM;
52 class NETLIST;
53 class REPORTER;
54 struct PARSE_ERROR;
55 class IO_ERROR;
56 class FP_LIB_TABLE;
58 class ACTION_MENU;
59 class TOOL_ACTION;
60 
61 enum LAST_PATH_TYPE : unsigned int;
62 
63 namespace PCB { struct IFACE; } // KIFACE is in pcbnew.cpp
64 
71 {
72 public:
73  virtual ~PCB_EDIT_FRAME();
74 
83  void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
84 
85  void OnQuit( wxCommandEvent& event );
86 
92  bool IsContentModified() const override;
93 
98 
102  void PythonSyncProjectName();
103 
108  void UpdateUserInterface();
109 
110  void HardRedraw() override;
111 
120  void ExecuteRemoteCommand( const char* cmdline ) override;
121 
122  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
123 
127  void ShowFindDialog();
128 
132  void FindNext();
133 
137  void ToPlotter( int aID );
138 
142  void ExportSVG( wxCommandEvent& event );
143 
144  // User interface update command event handlers.
145  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
146  bool LayerManagerShown();
147  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
148  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
149  void OnUpdateSelectAutoWidth( wxUpdateUIEvent& aEvent );
150 
151  void RunEeschema();
152 
153  void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit = true );
154  void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit = true );
155 
159  COLOR4D GetGridColor() override;
160 
164  void SetGridColor( const COLOR4D& aColor ) override;
165 
166  // Configurations:
167  void Process_Config( wxCommandEvent& event );
168 
173  bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
174 
179  std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
180 
184  void SaveProjectSettings() override;
185 
192  bool LoadProjectSettings();
193 
194  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
195 
196  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
197 
203  wxString GetLastPath( LAST_PATH_TYPE aType );
204 
216  void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
217 
221  void RecordDRCExclusions();
222 
226  void ResolveDRCExclusions();
227 
228  void Process_Special_Functions( wxCommandEvent& event );
229  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
230 
231  void ReCreateHToolbar() override;
232  void ReCreateAuxiliaryToolbar() override;
233  void ReCreateVToolbar() override;
234  void ReCreateOptToolbar() override;
235  void ReCreateMenuBar() override;
236  void UpdateToolbarControlSizes() override;
237 
246  void ReCreateLayerBox( bool aForceResizeToolbar = true );
247 
248 
255  void OnModify() override;
256 
260  void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
261 
262  void OnDisplayOptionsChanged() override;
263 
271  bool IsElementVisible( GAL_LAYER_ID aElement ) const;
272 
280  void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
281 
283  void ActivateGalCanvas() override;
284 
285  void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString );
286 
287  void PrepareLayerIndicator( bool aForceRebuild = false );
288 
289  void ToggleLayersManager();
290 
306  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM, bool aOnlySMD,
307  bool aNoTHItems, bool aTopSide, bool aBottomSide,
308  bool aFormatCSV, bool aUseAuxOrigin );
309 
313  void GenFootprintsReport( wxCommandEvent& event );
314 
322  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
323 
324  void GenD356File( wxCommandEvent& event );
325 
326  void OnFileHistory( wxCommandEvent& event );
327  void OnClearFileHistory( wxCommandEvent& aEvent );
328 
334  void Files_io( wxCommandEvent& event );
335 
349  bool Files_io_from_id( int aId );
350 
363  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
364 
376  bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
377  bool aChangeProject = true );
378 
390  bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false );
391 
398  bool Clear_Pcb( bool aQuery, bool aFinal = false );
399 
401  void SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr ) override
402  {
403  SetBoard( aBoard, true, aReporter );
404  }
405 
406  void SetBoard( BOARD* aBoard, bool aBuildConnectivity, PROGRESS_REPORTER* aReporter = nullptr );
407 
409  BOARD_ITEM_CONTAINER* GetModel() const override;
410 
412  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
413 
419  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
420 
432  void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
433  wxString* aLibPath = nullptr );
434 
438  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
439 
443  void ExportToGenCAD( wxCommandEvent& event );
444 
448  void OnExportVRML( wxCommandEvent& event );
449 
474  bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
475  bool aExport3DFiles, bool aUseRelativePaths,
476  const wxString& a3D_Subdir, double aXRef, double aYRef );
477 
481  void OnExportIDF3( wxCommandEvent& event );
482 
486  void OnExportHyperlynx( wxCommandEvent& event );
487 
498  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
499  bool aUseThou, double aXRef, double aYRef );
500 
504  void OnExportSTEP( wxCommandEvent& event );
505 
513  bool ExportSpecctraFile( const wxString& aFullFilename );
514 
521  bool ImportSpecctraSession( const wxString& aFullFilename );
522 
523  // Footprint editing (see also PCB_BASE_FRAME)
524  void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
525 
526  int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
527 
538  void ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, BOARD_COMMIT& aCommit,
539  bool deleteExtraTexts = true, bool resetTextLayers = true,
540  bool resetTextEffects = true, bool resetFabricationAttrs = true,
541  bool reset3DModels = true );
542 
549  void OnEditItemRequest( BOARD_ITEM* aItem ) override;
550 
556  void SwitchLayer( PCB_LAYER_ID layer ) override;
557 
570  void SetTrackSegmentWidth( PCB_TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker,
571  bool aUseNetclassValue );
572 
573 
577  void Edit_Zone_Params( ZONE* zone_container );
578 
579  // Properties dialogs
580  void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
582  void InstallNetlistFrame();
583 
590  bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
591 
597  bool TestStandalone( void );
598 
607  bool ReadNetlistFromFile( const wxString& aFilename, NETLIST& aNetlist, REPORTER& aReporter );
608 
615  void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
616 
623  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
624 
630  void SendCrossProbeNetName( const wxString& aNetName );
631 
632  void ShowChangedLanguage() override;
633 
642  void UpdateTitle();
643 
647  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
648 
652  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
653 
657  void ThemeChanged() override;
658 
659  void ProjectChanged() override;
660 
661  wxString GetCurrentFileName() const override;
662 
663  SELECTION& GetCurrentSelection() override;
664 
666 
667  DECLARE_EVENT_TABLE()
668 
669 protected:
674  {
679 
681  : previous_requested_scale( 0 ),
682  previous_Route_Layer_TOP_color( COLOR4D::UNSPECIFIED ),
683  previous_Route_Layer_BOTTOM_color( COLOR4D::UNSPECIFIED ),
684  previous_background_color( COLOR4D::UNSPECIFIED )
685  {
686  }
687  };
688 
690 
691  // The Tool Framework initialization
692  void setupTools();
693  void setupUIConditions() override;
694 
700  void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
701 
705  void buildActionPluginMenus( ACTION_MENU* aActionMenu );
706 
710  void AddActionPluginTools();
711 
717  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
718 
724  void OnActionPluginMenu( wxCommandEvent& aEvent);
725 
731  void OnActionPluginButton( wxCommandEvent& aEvent );
732 
736  void onBoardLoaded();
737 
744  bool doAutoSave() override;
745 
749  bool isAutoSaveRequired() const override;
750 
757  bool importFile( const wxString& aFileName, int aFileType );
758 
759  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
760  void doCloseWindow() override;
761 
762  // protected so that PCB::IFACE::CreateWindow() is the only factory.
763  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
764 
765  void onSize( wxSizeEvent& aEvent );
766 
767  int inferLegacyEdgeClearance( BOARD* aBoard );
768 
769 public:
770  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
771 
772  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
773  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
774 
776 
777  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
778 
779 private:
780  friend struct PCB::IFACE;
781  friend class APPEARANCE_CONTROLS;
782 
791 
793 
795 };
796 
797 #endif // __PCB_EDIT_FRAME_H__
void UpdateTitle()
Set the main window title bar text.
PCB_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void OnModify() override
Must be called after a board change to set the modified flag.
This is the parent class from where any action plugin class must derive.
Definition: action_plugin.h:38
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void RecreateCmpFileFromBoard(wxCommandEvent &aEvent)
Recreates a .cmp file from the current loaded board.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:38
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Change the visibility of an element category.
void OnExportIDF3(wxCommandEvent &event)
Export the current BOARD to a IDFv3 board and lib files.
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
void SendCrossProbeNetName(const wxString &aNetName)
Send a net name to Eeschema for highlighting.
void Process_Config(wxCommandEvent &event)
void OnExportHyperlynx(wxCommandEvent &event)
Export the current BOARD to a Hyperlynx HYP file.
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
bool IsContentModified() const override
Get if the current board has been modified but not saved.
void OnEditItemRequest(BOARD_ITEM *aItem) override
Install the corresponding dialog editor for the given item.
Definition: edit.cpp:118
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:48
void AddActionPluginTools()
Append action plugin buttons to main toolbar.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
void HardRedraw() override
Rebuild the GAL and redraws the screen.
void ToPlotter(int aID)
Open a dialog frame to create plot and drill files relative to the current board.
Update the BOARD with a new netlist.
void doCloseWindow() override
A set of BOARD_ITEMs (i.e., without duplicates).
Definition: pcb_group.h:50
A progress reporter interface for use in multi-threaded environments.
void buildActionPluginMenus(ACTION_MENU *aActionMenu)
Fill action menu with all registered action plugins.
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
Definition: netlist.cpp:135
bool doAutoSave() override
Perform auto save when the board has been modified and not saved within the auto save interval.
void ActivateGalCanvas() override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aOnlySMD, bool aNoTHItems, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin)
Create an ASCII footprint position file.
void OnExportSTEP(wxCommandEvent &event)
Export the current BOARD to a STEP assembly.
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:185
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
Definition: netlist.cpp:55
void ResolveDRCExclusions()
Update markers to match recorded exclusions.
wxChoice * m_SelViaSizeBox
void SwitchLayer(PCB_LAYER_ID layer) override
Change the active layer in the editor.
Definition: edit.cpp:78
void RecreateBOMFileFromBoard(wxCommandEvent &aEvent)
Create a BOM file from the current loaded board.
bool Export_IDF3(BOARD *aPcb, const wxString &aFullFileName, bool aUseThou, double aXRef, double aYRef)
Create an IDF3 compliant BOARD (*.emn) and LIBRARY (*.emp) file.
Definition: export_idf.cpp:588
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
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...
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void ExportToGenCAD(wxCommandEvent &event)
Create a file in GenCAD 1.4 format from the current board.
bool SavePcbCopy(const wxString &aFileName, bool aCreateProject=false)
Write the board data structures to aFileName.
void RunActionPlugin(ACTION_PLUGIN *aActionPlugin)
Execute action plugin's Run() method and updates undo buffer.
Abstract dimension API.
Definition: pcb_dimension.h:95
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
Class to display a pcb layer list in a wxBitmapComboBox.
bool FetchNetlistFromSchematic(NETLIST &aNetlist, const wxString &aAnnotateMessage)
int inferLegacyEdgeClearance(BOARD *aBoard)
void ReCreateHToolbar() override
bool ExportVRML_File(const wxString &aFullFileName, double aMMtoWRMLunit, bool aExport3DFiles, bool aUseRelativePaths, const wxString &a3D_Subdir, double aXRef, double aYRef)
Create the file(s) exporting current BOARD to a VRML file.
wxTimer * m_eventCounterTimer
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
Definition: netlist.cpp:89
wxChoice * m_SelTrackWidthBox
int ShowExchangeFootprintsDialog(FOOTPRINT *aFootprint, bool aUpdateMode, bool aSelectedMode)
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...
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
void SetTrackSegmentWidth(PCB_TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Modify one track segment width or one via diameter (using DRC control).
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void OnActionPluginMenu(wxCommandEvent &aEvent)
Launched by the menu when an action is called.
void ShowFootprintPropertiesDialog(FOOTPRINT *aFootprint)
bool isAutoSaveRequired() const override
Return true if the board has been modified.
Store the previous layer toolbar icon state information.
bool TestStandalone(void)
Test if standalone mode.
bool m_show_layer_manager_tools
void UpdateTrackWidthSelectBox(wxChoice *aTrackWidthSelectBox, bool aEdit=true)
void SetGridColor(const COLOR4D &aColor) override
void OnClearFileHistory(wxCommandEvent &aEvent)
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Receive KIWAY_EXPRESS messages from other players.
bool DoGenFootprintsReport(const wxString &aFullFilename, bool aUnitsMM)
Create an ASCII footprint report file giving some infos on footprints and board outlines.
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool reset3DModels=true)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
void GenFootprintsReport(wxCommandEvent &event)
Call DoGenFootprintsReport to create a footprint report file.
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
void ProjectChanged() override
Notification event that the project has changed.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
Definition: pcb_netlist.h:206
BOARD_ITEM_CONTAINER * GetModel() const override
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Load a KiCad board (.kicad_pcb) from aFileName.
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command send by Eeschema via a socket, port KICAD_PCB_PORT_SERVICE_NUMBER (currently...
void onBoardLoaded()
Update the state of the GUI after a new board is loaded or created.
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
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.
std::vector< ACTION_PLUGIN * > GetOrderedActionPlugins()
Return ordered list of plugins in sequence in which they should appear on toolbar or in settings.
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
void ExportSVG(wxCommandEvent &event)
Show the Export to SVG file dialog.
void ReCreateVToolbar() override
void ReCreateMenuBar() override
Recreates the menu bar.
virtual ~PCB_EDIT_FRAME()
void ExportFootprintsToLibrary(bool aStoreInNewLib, const wxString &aLibName=wxEmptyString, wxString *aLibPath=nullptr)
Save footprints in a library:
void OnUpdateSelectAutoWidth(wxUpdateUIEvent &aEvent)
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
COLOR4D GetGridColor() override
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260
Handle a list of polygons defining a copper zone.
Definition: zone.h:56
void ShowDimensionPropertiesDialog(PCB_DIMENSION_BASE *aDimension)
Definition: edit.cpp:171
void OnQuit(wxCommandEvent &event)
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
void PythonSyncEnvironmentVariables()
Synchronize the environment variables from KiCad's environment into the Python interpreter.
A holder to handle information on schematic or board items.
LAST_PATH_TYPE
For storing PcbNew MRU paths of various types.
Definition: project_file.h:46
A dialog to set the plot options and create plot files in various formats.
Definition: dialog_plot.h:39
void PrepareLayerIndicator(bool aForceRebuild=false)
TOOL_ACTION * GetExportNetlistAction()
void UpdateToolbarControlSizes() override
Update the sizes of any controls in the toolbars of the frame.
void Edit_Zone_Params(ZONE *zone_container)
Edit params (layer, clearance, ...) for a zone outline.
void SendMessageToEESCHEMA(BOARD_ITEM *objectToSync)
Send a message to the schematic editor so that it may move its cursor to a symbol with the same refer...
void OnFileHistory(wxCommandEvent &event)
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 ...
A filename or source description, a problem input line, a line number, a byte offset,...
Definition: ki_exception.h:118
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
bool SavePcbFile(const wxString &aFileName, bool addToHistory=true, bool aChangeProject=true)
Write the board data structures to a aFileName.
void PythonSyncProjectName()
Synchronize the project name from KiCad's environment into the Python interpreter.
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allow Pcbnew to install its preferences panel into the preferences dialog.
Common, abstract interface for edit frames.
void Process_Special_Functions(wxCommandEvent &event)
Definition: edit.cpp:47
void GenD356File(wxCommandEvent &event)
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void Files_io(wxCommandEvent &event)
Call Files_io_from_id with the wxCommandEvent id.
LAYER_TOOLBAR_ICON_VALUES m_prevIconVal
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:240
void OnExportVRML(wxCommandEvent &event)
Export the current BOARD to a VRML file.
DIALOG_FIND * m_findDialog
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
Represent a single user action.
Definition: tool_action.h:67
void ReCreateOptToolbar() override
The main frame for Pcbnew.
void ShowFindDialog()
Show the Find dialog.
bool Files_io_from_id(int aId)
Read and write board files according to aId.
void FindNext()
Find the next item using our existing search parameters.
void onSize(wxSizeEvent &aEvent)
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aEdit=true)
void OnActionPluginButton(wxCommandEvent &aEvent)
Launched by the button when an action is called.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
bool IsElementVisible(GAL_LAYER_ID aElement) const
Test whether a given element category is visible.
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:377
Definition: pad.h:57
void ThemeChanged() override
Called when light/dark theme is changed.
void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) override
Switch currently used canvas (Cairo / OpenGL).
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
void OnDisplayOptionsChanged() override
bool Clear_Pcb(bool aQuery, bool aFinal=false)
Delete all and reinitialize the current board.
Definition: initpcb.cpp:43
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:75
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.
void ReCreateAuxiliaryToolbar() override
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool ExportSpecctraFile(const wxString &aFullFilename)
Export the current BOARD to a specctra dsn file.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103