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) 1992-2019 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 WXPCB_STRUCT_H_
22 #define WXPCB_STRUCT_H_
23 
24 #include <unordered_map>
25 #include <map>
26 #include "pcb_base_edit_frame.h"
27 #include "undo_redo_container.h"
28 #include "zones.h"
29 #include <mail_type.h>
30 #include <map>
31 #include <unordered_map>
32 
33 /* Forward declarations of classes. */
34 class ACTION_PLUGIN;
35 class PCB_SCREEN;
36 class BOARD;
37 class BOARD_COMMIT;
39 class MODULE;
40 class TRACK;
41 class VIA;
42 class D_PAD;
43 class PCB_TARGET;
44 class PCB_GROUP;
45 class DIMENSION;
46 class DRC;
47 class DIALOG_PLOT;
48 class ZONE_CONTAINER;
49 class GENERAL_COLLECTOR;
51 class SELECTION;
52 class MARKER_PCB;
53 class BOARD_ITEM;
55 class NETLIST;
56 class REPORTER;
57 struct PARSE_ERROR;
58 class IO_ERROR;
59 class FP_LIB_TABLE;
61 class ACTION_MENU;
62 enum LAST_PATH_TYPE : unsigned int;
63 
64 namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
65 
75 {
76  friend struct PCB::IFACE;
77  friend class APPEARANCE_CONTROLS;
78 
79 protected:
80 
85  {
92 
100  {
101  }
102  };
103 
105 
106  // The Tool Framework initalization
107  void setupTools();
108  void setupUIConditions() override;
109 
114  void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
115 
116 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
117 
121  void buildActionPluginMenus( ACTION_MENU* aActionMenu );
122 
127  void AddActionPluginTools();
128 
134  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
135 
141  void OnActionPluginMenu( wxCommandEvent& aEvent);
142 
148  void OnActionPluginButton( wxCommandEvent& aEvent );
149 
155  void OnActionPluginRefresh( wxCommandEvent& aEvent)
156  {
158  }
159 
165  void OnActionPluginShowFolder( wxCommandEvent& aEvent)
166  {
168  }
169 #endif
170 
175  static const wxChar * pythonConsoleNameId()
176  {
177  return wxT( "PythonConsole" );
178  }
179 
183  static wxWindow * findPythonConsole()
184  {
185  return FindWindowByName( pythonConsoleNameId() );
186  }
187 
191  void onBoardLoaded();
192 
200  bool doAutoSave() override;
201 
206  bool isAutoSaveRequired() const override;
207 
213  bool importFile( const wxString& aFileName, int aFileType );
214 
218  int inferLegacyEdgeClearance( BOARD* aBoard );
219 
223  bool fixEagleNets( const std::unordered_map<wxString, wxString>& aRemap );
224 
225  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
226  void doCloseWindow() override;
227 
228  // protected so that PCB::IFACE::CreateWindow() is the only factory.
229  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
230 
231  void onSize( wxSizeEvent& aEvent );
232 
233 public:
234  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
235  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
236  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
237 
239 
240  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
241 
242  virtual ~PCB_EDIT_FRAME();
243 
253  void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
254 
255  void OnQuit( wxCommandEvent& event );
256 
262  bool IsContentModified() override;
263 
269  void PythonPluginsReload();
270 
276 
282 
287  void PythonSyncProjectName();
288 
293  void UpdateUserInterface();
294 
301  void ExecuteRemoteCommand( const char* cmdline ) override;
302 
303  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
304 
309  void ToPlotter( int aID );
310 
315  void ExportSVG( wxCommandEvent& event );
316 
317  // User interface update command event handlers.
318  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
319  bool LayerManagerShown();
320  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
321  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
322  void OnUpdateSelectAutoWidth( wxUpdateUIEvent& aEvent );
323 
324  void RunEeschema();
325 
326  void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit = true );
327  void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit = true );
328 
333  COLOR4D GetGridColor() override;
334 
339  void SetGridColor( COLOR4D aColor ) override;
340 
341  // Configurations:
342  void Process_Config( wxCommandEvent& event );
343 
344 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
345 
351  bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
352 
357  std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
358 
359 #endif
360 
365  void SaveProjectSettings() override;
366 
373  bool LoadProjectSettings();
374 
375  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
376 
377  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
378 
383  wxString GetLastPath( LAST_PATH_TYPE aType );
384 
396  void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
397 
401  void RecordDRCExclusions();
402 
406  void ResolveDRCExclusions();
407 
408  void Process_Special_Functions( wxCommandEvent& event );
409  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
410 
411  void ReCreateHToolbar() override;
412  void ReCreateAuxiliaryToolbar() override;
413  void ReCreateVToolbar() override;
414  void ReCreateOptToolbar() override;
415  void ReCreateMenuBar() override;
416 
424  void ReCreateLayerBox( bool aForceResizeToolbar = true );
425 
426 
435  void OnModify() override;
436 
442  void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
443 
445 
449  void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) override;
450 
451  void OnDisplayOptionsChanged() override;
452 
461  bool IsElementVisible( GAL_LAYER_ID aElement ) const;
462 
470  void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
471 
473  void ActivateGalCanvas() override;
474 
478  void ShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString );
479 
480  /* toolbars update UI functions: */
481 
482  void PrepareLayerIndicator( bool aForceRebuild = false );
483 
484  void ToggleLayersManager();
485 
500  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
501  bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV = false );
502 
508  void GenFootprintsReport( wxCommandEvent& event );
509 
518  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
519 
520  void GenD356File( wxCommandEvent& event );
521 
522  void OnFileHistory( wxCommandEvent& event );
523  void OnClearFileHistory( wxCommandEvent& aEvent );
524 
531  void Files_io( wxCommandEvent& event );
532 
545  bool Files_io_from_id( int aId );
546 
561  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
562 
574  bool SavePcbFile( const wxString& aFileName, bool addToHistory = true,
575  bool aChangeProject = true );
576 
589  bool SavePcbCopy( const wxString& aFileName, bool aCreateProject = false );
590 
591  // BOARD handling
592 
599  bool Clear_Pcb( bool aQuery, bool aFinal = false );
600 
602  void SetBoard( BOARD* aBoard ) override;
603 
605  BOARD_ITEM_CONTAINER* GetModel() const override;
606 
608  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
609 
616  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
617 
632  void HarvestFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
633  wxString* aLibPath = NULL );
634 
639  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
640 
645  void ExportToGenCAD( wxCommandEvent& event );
646 
651  void OnExportVRML( wxCommandEvent& event );
652 
682  bool ExportVRML_File( const wxString & aFullFileName, double aMMtoWRMLunit,
683  bool aExport3DFiles, bool aUseRelativePaths, bool aUsePlainPCB,
684  const wxString & a3D_Subdir, double aXRef, double aYRef );
685 
690  void OnExportIDF3( wxCommandEvent& event );
691 
696  void OnExportHyperlynx( wxCommandEvent& event );
697 
709  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
710  bool aUseThou, double aXRef, double aYRef );
711 
716  void OnExportSTEP( wxCommandEvent& event );
717 
725  bool ExportSpecctraFile( const wxString& aFullFilename );
726 
734  bool ImportSpecctraSession( const wxString& aFullFilename );
735 
736  // Footprint editing (see also PCB_BASE_FRAME)
737  void ShowFootprintPropertiesDialog( MODULE* aFootprint );
738 
739  int ShowExchangeFootprintsDialog( MODULE* aModule, bool updateMode, bool selectedMode );
740 
750  void ExchangeFootprint( MODULE* aExisting, MODULE* aNew, BOARD_COMMIT& aCommit,
751  bool deleteExtraTexts = true, bool resetTextLayers = true,
752  bool resetTextEffects = true, bool resetFabricationAttrs = true,
753  bool reset3DModels = true );
754 
755  // loading footprints: see PCB_BASE_FRAME
756 
763  void OnEditItemRequest( BOARD_ITEM* aItem ) override;
764 
765  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
766 
779  void SetTrackSegmentWidth( TRACK* aTrackItem,
780  PICKED_ITEMS_LIST* aItemsListPicker,
781  bool aUseNetclassValue );
782 
783 
788  void Edit_Zone_Params( ZONE_CONTAINER* zone_container );
789 
790  // Properties dialogs
791  void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
792  void ShowDimensionPropertiesDialog( DIMENSION* aDimension );
793  void ShowGroupPropertiesDialog( PCB_GROUP* aGroup );
794  void InstallNetlistFrame();
795 
802  bool FetchNetlistFromSchematic( NETLIST& aNetlist, FETCH_NETLIST_MODE aMode );
803 
811  bool ReannotateSchematic( std::string& aNetlist );
812 
817  bool TestStandalone( void );
818 
825  void DoUpdatePCBFromNetlist( NETLIST& aNetlist, bool aUseTimestamps );
826 
835  bool ReadNetlistFromFile( const wxString &aFilename, NETLIST& aNetlist, REPORTER& aReporter );
836 
842  void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
843 
844 
845 #if defined( KICAD_SCRIPTING_WXPYTHON )
846 
850  void ScriptingConsoleEnableDisable();
851 #endif
852 
853  void LockModule( MODULE* aModule, bool aLocked );
854 
861  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
862 
868  void SendCrossProbeNetName( const wxString& aNetName );
869 
870  void ShowChangedLanguage() override;
871 
882  void UpdateTitle();
883 
887  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
888 
892  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
893 
894  void ProjectChanged() override;
895 
896  wxString GetCurrentFileName() const override;
897 
898  SELECTION& GetCurrentSelection() override;
899 
900  DECLARE_EVENT_TABLE()
901 };
902 
903 #endif // WXPCB_STRUCT_H_
void UpdateTitle()
Function UpdateTitle sets the main window title bar text.
PCB_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:61
ACTION_PLUGIN This is the parent class from where any action plugin class must derive.
Definition: action_plugin.h:40
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void RecreateCmpFileFromBoard(wxCommandEvent &aEvent)
Function RecreateBOMFileFromBoard Recreates a .cmp file from the current loaded board this is the sam...
KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
void Edit_Zone_Params(ZONE_CONTAINER *zone_container)
Function Edit_Zone_Params Edit params (layer, clearance, ...) for a zone outline.
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
void OnExportIDF3(wxCommandEvent &event)
Function OnExportIDF3 will export the current BOARD to a IDFv3 board and lib files.
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to eeschema for highlighting.
void Process_Config(wxCommandEvent &event)
void OnExportHyperlynx(wxCommandEvent &event)
Function OnExportHyperlynx will 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.
void OnEditItemRequest(BOARD_ITEM *aItem) override
Function OnEditItemRequest Install the corresponding dialog editor for the given item.
void LockModule(MODULE *aModule, bool aLocked)
void HarvestFootprintsToLibrary(bool aStoreInNewLib, const wxString &aLibName=wxEmptyString, wxString *aLibPath=NULL)
Function HarvestFootprintsToLibrary Save footprints in a library:
void SetTrackSegmentWidth(TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Function SetTrackSegmentWidth Modify one track segment width or one via diameter (using DRC control).
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:43
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
APPEARANCE_CONTROLS * m_appearancePanel
AUI panel for controlling layer and object visibility and appearance.
void ToPlotter(int aID)
Function ToPlotter Open a dialog frame to create plot and drill files relative to the current board.
BOARD_NETLIST_UPDATER updates the BOARD with a new netlist.
void ShowFootprintPropertiesDialog(MODULE *aFootprint)
void doCloseWindow() override
PCB_GROUP is a set of BOARD_ITEMs (i.e., without duplicates)
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Function loadFootprints loads the footprints for each COMPONENT in aNetlist from the list of librarie...
bool doAutoSave() override
Function doAutoSave performs auto save when the board has been modified and not saved within the auto...
void ActivateGalCanvas() override
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void OnExportSTEP(wxCommandEvent &event)
Function OnExportSTEP Exports the current BOARD to a STEP assembly.
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Reads a netlist from a file into a NETLIST object.
void ResolveDRCExclusions()
Update markers to match recorded exclusions.
wxChoice * m_SelViaSizeBox
void RecreateBOMFileFromBoard(wxCommandEvent &aEvent)
Function RecreateBOMFileFromBoard Creates a BOM file from the current loaded board.
bool Export_IDF3(BOARD *aPcb, const wxString &aFullFileName, bool aUseThou, double aXRef, double aYRef)
Function Export_IDF3 Creates an IDF3 compliant BOARD (*.emn) and LIBRARY (*.emp) file.
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)
Re create the layer Box by clearing the old list, and building le new one, from the new layers names ...
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void ExportToGenCAD(wxCommandEvent &event)
Function ExportToGenCAD creates a file in GenCAD 1.4 format from the current board.
bool SavePcbCopy(const wxString &aFileName, bool aCreateProject=false)
Function SavePcbCopy writes the board data structures to a aFileName but unlike SavePcbFile,...
void SetGridColor(COLOR4D aColor) override
Function SetGridColor() , virtual.
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
Class to display a pcb layer list in a wxBitmapComboBox.
int inferLegacyEdgeClearance(BOARD *aBoard)
Use the existing edge_cut line thicknesses to infer the edge clearace.
void ReCreateHToolbar() override
REPORTER is 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.
wxChoice * m_SelTrackWidthBox
static wxWindow * findPythonConsole()
bool fixEagleNets(const std::unordered_map< wxString, wxString > &aRemap)
Rematch orphaned zones and vias to schematic nets.
void ExchangeFootprint(MODULE *aExisting, MODULE *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool reset3DModels=true)
Function Exchange_Module Replaces OldModule by NewModule, using OldModule settings: position,...
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
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.
bool isAutoSaveRequired() const override
Function isautoSaveRequired returns 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
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
bool DoGenFootprintsReport(const wxString &aFullFilename, bool aUnitsMM)
Function DoGenFootprintsReport Creates an ascii footprint report file giving some infos on footprints...
void GenFootprintsReport(wxCommandEvent &event)
Function GenFootprintsReport Calls DoGenFootprintsReport to create a footprint reprot file See DoGenF...
PCB_LAYER_ID
A quick note on layer IDs:
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
Function ShowBoardSetupDialog.
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
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
Definition: pcb_netlist.h:194
#define NULL
bool IsContentModified() override
Get if the current board has been modified but not saved.
BOARD_ITEM_CONTAINER * GetModel() const override
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Function OpenProjectFiles (was LoadOnePcbFile) loads 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()
Updates the state of the GUI after a new board is loaded or created.
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
void SaveProjectSettings() override
Function SaveProjectSettings saves changes to the project settings to the project (....
void ExportSVG(wxCommandEvent &event)
Function SVG_Print Shows 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
Function GetGridColor() , virtual.
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the s...
Definition: kiway.h:273
void OnQuit(wxCommandEvent &event)
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
void PythonPluginsShowFolder()
Open the plugins folder in the default system file browser.
void PythonSyncEnvironmentVariables()
Synchronize the environment variables from KiCad's environment into the Python interpreter.
PICKED_ITEMS_LIST is 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:44
static const wxChar * pythonConsoleNameId()
Has meaning only if KICAD_SCRIPTING_WXPYTHON option is not defined.
DIALOG_PLOT is the dialog to set the plot options, and create plot files in various formats.
Definition: dialog_plot.h:40
void PrepareLayerIndicator(bool aForceRebuild=false)
int ShowExchangeFootprintsDialog(MODULE *aModule, bool updateMode, bool selectedMode)
void SendMessageToEESCHEMA(BOARD_ITEM *objectToSync)
Function SendMessageToEESCHEMA sends a message to the schematic editor so that it may move its cursor...
void OnFileHistory(wxCommandEvent &event)
bool ImportSpecctraSession(const wxString &aFullFilename)
Function ImportSpecctraSession will import a specctra *.ses file and use it to relocate MODULEs and t...
Struct PARSE_ERROR contains a filename or source description, a problem input line,...
Definition: ki_exception.h:123
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
bool SavePcbFile(const wxString &aFileName, bool addToHistory=true, bool aChangeProject=true)
Function SavePcbFile writes the board data structures to a aFileName Creates backup when requested an...
void OnUpdateLayerAlpha(wxUpdateUIEvent &aEvent) override
Update the UI to reflect changes to the current layer's transparency.
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
Allows Pcbnew to install its preferences panel into the preferences dialog.
bool ExportVRML_File(const wxString &aFullFileName, double aMMtoWRMLunit, bool aExport3DFiles, bool aUseRelativePaths, bool aUsePlainPCB, const wxString &a3D_Subdir, double aXRef, double aYRef)
Function ExportVRML_File Creates the file(s) exporting current BOARD to a VRML file.
Common, abstract interface for edit frames.
void Process_Special_Functions(wxCommandEvent &event)
Definition: pcbnew/edit.cpp:47
void DoUpdatePCBFromNetlist(NETLIST &aNetlist, bool aUseTimestamps)
Function DoUpdatePCBFromNetlist An automated version of UpdatePCBFromNetlist which skips the UI dialo...
void GenD356File(wxCommandEvent &event)
Information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:186
void Files_io(wxCommandEvent &event)
Function Files_io.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
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)
Function OnExportVRML will export the current BOARD to a VRML file.
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
FETCH_NETLIST_MODE
Function FetchNetlistFromSchematic.
void ReCreateOptToolbar() override
PCB_EDIT_FRAME is the main frame for Pcbnew.
void ShowDimensionPropertiesDialog(DIMENSION *aDimension)
bool Files_io_from_id(int aId)
Function Files_io_from_id Read and write board files.
bool ReannotateSchematic(std::string &aNetlist)
Sends a command to Eeschema to re-annotate the schematic.
void onSize(wxSizeEvent &aEvent)
void ShowGroupPropertiesDialog(PCB_GROUP *aGroup)
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aEdit=true)
APPEARANCE_CONTROLS * GetAppearancePanel()
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)
Function DoGenFootprintsPositionFile Creates an ascii footprint position file.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:390
void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) override
switches currently used canvas (Cairo / OpenGL).
void SwitchLayer(wxDC *DC, PCB_LAYER_ID layer) override
Definition: pcbnew/edit.cpp:78
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
void PythonPluginsReload()
Reload the Python plugins if they are newer than the already loaded, and load new plugins if any.
void OnDisplayOptionsChanged() override
bool Clear_Pcb(bool aQuery, bool aFinal=false)
Function Clear_Pcb delete all and reinitialize the current board.
Definition: initpcb.cpp:42
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Function SetActiveLayer will change the currently active layer to aLayer and also update the PCB_LAYE...
bool FetchNetlistFromSchematic(NETLIST &aNetlist, FETCH_NETLIST_MODE aMode)
void ReCreateAuxiliaryToolbar() override
Abstract dimension API.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool ExportSpecctraFile(const wxString &aFullFilename)
Function ExportSpecctraFile will export the current BOARD to a specctra dsn file.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:100