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, jp.charras@wanadoo.fr
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_PLOT;
44 class ZONE;
45 class GENERAL_COLLECTOR;
47 class SELECTION;
48 class PCB_MARKER;
49 class BOARD_ITEM;
51 class NETLIST;
52 class REPORTER;
53 struct PARSE_ERROR;
54 class IO_ERROR;
55 class FP_LIB_TABLE;
57 class ACTION_MENU;
58 class TOOL_ACTION;
59 
60 enum LAST_PATH_TYPE : unsigned int;
61 
62 namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
63 
70 {
71 public:
72  virtual ~PCB_EDIT_FRAME();
73 
82  void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
83 
84  void OnQuit( wxCommandEvent& event );
85 
91  bool IsContentModified() const override;
92 
97 
101  void PythonSyncProjectName();
102 
107  void UpdateUserInterface();
108 
109  void HardRedraw() override;
110 
119  void ExecuteRemoteCommand( const char* cmdline ) override;
120 
121  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
122 
126  void ToPlotter( int aID );
127 
131  void ExportSVG( wxCommandEvent& event );
132 
133  // User interface update command event handlers.
134  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
135  bool LayerManagerShown();
136  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
137  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
138  void OnUpdateSelectAutoWidth( wxUpdateUIEvent& aEvent );
139 
140  void RunEeschema();
141 
142  void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit = true );
143  void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit = true );
144 
148  COLOR4D GetGridColor() override;
149 
153  void SetGridColor( COLOR4D aColor ) override;
154 
155  // Configurations:
156  void Process_Config( wxCommandEvent& event );
157 
162  bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
163 
168  std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
169 
173  void SaveProjectSettings() override;
174 
181  bool LoadProjectSettings();
182 
183  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
184 
185  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
186 
192  wxString GetLastPath( LAST_PATH_TYPE aType );
193 
205  void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
206 
210  void RecordDRCExclusions();
211 
215  void ResolveDRCExclusions();
216 
217  void Process_Special_Functions( wxCommandEvent& event );
218  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
219 
220  void ReCreateHToolbar() override;
221  void ReCreateAuxiliaryToolbar() override;
222  void ReCreateVToolbar() override;
223  void ReCreateOptToolbar() override;
224  void ReCreateMenuBar() override;
225  void UpdateToolbarControlSizes() override;
226 
235  void ReCreateLayerBox( bool aForceResizeToolbar = true );
236 
237 
244  void OnModify() override;
245 
249  void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
250 
251  void OnDisplayOptionsChanged() override;
252 
260  bool IsElementVisible( GAL_LAYER_ID aElement ) const;
261 
269  void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
270 
272  void ActivateGalCanvas() override;
273 
274  void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString );
275 
276  void PrepareLayerIndicator( bool aForceRebuild = false );
277 
278  void ToggleLayersManager();
279 
293  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
294  bool aForceSmdItems, bool aTopSide, bool aBottomSide,
295  bool aFormatCSV = false );
296 
300  void GenFootprintsReport( wxCommandEvent& event );
301 
309  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
310 
311  void GenD356File( wxCommandEvent& event );
312 
313  void OnFileHistory( wxCommandEvent& event );
314  void OnClearFileHistory( wxCommandEvent& aEvent );
315 
321  void Files_io( wxCommandEvent& event );
322 
336  bool Files_io_from_id( int aId );
337 
350  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
351 
363  bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
364  bool aChangeProject = true );
365 
377  bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false );
378 
385  bool Clear_Pcb( bool aQuery, bool aFinal = false );
386 
388  void SetBoard( BOARD* aBoard ) override;
389 
391  BOARD_ITEM_CONTAINER* GetModel() const override;
392 
394  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
395 
401  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
402 
414  void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
415  wxString* aLibPath = NULL );
416 
420  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
421 
425  void ExportToGenCAD( wxCommandEvent& event );
426 
430  void OnExportVRML( wxCommandEvent& event );
431 
456  bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
457  bool aExport3DFiles, bool aUseRelativePaths,
458  const wxString& a3D_Subdir, double aXRef, double aYRef );
459 
463  void OnExportIDF3( wxCommandEvent& event );
464 
468  void OnExportHyperlynx( wxCommandEvent& event );
469 
480  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
481  bool aUseThou, double aXRef, double aYRef );
482 
486  void OnExportSTEP( wxCommandEvent& event );
487 
495  bool ExportSpecctraFile( const wxString& aFullFilename );
496 
503  bool ImportSpecctraSession( const wxString& aFullFilename );
504 
505  // Footprint editing (see also PCB_BASE_FRAME)
506  void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
507 
508  int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
509 
520  void ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, BOARD_COMMIT& aCommit,
521  bool deleteExtraTexts = true, bool resetTextLayers = true,
522  bool resetTextEffects = true, bool resetFabricationAttrs = true,
523  bool reset3DModels = true );
524 
531  void OnEditItemRequest( BOARD_ITEM* aItem ) override;
532 
533  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
534 
547  void SetTrackSegmentWidth( PCB_TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker,
548  bool aUseNetclassValue );
549 
550 
554  void Edit_Zone_Params( ZONE* zone_container );
555 
556  // Properties dialogs
557  void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
559  void InstallNetlistFrame();
560 
567  bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
568 
574  bool TestStandalone( void );
575 
584  bool ReadNetlistFromFile( const wxString &aFilename, NETLIST& aNetlist, REPORTER& aReporter );
585 
592  void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
593 
600  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
601 
607  void SendCrossProbeNetName( const wxString& aNetName );
608 
609  void ShowChangedLanguage() override;
610 
619  void UpdateTitle();
620 
624  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
625 
629  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
630 
634  void ThemeChanged() override;
635 
636  void ProjectChanged() override;
637 
638  wxString GetCurrentFileName() const override;
639 
640  SELECTION& GetCurrentSelection() override;
641 
643 
644  DECLARE_EVENT_TABLE()
645 
646 protected:
651  {
656 
658  : previous_requested_scale( 0 ),
659  previous_Route_Layer_TOP_color( COLOR4D::UNSPECIFIED ),
660  previous_Route_Layer_BOTTOM_color( COLOR4D::UNSPECIFIED ),
661  previous_background_color( COLOR4D::UNSPECIFIED )
662  {
663  }
664  };
665 
667 
668  // The Tool Framework initialization
669  void setupTools();
670  void setupUIConditions() override;
671 
677  void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
678 
682  void buildActionPluginMenus( ACTION_MENU* aActionMenu );
683 
687  void AddActionPluginTools();
688 
694  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
695 
701  void OnActionPluginMenu( wxCommandEvent& aEvent);
702 
708  void OnActionPluginButton( wxCommandEvent& aEvent );
709 
710 
716  static const wxChar * pythonConsoleNameId()
717  {
718  return wxT( "PythonConsole" );
719  }
720 
724  static wxWindow * findPythonConsole()
725  {
726  return FindWindowByName( pythonConsoleNameId() );
727  }
728 
732  void onBoardLoaded();
733 
740  bool doAutoSave() override;
741 
745  bool isAutoSaveRequired() const override;
746 
753  bool importFile( const wxString& aFileName, int aFileType );
754 
755  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
756  void doCloseWindow() override;
757 
758  // protected so that PCB::IFACE::CreateWindow() is the only factory.
759  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
760 
761  void onSize( wxSizeEvent& aEvent );
762 
763  int inferLegacyEdgeClearance( BOARD* aBoard );
764 
765 public:
766  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
767 
768  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
769  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
770 
772 
773  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
774 
775 private:
776  friend struct PCB::IFACE;
777  friend class APPEARANCE_CONTROLS;
778 
787 };
788 
789 #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:117
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:80
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
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)
void OnExportSTEP(wxCommandEvent &event)
Export the current BOARD to a STEP assembly.
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 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:589
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
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 SetGridColor(COLOR4D aColor) override
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.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
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)
static wxWindow * findPythonConsole()
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 ExportFootprintsToLibrary(bool aStoreInNewLib, const wxString &aLibName=wxEmptyString, wxString *aLibPath=NULL)
Save footprints in a library:
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 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.
PCB_LAYER_ID
A quick note on layer IDs:
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
#define NULL
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
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 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:258
Handle a list of polygons defining a copper zone.
Definition: zone.h:57
void ShowDimensionPropertiesDialog(PCB_DIMENSION_BASE *aDimension)
Definition: edit.cpp:166
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
static const wxChar * pythonConsoleNameId()
Has meaning only if KICAD_SCRIPTING_WXPYTHON option is not defined.
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 SetBoard(BOARD *aBoard) override
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:46
void GenD356File(wxCommandEvent &event)
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
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
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.
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
Represent a single user action.
Definition: tool_action.h:67
void ReCreateOptToolbar() override
The main frame for Pcbnew.
bool Files_io_from_id(int aId)
Read and write board files according to aId.
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.
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV=false)
Create an ASCII footprint position file.
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).
void SwitchLayer(wxDC *DC, PCB_LAYER_ID layer) override
Definition: edit.cpp:77
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