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-2018 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  */
24 #ifndef WXPCB_STRUCT_H_
25 #define WXPCB_STRUCT_H_
26 
27 #include <unordered_map>
28 #include <map>
29 #include "pcb_base_edit_frame.h"
30 #include "config_params.h"
31 #include "undo_redo_container.h"
32 #include "zones.h"
33 
34 /* Forward declarations of classes. */
35 class ACTION_PLUGIN;
36 class PCB_SCREEN;
37 class BOARD;
38 class BOARD_COMMIT;
40 class TEXTE_PCB;
41 class MODULE;
42 class TRACK;
43 class SEGZONE;
44 class VIA;
45 class D_PAD;
46 class TEXTE_MODULE;
47 class PCB_TARGET;
48 class DIMENSION;
49 class EDGE_MODULE;
50 class DRC;
51 class DIALOG_PLOT;
52 class ZONE_CONTAINER;
53 class DRAWSEGMENT;
54 class GENERAL_COLLECTOR;
56 class PCB_LAYER_WIDGET;
57 class MARKER_PCB;
58 class BOARD_ITEM;
60 class NETLIST;
61 class REPORTER;
62 struct PARSE_ERROR;
63 class IO_ERROR;
64 class FP_LIB_TABLE;
65 
66 namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
67 
77 {
78  friend struct PCB::IFACE;
79  friend class PCB_LAYER_WIDGET;
80 
82  wxAuiToolBar* m_microWaveToolBar;
83 
84 protected:
86 
88 
90 
91  wxString m_lastNetListRead;
92 
93  // The Tool Framework initalization
94  void setupTools();
95 
96  // we'll use lower case function names for private member functions.
97  void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
98  void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu );
99  void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu );
100  void createPopUpMenuForFpPads( D_PAD* aPad, wxMenu* aPopMenu );
101  void createPopupMenuForTracks( TRACK* aTrack, wxMenu* aPopMenu );
102  void createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu );
103  void createPopUpBlockMenu( wxMenu* menu );
104  void createPopUpMenuForMarkers( MARKER_PCB* aMarker, wxMenu* aPopMenu );
105 
110  void enableGALSpecificMenus();
111 
116  virtual void OnSwitchCanvas( wxCommandEvent& aEvent ) override;
117 
118 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
119 
123  void RebuildActionPluginMenus();
124 
129  void AddActionPluginTools();
130 
136  void RunActionPlugin( ACTION_PLUGIN* aActionPlugin );
137 
143  void OnActionPluginMenu( wxCommandEvent& aEvent);
144 
150  void OnActionPluginButton( wxCommandEvent& aEvent );
151 
157  void OnActionPluginRefresh( wxCommandEvent& aEvent)
158  {
159  PythonPluginsReload();
160  }
161 #endif
162 
167  static const wxChar * pythonConsoleNameId()
168  {
169  return wxT( "PythonConsole" );
170  }
171 
175  static wxWindow * findPythonConsole()
176  {
177  return FindWindowByName( pythonConsoleNameId() );
178  }
179 
183  void onBoardLoaded();
184 
194  void syncLayerWidgetLayer();
195 
202  void syncRenderStates();
203 
210  void syncLayerVisibilities();
211 
219  virtual bool doAutoSave() override;
220 
225  virtual bool isAutoSaveRequired() const override;
226 
233  void duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone );
234 
239  void moveExact();
240 
246  void duplicateItems( bool aIncrement ) override;
247 
253  bool importFile( const wxString& aFileName, int aFileType );
254 
258  bool fixEagleNets( const std::unordered_map<wxString, wxString>& aRemap );
259 
260  // protected so that PCB::IFACE::CreateWindow() is the only factory.
261  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
262 
263 public:
264  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
265  wxComboBox* m_SelTrackWidthBox; // a choice box to display and select current track width
266  wxComboBox* m_SelViaSizeBox; // a choice box to display and select current via diameter
267 
270 
271  bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
272 
273  virtual ~PCB_EDIT_FRAME();
274 
284  void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
285 
286  void OnQuit( wxCommandEvent& event );
287 
293  void PythonPluginsReload();
294 
299  void UpdateUserInterface();
300 
305  static wxString GetAutoSaveFilePrefix();
306 
313  virtual void ExecuteRemoteCommand( const char* cmdline ) override;
314 
315  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
316 
321  void ToPlotter( wxCommandEvent& event );
322 
327  void ToPrinter( wxCommandEvent& event );
328 
333  void ExportSVG( wxCommandEvent& event );
334 
335  // User interface update command event handlers.
336  void OnUpdateSave( wxUpdateUIEvent& aEvent );
337  void OnUpdateLayerPair( wxUpdateUIEvent& aEvent );
338  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
339  void OnUpdateDrcEnable( wxUpdateUIEvent& aEvent );
340  void OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent );
341  void OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent );
342  void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent );
343  void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent );
344  void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
345  void OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent );
346  void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent );
347  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
348  void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
349  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
350  void OnUpdateMuWaveToolbar( wxUpdateUIEvent& aEvent );
351  void OnLayerColorChange( wxCommandEvent& aEvent );
352  void OnConfigurePaths( wxCommandEvent& aEvent );
353  void OnUpdatePCBFromSch( wxCommandEvent& event );
354  void OnRunEeschema( wxCommandEvent& event );
355 
356  void UpdateTrackWidthSelectBox( wxComboBox* aTrackWidthSelectBox );
357  void UpdateViaSizeSelectBox( wxComboBox* aViaSizeSelectBox );
358 
359  void GetKicadAbout( wxCommandEvent& event );
360 
365  virtual bool IsGridVisible() const override;
366 
373  virtual void SetGridVisibility( bool aVisible ) override;
374 
379  virtual COLOR4D GetGridColor() override;
380 
385  virtual void SetGridColor( COLOR4D aColor ) override;
386 
387  // Configurations:
388  void Process_Config( wxCommandEvent& event );
389 
390 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
391 
397  void SetActionPluginSettings( const std::vector< std::pair<wxString, wxString> >& aPluginsWithButtons );
398 
403  std::vector< std::pair<wxString, wxString> > GetActionPluginSettings();
404 
410  bool GetActionPluginButtonVisible( const wxString& aPluginPath, bool aPluginDefault );
411 
416  std::vector<ACTION_PLUGIN*> GetOrderedActionPlugins();
417 
418 #endif
419 
432  PARAM_CFG_ARRAY GetProjectFileParameters();
433 
439  void SaveProjectSettings( bool aAskForSave ) override;
440 
447  bool LoadProjectSettings();
448 
464  PARAM_CFG_ARRAY& GetConfigurationSettings();
465 
466  void LoadSettings( wxConfigBase* aCfg ) override;
467 
468  void SaveSettings( wxConfigBase* aCfg ) override;
469 
470  wxConfigBase* GetSettings() { return config(); };
471 
476  wxString GetLastNetListRead();
477 
489  void SetLastNetListRead( const wxString& aNetListFile );
490 
492  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
493 
503  bool OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
504 
517  bool OnHotkeyDeleteItem( wxDC* aDC );
518 
527  bool OnHotkeyPlaceItem( wxDC* aDC );
528 
529  bool OnHotkeyEditItem( int aIdCommand );
530 
536  int OnHotkeyCopyItem();
537 
545  bool OnHotkeyDuplicateOrArrayItem( int aIdCommand );
546 
554  bool OnHotkeyMoveItem( int aIdCommand );
555 
564  bool OnHotkeyRotateItem( int aIdCommand );
565 
574  bool OnHotkeyFlipItem( int aIdCommand );
575 
586  TRACK * OnHotkeyBeginRoute( wxDC* aDC );
587 
588  void OnCloseWindow( wxCloseEvent& Event ) override;
589  void Process_Special_Functions( wxCommandEvent& event );
590  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
591  void OnSelectTool( wxCommandEvent& aEvent );
592 
598  void OnEditTextAndGraphics( wxCommandEvent& event );
599 
605  void OnEditTracksAndVias( wxCommandEvent& event );
606 
607  void ProcessMuWaveFunctions( wxCommandEvent& event );
608  void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
609 
610  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
611  void ReCreateHToolbar() override;
612  void ReCreateAuxiliaryToolbar() override;
613  void ReCreateVToolbar() override;
614  void ReCreateMicrowaveVToolbar();
615  void ReCreateOptToolbar() override;
616  void ReCreateMenuBar() override;
617 
625  void ReCreateLayerBox( bool aForceResizeToolbar = true );
626 
627 
638  bool SetCurrentNetClass( const wxString& aNetClassName );
639 
648  virtual void OnModify() override;
649 
655  virtual void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
656 
657  PCB_LAYER_WIDGET* GetLayerManager() { return m_Layers; }
658 
662  void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) override;
663 
672  bool IsElementVisible( GAL_LAYER_ID aElement ) const;
673 
681  void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );
682 
687  void SetVisibleAlls();
688 
694  void ReFillLayerWidget();
695 
700  void Show3D_Frame( wxCommandEvent& event ) override;
701 
703  void UseGalCanvas( bool aEnable ) override;
704 
705  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
706 
710  void ShowBoardSetupDialog( wxCommandEvent& event );
711  void DoShowBoardSetupDialog( const wxString& aInitialPage = wxEmptyString,
712  const wxString& aInitialParentPage = wxEmptyString );
713 
714  /* toolbars update UI functions: */
715 
716  void PrepareLayerIndicator();
717 
718  /* mouse functions events: */
719  void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
720  void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override;
721 
729  bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) override;
730 
731  void OnSelectOptionToolbar( wxCommandEvent& event );
732  void OnFlipPcbView( wxCommandEvent& event );
733  void ToolOnRightClick( wxCommandEvent& event ) override;
734 
735  /* Block operations: */
736 
745  virtual int BlockCommand( EDA_KEY aKey ) override;
746 
754  virtual void HandleBlockPlace( wxDC* DC ) override;
755 
766  virtual bool HandleBlockEnd( wxDC* DC ) override;
767 
774  void Block_SelectItems();
775 
780  void Block_Delete();
781 
787  void Block_Rotate();
788 
794  void Block_Flip();
795 
802  void Block_Move();
803 
810  void Block_Duplicate( bool aIncrement );
811 
812  void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
813 
819  void GenFootprintsPositionFile( wxCommandEvent& event );
820 
835  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
836  bool aForceSmdItems, int aSide, bool aFormatCSV = false );
837 
843  void GenFootprintsReport( wxCommandEvent& event );
844 
853  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
854 
855  void InstallDrillFrame( wxCommandEvent& event );
856  void GenD356File( wxCommandEvent& event );
857 
858  void OnFileHistory( wxCommandEvent& event );
859 
866  void Files_io( wxCommandEvent& event );
867 
882  bool Files_io_from_id( int aId );
883 
898  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
899 
905  bool AppendBoardFile( const wxString& aFullFileName, int aCtl );
906 
919  bool SavePcbFile( const wxString& aFileName, bool aCreateBackupFile = CREATE_BACKUP_FILE );
920 
932  bool SavePcbCopy( const wxString& aFileName );
933 
934  // BOARD handling
935 
941  bool Clear_Pcb( bool aQuery );
942 
944  void SetBoard( BOARD* aBoard ) override;
945 
947  BOARD_ITEM_CONTAINER* GetModel() const override;
948 
950  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
951 
956  DRC* GetDrcController() { return m_drc; }
957 
964  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
965 
980  void ArchiveModulesOnBoard( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
981  wxString* aLibPath = NULL );
982 
987  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
988 
993  void ExportToGenCAD( wxCommandEvent& event );
994 
999  void OnExportVRML( wxCommandEvent& event );
1000 
1030  bool ExportVRML_File( const wxString & aFullFileName, double aMMtoWRMLunit,
1031  bool aExport3DFiles, bool aUseRelativePaths,
1032  bool aUsePlainPCB, const wxString & a3D_Subdir,
1033  double aXRef, double aYRef );
1034 
1039  void OnExportIDF3( wxCommandEvent& event );
1040 
1052  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
1053  bool aUseThou, double aXRef, double aYRef );
1054 
1059  void OnExportSTEP( wxCommandEvent& event );
1060 
1066  void ExportToSpecctra( wxCommandEvent& event );
1067 
1075  bool ExportSpecctraFile( const wxString& aFullFilename );
1076 
1084  void ImportSpecctraSession( wxCommandEvent& event );
1085 
1094  void ImportSpecctraDesign( wxCommandEvent& event );
1095 
1101  MODULE* ListAndSelectModuleName();
1102 
1109  void ListNetsAndSelect( wxCommandEvent& event );
1110 
1111  void Swap_Layers( wxCommandEvent& event );
1112 
1113  // Handling texts on the board
1114  void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1115  void FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC );
1116  TEXTE_PCB* CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText = NULL );
1117  void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1118  void StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aErase = true );
1119  void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1120 
1121  // Graphic Segments type DRAWSEGMENT
1122  void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1123  void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1124 
1125  // Footprint editing (see also PCB_BASE_FRAME)
1126  void InstallFootprintPropertiesDialog( MODULE* Module, wxDC* DC );
1127 
1136  void StartMoveModule( MODULE* aModule, wxDC* aDC, bool aDragConnectedTracks );
1137 
1145  void PushPadProperties( D_PAD* aPad );
1146 
1154  bool Delete_Module( MODULE* aModule, wxDC* aDC );
1155 
1165  void Change_Side_Module( MODULE* Module, wxDC* DC );
1166 
1167  int InstallExchangeModuleFrame( MODULE* aModule, bool updateMode, bool selectedMode );
1168 
1178  void Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aCommit,
1179  bool deleteExtraTexts = true,
1180  bool resetTextLayers = true, bool resetTextEffects = true );
1181 
1182  // loading modules: see PCB_BASE_FRAME
1183 
1184  // Board handling
1185  void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
1186 
1193  void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ) override;
1194 
1199  int SelectHighLight( wxDC* DC );
1200 
1205  void HighLight( wxDC* DC );
1206 
1217  bool IsMicroViaAcceptable();
1218 
1231  bool Other_Layer_Route( TRACK* track, wxDC* DC );
1232 
1239  TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
1240 
1241  void Delete_Track( wxDC* DC, TRACK* Track );
1242  void Delete_net( wxDC* DC, TRACK* Track );
1243 
1250  void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
1251 
1260  void Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment );
1261 
1268  void Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem );
1269 
1285  TRACK* Begin_Route( TRACK* aTrack, wxDC* aDC );
1286 
1294  bool End_Route( TRACK* aTrack, wxDC* aDC );
1295 
1296  void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
1297  void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On );
1298  void Attribut_net( wxDC* DC, int net_code, bool Flag_On );
1299 
1305  void StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aCommand );
1306 
1307  bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC );
1308 
1317  bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
1318 
1319  void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
1320  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
1321 
1331  bool Add45DegreeSegment( wxDC* aDC );
1332 
1346  int EraseRedundantTrack( wxDC* aDC,
1347  TRACK* aNewTrack,
1348  int aNewTrackSegmentsCount,
1349  PICKED_ITEMS_LIST* aItemsListPicker );
1350 
1362  bool SetTrackSegmentWidth( TRACK* aTrackItem,
1363  PICKED_ITEMS_LIST* aItemsListPicker,
1364  bool aUseNetclassValue );
1365 
1366 
1367  // zone handling
1368 
1379  void Delete_OldZone_Fill( SEGZONE* aZone, timestamp_t aTimestamp = 0 );
1380 
1387  int Delete_LastCreatedCorner( wxDC* DC );
1388 
1399  int Begin_Zone( wxDC* DC );
1400 
1407  bool End_Zone( wxDC* DC );
1408 
1418  int Fill_Zone( ZONE_CONTAINER* aZone );
1419 
1428  int Fill_All_Zones( wxWindow * aActiveWindow );
1429 
1435  void Check_All_Zones( wxWindow* aActiveWindow );
1436 
1437 
1444  void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container );
1445 
1453  void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container );
1454 
1459  void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container );
1460 
1467  void Start_Move_Zone_Corner( wxDC* DC,
1468  ZONE_CONTAINER* zone_container,
1469  int corner_id,
1470  bool IsNewCorner );
1471 
1476  void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
1477  ZONE_CONTAINER* zone_container,
1478  int corner_id );
1479 
1486  void End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1487 
1493  void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
1494 
1506  void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container );
1507 
1514  void Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1515 
1516  // Target handling
1517  PCB_TARGET* CreateTarget( wxDC* DC );
1518  void DeleteTarget( PCB_TARGET* aTarget, wxDC* DC );
1519  void BeginMoveTarget( PCB_TARGET* aTarget, wxDC* DC );
1520  void PlaceTarget( PCB_TARGET* aTarget, wxDC* DC );
1521  void ShowTargetOptionsDialog( PCB_TARGET* aTarget, wxDC* DC );
1522 
1523  // Graphic segments type DRAWSEGMENT handling:
1524  DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T shape, wxDC* DC );
1525  void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1526  void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1527  void Delete_Drawings_All_Layer( PCB_LAYER_ID aLayer );
1528 
1529  // Dimension handling:
1530  void ShowDimensionPropertyDialog( DIMENSION* aDimension, wxDC* aDC );
1531  DIMENSION* EditDimension( DIMENSION* aDimension, wxDC* aDC );
1532  void DeleteDimension( DIMENSION* aDimension, wxDC* aDC );
1533  void BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC );
1534  void PlaceDimensionText( DIMENSION* aItem, wxDC* DC );
1535 
1536 
1537  // netlist handling:
1538  void InstallNetlistFrame( wxDC* DC );
1539 
1561  void ReadPcbNetlist( const wxString& aNetlistFileName,
1562  const wxString& aCmpFileName,
1563  REPORTER& aReporter,
1564  bool aChangeFootprint,
1565  bool aDeleteBadTracks,
1566  bool aDeleteExtraFootprints,
1567  bool aSelectByTimestamp,
1568  bool aDeleteSinglePadNets,
1569  bool aIsDryRun,
1570  bool* runDragCommand );
1571 
1579  bool RemoveMisConnectedTracks();
1580 
1581 
1582  // Autoplacement:
1583  void OnPlaceOrRouteFootprints( wxCommandEvent& event );
1584 
1585 #if defined( KICAD_SCRIPTING_WXPYTHON )
1586 
1591  void ScriptingConsoleEnableDisable( wxCommandEvent& aEvent );
1592 
1593  void OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent );
1594 
1595 #endif
1596 
1597  void LockModule( MODULE* aModule, bool aLocked );
1598 
1616  void SpreadFootprints( std::vector<MODULE*>* aFootprints,
1617  bool aMoveFootprintsOutsideBoardOnly,
1618  bool aCheckForBoardEdges,
1619  wxPoint aSpreadAreaPosition,
1620  bool aPrepareUndoCommand = true );
1621 
1622 
1630  void Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC );
1631 
1639  void Clean_Pcb();
1640 
1641  void InstallFindFrame();
1642 
1649  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
1650 
1656  void SendCrossProbeNetName( const wxString& aNetName );
1657 
1663  void Edit_Gap( wxDC* DC, MODULE* Module );
1664 
1674  MODULE* CreateMuWaveBaseFootprint( const wxString& aValue, int aTextSize, int aPadCount );
1675 
1683  MODULE* Create_MuWaveComponent( int shape_type );
1684 
1685  MODULE* Create_MuWavePolygonShape();
1686 
1687  void Begin_Self( wxDC* DC );
1688 
1689  void ShowChangedLanguage() override;
1690 
1701  void UpdateTitle();
1702 
1706  void InstallPreferences( PAGED_DIALOG* aParent ) override;
1707 
1711  void CommonSettingsChanged() override;
1712 
1713  void SyncMenusAndToolbars( wxEvent& aEvent ) override;
1714 
1715  DECLARE_EVENT_TABLE()
1716 };
1717 
1718 #endif // WXPCB_STRUCT_H_
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility, colors ...) (note: it is automatically called by action plugins, after running the plugin, so call this function is usually not needed inside action plugins.
IFACE(const char *aName, KIWAY::FACE_T aType)
Definition: pcbnew.cpp:398
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:59
A list of parameters type.
Class ACTION_PLUGIN This is the parent class from where any action plugin class must derive...
Definition: action_plugin.h:40
wxComboBox * m_SelTrackWidthBox
Class KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
long timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: common.h:53
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
Class PCB_LAYER_WIDGET is here to implement the abstract functions of LAYER_WIDGET so they may be tie...
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
The common library.
Class to display a pcb layer list in a wxBitmapComboBox.
bool m_show_microwave_tools
DRC * m_drc
the DRC controller, see drc.cpp
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
static wxWindow * findPythonConsole()
bool m_show_layer_manager_tools
PCB_LAYER_ID
A quick note on layer IDs:
wxAuiToolBar * m_microWaveToolBar
The auxiliary right vertical tool bar used to access the microwave tools.
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:214
void OnLayerColorChange(int aLayer, COLOR4D aColor) override
Function OnLayerColorChange is called to notify client code about a layer color change.
wxComboBox * m_SelViaSizeBox
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
wxConfigBase * GetSettings()
STROKE_T
Enum STROKE_T is the set of shapes for segments (graphic segments and tracks) which are often in the ...
uint32_t EDA_KEY
Definition: common.h:74
PCB_LAYER_WIDGET * GetLayerManager()
PCB_LAYER_WIDGET * m_Layers
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
static const wxChar * pythonConsoleNameId()
Has meaning only if KICAD_SCRIPTING_WXPYTHON option is not defined.
Class DIALOG_PLOT is the dialog to set the plot options, and create plot files in various formats...
Definition: dialog_plot.h:40
wxString m_lastNetListRead
Last net list read with relative path.
#define CREATE_BACKUP_FILE
Struct PARSE_ERROR contains a filename or source description, a problem input line, a line number, a byte offset, and an error message which contains the the caller&#39;s report and his call site information: CPP source file, function, and line number.
Definition: ki_exception.h:123
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:59
Common, abstract interface for edit frames.
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:171
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:174
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:245
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
PARAM_CFG_ARRAY m_configParams
List of Pcbnew configuration settings.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
SGLIB_API S3DMODEL * GetModel(SCENEGRAPH *aNode)
Function GetModel creates an S3DMODEL representation of aNode (raw data, no transforms) ...
Definition: ifsg_api.cpp:471
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:391
DRC * GetDrcController()
Function GetDrcController.
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
Class DIMENSION.
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39