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 "config_params.h"
28 #include "undo_redo_container.h"
29 #include "zones.h"
30 
31 /* Forward declarations of classes. */
32 class ACTION_PLUGIN;
33 class PCB_SCREEN;
34 class BOARD;
35 class BOARD_COMMIT;
37 class TEXTE_PCB;
38 class MODULE;
39 class TRACK;
40 class VIA;
41 class D_PAD;
42 class TEXTE_MODULE;
43 class PCB_TARGET;
44 class DIMENSION;
45 class EDGE_MODULE;
46 class DRC;
47 class DIALOG_PLOT;
48 class ZONE_CONTAINER;
49 class DRAWSEGMENT;
50 class GENERAL_COLLECTOR;
52 class PCB_LAYER_WIDGET;
53 class MARKER_PCB;
54 class BOARD_ITEM;
56 class NETLIST;
57 class REPORTER;
58 struct PARSE_ERROR;
59 class IO_ERROR;
60 class FP_LIB_TABLE;
62 class ACTION_MENU;
63 
64 namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
65 
70 {
74 };
75 
77 {
84 
86 };
87 
97 {
98  friend struct PCB::IFACE;
99  friend class PCB_LAYER_WIDGET;
100 
103 
104 protected:
105  std::vector<PARAM_CFG*> m_projectFileParams;
106 
108 
109  std::set<wxString> m_drcExclusions;
110 
115  {
122 
125  previous_active_layer_color( COLOR4D::UNSPECIFIED ),
126  previous_Route_Layer_TOP_color( COLOR4D::UNSPECIFIED ),
128  previous_via_color( COLOR4D::UNSPECIFIED ),
129  previous_background_color( COLOR4D::UNSPECIFIED )
130  {
131  }
132  };
133 
135 
136  // The Tool Framework initalization
137  void setupTools();
138 
139  wxString createBackupFile( const wxString& aFileName );
140 
145  void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType ) override;
146 
147 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
148 
152  void buildActionPluginMenus( ACTION_MENU* aActionMenu );
153 
158  void AddActionPluginTools();
159 
165  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
166 
172  void OnActionPluginMenu( wxCommandEvent& aEvent);
173 
179  void OnActionPluginButton( wxCommandEvent& aEvent );
180 
186  void OnActionPluginRefresh( wxCommandEvent& aEvent)
187  {
189  }
190 #endif
191 
196  static const wxChar * pythonConsoleNameId()
197  {
198  return wxT( "PythonConsole" );
199  }
200 
204  static wxWindow * findPythonConsole()
205  {
206  return FindWindowByName( pythonConsoleNameId() );
207  }
208 
212  void onBoardLoaded();
213 
223  void syncLayerWidgetLayer();
224 
231  void syncRenderStates();
232 
239  void syncLayerVisibilities();
240 
248  bool doAutoSave() override;
249 
254  bool isAutoSaveRequired() const override;
255 
261  bool importFile( const wxString& aFileName, int aFileType );
262 
266  int inferLegacyEdgeClearance( BOARD* aBoard );
267 
271  bool fixEagleNets( const std::unordered_map<wxString, wxString>& aRemap );
272 
273  // protected so that PCB::IFACE::CreateWindow() is the only factory.
274  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
275 
276 public:
277  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
278  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
279  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
280 
283 
284  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
285 
286  virtual ~PCB_EDIT_FRAME();
287 
297  void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
298 
299  void OnQuit( wxCommandEvent& event );
300 
306  bool IsContentModified() override;
307 
313  void PythonPluginsReload();
314 
319  void UpdateUserInterface();
320 
327  void ExecuteRemoteCommand( const char* cmdline ) override;
328 
329  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
330 
335  void ToPlotter( int aID );
336 
341  void ExportSVG( wxCommandEvent& event );
342 
343  // User interface update command event handlers.
344  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
345  bool LayerManagerShown();
346  bool MicrowaveToolbarShown();
347  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
348  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
349  void OnLayerColorChange( wxCommandEvent& aEvent );
350 
351  void RunEeschema();
352 
353  void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit = true );
354  void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit = true );
355 
360  COLOR4D GetGridColor() override;
361 
366  void SetGridColor( COLOR4D aColor ) override;
367 
368  // Configurations:
369  void Process_Config( wxCommandEvent& event );
370 
371 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
372 
378  bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
379 
384  std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
385 
386 #endif
387 
400  std::vector<PARAM_CFG*>& GetProjectFileParameters();
401 
406  void SaveProjectSettings() override;
407 
414  bool LoadProjectSettings();
415 
416  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
417 
418  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
419 
424  wxString GetLastPath( LAST_PATH_TYPE aType );
425 
437  void SetLastPath( LAST_PATH_TYPE aType, const wxString& aLastPath );
438 
442  void RecordDRCExclusions();
443 
447  void ResolveDRCExclusions();
448 
449  void OnCloseWindow( wxCloseEvent& Event ) override;
450  void Process_Special_Functions( wxCommandEvent& event );
451  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
452 
453  void ReCreateHToolbar() override;
454  void ReCreateAuxiliaryToolbar() override;
455  void ReCreateVToolbar() override;
457  void ReCreateOptToolbar() override;
458  void ReCreateMenuBar() override;
459 
467  void ReCreateLayerBox( bool aForceResizeToolbar = true );
468 
469 
480  bool SetCurrentNetClass( const wxString& aNetClassName );
481 
490  void OnModify() override;
491 
497  void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
498 
500 
504  void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) override;
505 
514  bool IsElementVisible( GAL_LAYER_ID aElement ) const;
515 
523  void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
524 
529  void SetVisibleAlls();
530 
536  void ReFillLayerWidget();
537 
539  void ActivateGalCanvas() override;
540 
544  void DoShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString,
545  const wxString& aInitialParentPage = wxEmptyString );
546 
547  /* toolbars update UI functions: */
548 
549  void PrepareLayerIndicator( bool aForceRebuild = false );
550 
551  void ToggleLayersManager();
552  void ToggleMicrowaveToolbar();
553 
568  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
569  bool aForceSmdItems, bool aTopSide, bool BottomSide, bool aFormatCSV = false );
570 
576  void GenFootprintsReport( wxCommandEvent& event );
577 
586  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
587 
588  void GenD356File( wxCommandEvent& event );
589 
590  void OnFileHistory( wxCommandEvent& event );
591  void OnClearFileHistory( wxCommandEvent& aEvent );
592 
599  void Files_io( wxCommandEvent& event );
600 
614  bool Files_io_from_id( int aId );
615 
630  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
631 
644  bool SavePcbFile( const wxString& aFileName, bool aCreateBackupFile = CREATE_BACKUP_FILE );
645 
657  bool SavePcbCopy( const wxString& aFileName );
658 
659  // BOARD handling
660 
667  bool Clear_Pcb( bool aQuery, bool aFinal = false );
668 
670  void SetBoard( BOARD* aBoard ) override;
671 
673  BOARD_ITEM_CONTAINER* GetModel() const override;
674 
676  int GetSeverity( int aErrorCode ) const override;
677 
679  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
680 
687  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
688 
703  void ArchiveModulesOnBoard( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
704  wxString* aLibPath = NULL );
705 
710  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
711 
716  void ExportToGenCAD( wxCommandEvent& event );
717 
722  void OnExportVRML( wxCommandEvent& event );
723 
753  bool ExportVRML_File( const wxString & aFullFileName, double aMMtoWRMLunit,
754  bool aExport3DFiles, bool aUseRelativePaths, bool aUsePlainPCB,
755  const wxString & a3D_Subdir, double aXRef, double aYRef );
756 
761  void OnExportIDF3( wxCommandEvent& event );
762 
767  void OnExportHyperlynx( wxCommandEvent& event );
768 
780  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
781  bool aUseThou, double aXRef, double aYRef );
782 
787  void OnExportSTEP( wxCommandEvent& event );
788 
796  bool ExportSpecctraFile( const wxString& aFullFilename );
797 
805  bool ImportSpecctraSession( const wxString& aFullFilename );
806 
807  // Footprint editing (see also PCB_BASE_FRAME)
809 
810  int InstallExchangeModuleFrame( MODULE* aModule, bool updateMode, bool selectedMode );
811 
821  void Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aCommit,
822  bool deleteExtraTexts = true,
823  bool resetTextLayers = true, bool resetTextEffects = true,
824  bool reset3DModels = true );
825 
826  // loading modules: see PCB_BASE_FRAME
827 
834  void OnEditItemRequest( BOARD_ITEM* aItem ) override;
835 
836  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
837 
853  int SetTrackSegmentWidth( TRACK* aTrackItem,
854  PICKED_ITEMS_LIST* aItemsListPicker,
855  bool aUseNetclassValue );
856 
857 
862  void Edit_Zone_Params( ZONE_CONTAINER* zone_container );
863 
864  // Properties dialogs
865  void ShowTargetOptionsDialog( PCB_TARGET* aTarget );
866  void ShowDimensionPropertyDialog( DIMENSION* aDimension );
867  void InstallNetlistFrame();
868 
875  bool FetchNetlistFromSchematic( NETLIST& aNetlist, FETCH_NETLIST_MODE aMode );
876 
883  void DoUpdatePCBFromNetlist( NETLIST& aNetlist, bool aUseTimestamps );
884 
893  bool ReadNetlistFromFile( const wxString &aFilename, NETLIST& aNetlist, REPORTER& aReporter );
894 
900  void OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aRunDragCommand );
901 
902 
903 #if defined( KICAD_SCRIPTING_WXPYTHON )
904 
908  void ScriptingConsoleEnableDisable();
909 #endif
910 
911  void LockModule( MODULE* aModule, bool aLocked );
912 
919  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
920 
926  void SendCrossProbeNetName( const wxString& aNetName );
927 
937  MODULE* CreateMuWaveBaseFootprint( const wxString& aValue, int aTextSize, int aPadCount );
938 
946  MODULE* Create_MuWaveComponent( int shape_type );
947 
949 
950  void ShowChangedLanguage() override;
951 
962  void UpdateTitle();
963 
964  void On3DShapeLibWizard( wxCommandEvent& event );
965 
969  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
970 
974  void CommonSettingsChanged( bool aEnvVarsChanged ) override;
975 
976  void SyncToolbars() override;
977 
978  DECLARE_EVENT_TABLE()
979 };
980 
981 #endif // WXPCB_STRUCT_H_
void syncRenderStates()
Function syncRenderStates updates the "Render" checkboxes in the layer widget according to current to...
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:60
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...
ACTION_TOOLBAR.
LAST_PATH_TYPE
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 syncLayerWidgetLayer()
Function syncLayerWidgetLayer updates the currently layer "selection" within the PCB_LAYER_WIDGET.
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.
void OnEditItemRequest(BOARD_ITEM *aItem) override
Function OnEditItemRequest Install the corresponding dialog editor for the given item.
void LockModule(MODULE *aModule, bool aLocked)
ACTION_MENU.
Definition: action_menu.h:43
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
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.
PCB_LAYER_WIDGET is here to implement the abstract functions of LAYER_WIDGET so they may be tied into...
bool SavePcbCopy(const wxString &aFileName)
Function SavePcbCopy writes the board data structures to a aFileName but unlike SavePcbFile,...
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 OnLayerColorChange(wxCommandEvent &aEvent)
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...
wxString createBackupFile(const wxString &aFileName)
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 ...
int SetTrackSegmentWidth(TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Function SetTrackSegmentWidth Modify one track segment width or one via diameter (using DRC control).
void ExportToGenCAD(wxCommandEvent &event)
Function ExportToGenCAD creates a file in GenCAD 1.4 format from the current board.
void SetGridColor(COLOR4D aColor) override
Function SetGridColor() , virtual.
void ShowTargetOptionsDialog(PCB_TARGET *aTarget)
Class to display a pcb layer list in a wxBitmapComboBox.
bool m_show_microwave_tools
int inferLegacyEdgeClearance(BOARD *aBoard)
Use the existing edge_cut line thicknesses to infer the edge clearace.
void ReCreateHToolbar() override
void syncLayerVisibilities()
Function syncLayerVisibilities updates each "Layer" checkbox in the layer widget according to each la...
void Exchange_Module(MODULE *aSrc, MODULE *aDest, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool reset3DModels=true)
Function Exchange_Module Replaces OldModule by NewModule, using OldModule settings: position,...
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
void OnCloseWindow(wxCloseEvent &Event) override
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
bool SetCurrentNetClass(const wxString &aNetClassName)
Function SetCurrentNetClass Must be called after a netclass selection (or after a netclass parameter ...
wxChoice * m_SelTrackWidthBox
TRACK_ACTION_DRC_ERROR - Track not changed to to DRC.
static wxWindow * findPythonConsole()
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE.
bool fixEagleNets(const std::unordered_map< wxString, wxString > &aRemap)
Rematch orphaned zones and vias to schematic nets.
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
int InstallExchangeModuleFrame(MODULE *aModule, bool updateMode, bool selectedMode)
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 m_show_layer_manager_tools
std::vector< PARAM_CFG * > m_projectFileParams
std::vector< PARAM_CFG * > & GetProjectFileParameters()
Function GetProjectFileParameters returns a project file parameter list for Pcbnew.
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aForceSmdItems, bool aTopSide, bool BottomSide, bool aFormatCSV=false)
Function DoGenFootprintsPositionFile Creates an ascii footprint position file.
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 CommonSettingsChanged(bool aEnvVarsChanged) override
Called after the preferences dialog is run.
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
MODULE * Create_MuWavePolygonShape()
Definition: microwave.cpp:428
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:75
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
Definition: pcb_netlist.h:212
#define NULL
bool IsContentModified() override
Get if the current board has been modified but not saved.
MODULE * Create_MuWaveComponent(int shape_type)
Create_MuWaveComponent creates a module "GAP" or "STUB" used in micro wave designs.
Definition: microwave.cpp:93
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.
PCB_LAYER_WIDGET * m_Layers
Layer manager. It is the responsibility of the child frames to instantiate this.
virtual ~PCB_EDIT_FRAME()
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
ACTION_TOOLBAR * m_microWaveToolBar
The auxiliary right vertical tool bar used to access the microwave tools.
PCB_LAYER_WIDGET * GetLayerManager()
void OnQuit(wxCommandEvent &event)
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
void SyncToolbars() override
Update the toolbars (mostly settings/check buttons/checkboxes) with the current controller state.
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)
TRACK_ACTION_SUCCESS - Track changed successfully.
void SendMessageToEESCHEMA(BOARD_ITEM *objectToSync)
Function SendMessageToEESCHEMA sends a message to the schematic editor so that it may move its cursor...
#define CREATE_BACKUP_FILE
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.
void OnUpdateLayerAlpha(wxUpdateUIEvent &aEvent) override
Update the UI to reflect changes to the current layer's transparency.
void SetBoard(BOARD *aBoard) override
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.
void DoShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString, const wxString &aInitialParentPage=wxEmptyString)
Function ShowBoardSetupDialog.
Common, abstract interface for edit frames.
void Process_Special_Functions(wxCommandEvent &event)
Definition: pcbnew/edit.cpp:50
void DoUpdatePCBFromNetlist(NETLIST &aNetlist, bool aUseTimestamps)
Function DoUpdatePCBFromNetlist An automated version of UpdatePCBFromNetlist which skips the UI dialo...
void ArchiveModulesOnBoard(bool aStoreInNewLib, const wxString &aLibName=wxEmptyString, wxString *aLibPath=NULL)
Function ArchiveModulesOnBoard Save modules in a library:
void GenD356File(wxCommandEvent &event)
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:163
int GetSeverity(int aErrorCode) const override
void Files_io(wxCommandEvent &event)
Function Files_io.
MODULE * CreateMuWaveBaseFootprint(const wxString &aValue, int aTextSize, int aPadCount)
Function CreateMuWaveBaseFootprint create a basic footprint for micro wave applications.
Definition: microwave.cpp:52
LAYER_TOOLBAR_ICON_VALUES m_prevIconVal
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:133
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.
wxString m_lastPath[LAST_PATH_SIZE]
void ReCreateOptToolbar() override
std::set< wxString > m_drcExclusions
PCB_EDIT_FRAME is the main frame for Pcbnew.
bool Files_io_from_id(int aId)
Function Files_io_from_id Read and write board files.
void On3DShapeLibWizard(wxCommandEvent &event)
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aEdit=true)
Abstract interface for BOARD_ITEMs capable of storing other items inside.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
void ReFillLayerWidget()
Function ReFillLayerWidget changes out all the layers in m_Layers and may be called upon loading a ne...
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:385
void ShowDimensionPropertyDialog(DIMENSION *aDimension)
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:82
void PythonPluginsReload()
Reload the Python plugins if they are newer than the already loaded, and load new plugins if any Do n...
bool Clear_Pcb(bool aQuery, bool aFinal=false)
Function Clear_Pcb delete all and reinitialize the current board.
Definition: initpcb.cpp:39
bool SavePcbFile(const wxString &aFileName, bool aCreateBackupFile=CREATE_BACKUP_FILE)
Function SavePcbFile writes the board data structures to a aFileName Creates backup when requested an...
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...
void InstallFootprintPropertiesDialog(MODULE *Module)
bool FetchNetlistFromSchematic(NETLIST &aNetlist, FETCH_NETLIST_MODE aMode)
void ReCreateAuxiliaryToolbar() override
DIMENSION.
TRACK_ACTION_NONE - Nothing to change.
TRACK_ACTION_RESULT
Enum to signify the result of editing tracks and vias.
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:40