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_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 ) override;
402 
404  BOARD_ITEM_CONTAINER* GetModel() const override;
405 
407  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
408 
414  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
415 
427  void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
428  wxString* aLibPath = nullptr );
429 
433  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
434 
438  void ExportToGenCAD( wxCommandEvent& event );
439 
443  void OnExportVRML( wxCommandEvent& event );
444 
469  bool ExportVRML_File( const wxString& aFullFileName, double aMMtoWRMLunit,
470  bool aExport3DFiles, bool aUseRelativePaths,
471  const wxString& a3D_Subdir, double aXRef, double aYRef );
472 
476  void OnExportIDF3( wxCommandEvent& event );
477 
481  void OnExportHyperlynx( wxCommandEvent& event );
482 
493  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
494  bool aUseThou, double aXRef, double aYRef );
495 
499  void OnExportSTEP( wxCommandEvent& event );
500 
508  bool ExportSpecctraFile( const wxString& aFullFilename );
509 
516  bool ImportSpecctraSession( const wxString& aFullFilename );
517 
518  // Footprint editing (see also PCB_BASE_FRAME)
519  void ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint );
520 
521  int ShowExchangeFootprintsDialog( FOOTPRINT* aFootprint, bool aUpdateMode, bool aSelectedMode );
522 
533  void ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew, BOARD_COMMIT& aCommit,
534  bool deleteExtraTexts = true, bool resetTextLayers = true,
535  bool resetTextEffects = true, bool resetFabricationAttrs = true,
536  bool reset3DModels = true );
537 
544  void OnEditItemRequest( BOARD_ITEM* aItem ) override;
545 
546  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
547 
560  void SetTrackSegmentWidth( PCB_TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker,
561  bool aUseNetclassValue );
562 
563 
567  void Edit_Zone_Params( ZONE* zone_container );
568 
569  // Properties dialogs
570  void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
572  void InstallNetlistFrame();
573 
580  bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage );
581 
587  bool TestStandalone( void );
588 
597  bool ReadNetlistFromFile( const wxString& aFilename, NETLIST& aNetlist, REPORTER& aReporter );
598 
605  void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
606 
613  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
614 
620  void SendCrossProbeNetName( const wxString& aNetName );
621 
622  void ShowChangedLanguage() override;
623 
632  void UpdateTitle();
633 
637  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
638 
642  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
643 
647  void ThemeChanged() override;
648 
649  void ProjectChanged() override;
650 
651  wxString GetCurrentFileName() const override;
652 
653  SELECTION& GetCurrentSelection() override;
654 
656 
657  DECLARE_EVENT_TABLE()
658 
659 protected:
664  {
669 
671  : previous_requested_scale( 0 ),
672  previous_Route_Layer_TOP_color( COLOR4D::UNSPECIFIED ),
673  previous_Route_Layer_BOTTOM_color( COLOR4D::UNSPECIFIED ),
674  previous_background_color( COLOR4D::UNSPECIFIED )
675  {
676  }
677  };
678 
680 
681  // The Tool Framework initialization
682  void setupTools();
683  void setupUIConditions() override;
684 
690  void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
691 
695  void buildActionPluginMenus( ACTION_MENU* aActionMenu );
696 
700  void AddActionPluginTools();
701 
707  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
708 
714  void OnActionPluginMenu( wxCommandEvent& aEvent);
715 
721  void OnActionPluginButton( wxCommandEvent& aEvent );
722 
726  void onBoardLoaded();
727 
734  bool doAutoSave() override;
735 
739  bool isAutoSaveRequired() const override;
740 
747  bool importFile( const wxString& aFileName, int aFileType );
748 
749  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
750  void doCloseWindow() override;
751 
752  // protected so that PCB::IFACE::CreateWindow() is the only factory.
753  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
754 
755  void onSize( wxSizeEvent& aEvent );
756 
757  int inferLegacyEdgeClearance( BOARD* aBoard );
758 
759 public:
760  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
761 
762  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
763  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
764 
766 
767  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
768 
769 private:
770  friend struct PCB::IFACE;
771  friend class APPEARANCE_CONTROLS;
772 
781 
783 };
784 
785 #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)
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:184
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:597
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.
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
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: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
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
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:64
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).
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