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  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
266  wxChoice* 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( wxChoice* aTrackWidthSelectBox );
357  void UpdateViaSizeSelectBox( wxChoice* 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 
712  /* toolbars update UI functions: */
713 
714  void PrepareLayerIndicator();
715 
716  /* mouse functions events: */
717  void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
718  void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override;
719 
727  bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) override;
728 
729  void OnSelectOptionToolbar( wxCommandEvent& event );
730  void OnFlipPcbView( wxCommandEvent& event );
731  void ToolOnRightClick( wxCommandEvent& event ) override;
732 
733  /* Block operations: */
734 
743  virtual int BlockCommand( EDA_KEY aKey ) override;
744 
752  virtual void HandleBlockPlace( wxDC* DC ) override;
753 
764  virtual bool HandleBlockEnd( wxDC* DC ) override;
765 
772  void Block_SelectItems();
773 
778  void Block_Delete();
779 
785  void Block_Rotate();
786 
792  void Block_Flip();
793 
800  void Block_Move();
801 
808  void Block_Duplicate( bool aIncrement );
809 
810  void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
811 
817  void GenFootprintsPositionFile( wxCommandEvent& event );
818 
833  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
834  bool aForceSmdItems, int aSide, bool aFormatCSV = false );
835 
841  void GenFootprintsReport( wxCommandEvent& event );
842 
851  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
852 
853  void InstallDrillFrame( wxCommandEvent& event );
854  void GenD356File( wxCommandEvent& event );
855 
856  void OnFileHistory( wxCommandEvent& event );
857 
864  void Files_io( wxCommandEvent& event );
865 
880  bool Files_io_from_id( int aId );
881 
896  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
897 
903  bool AppendBoardFile( const wxString& aFullFileName, int aCtl );
904 
917  bool SavePcbFile( const wxString& aFileName, bool aCreateBackupFile = CREATE_BACKUP_FILE );
918 
930  bool SavePcbCopy( const wxString& aFileName );
931 
932  // BOARD handling
933 
939  bool Clear_Pcb( bool aQuery );
940 
942  void SetBoard( BOARD* aBoard ) override;
943 
945  BOARD_ITEM_CONTAINER* GetModel() const override;
946 
948  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
949 
954  DRC* GetDrcController() { return m_drc; }
955 
962  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
963 
978  void ArchiveModulesOnBoard( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
979  wxString* aLibPath = NULL );
980 
985  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
986 
991  void ExportToGenCAD( wxCommandEvent& event );
992 
997  void OnExportVRML( wxCommandEvent& event );
998 
1028  bool ExportVRML_File( const wxString & aFullFileName, double aMMtoWRMLunit,
1029  bool aExport3DFiles, bool aUseRelativePaths,
1030  bool aUsePlainPCB, const wxString & a3D_Subdir,
1031  double aXRef, double aYRef );
1032 
1037  void OnExportIDF3( wxCommandEvent& event );
1038 
1050  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
1051  bool aUseThou, double aXRef, double aYRef );
1052 
1057  void OnExportSTEP( wxCommandEvent& event );
1058 
1064  void ExportToSpecctra( wxCommandEvent& event );
1065 
1073  bool ExportSpecctraFile( const wxString& aFullFilename );
1074 
1082  void ImportSpecctraSession( wxCommandEvent& event );
1083 
1092  void ImportSpecctraDesign( wxCommandEvent& event );
1093 
1099  MODULE* ListAndSelectModuleName();
1100 
1107  void ListNetsAndSelect( wxCommandEvent& event );
1108 
1109  void Swap_Layers( wxCommandEvent& event );
1110 
1111  // Handling texts on the board
1112  void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1113  void FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC );
1114  TEXTE_PCB* CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText = NULL );
1115  void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1116  void StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aErase = true );
1117  void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1118 
1119  // Graphic Segments type DRAWSEGMENT
1120  void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1121  void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1122 
1123  // Footprint editing (see also PCB_BASE_FRAME)
1124  void InstallFootprintPropertiesDialog( MODULE* Module, wxDC* DC );
1125 
1134  void StartMoveModule( MODULE* aModule, wxDC* aDC, bool aDragConnectedTracks );
1135 
1143  void PushPadProperties( D_PAD* aPad );
1144 
1152  bool Delete_Module( MODULE* aModule, wxDC* aDC );
1153 
1163  void Change_Side_Module( MODULE* Module, wxDC* DC );
1164 
1165  int InstallExchangeModuleFrame( MODULE* aModule, bool updateMode, bool selectedMode );
1166 
1176  void Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aCommit,
1177  bool deleteExtraTexts = true,
1178  bool resetTextLayers = true, bool resetTextEffects = true );
1179 
1180  // loading modules: see PCB_BASE_FRAME
1181 
1182  // Board handling
1183  void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
1184 
1191  void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ) override;
1192 
1197  int SelectHighLight( wxDC* DC );
1198 
1203  void HighLight( wxDC* DC );
1204 
1215  bool IsMicroViaAcceptable();
1216 
1229  bool Other_Layer_Route( TRACK* track, wxDC* DC );
1230 
1237  TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
1238 
1239  void Delete_Track( wxDC* DC, TRACK* Track );
1240  void Delete_net( wxDC* DC, TRACK* Track );
1241 
1248  void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
1249 
1258  void Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment );
1259 
1266  void Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem );
1267 
1283  TRACK* Begin_Route( TRACK* aTrack, wxDC* aDC );
1284 
1292  bool End_Route( TRACK* aTrack, wxDC* aDC );
1293 
1294  void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
1295  void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On );
1296  void Attribut_net( wxDC* DC, int net_code, bool Flag_On );
1297 
1303  void StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aCommand );
1304 
1305  bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC );
1306 
1315  bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
1316 
1317  void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
1318  void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
1319 
1329  bool Add45DegreeSegment( wxDC* aDC );
1330 
1344  int EraseRedundantTrack( wxDC* aDC,
1345  TRACK* aNewTrack,
1346  int aNewTrackSegmentsCount,
1347  PICKED_ITEMS_LIST* aItemsListPicker );
1348 
1360  bool SetTrackSegmentWidth( TRACK* aTrackItem,
1361  PICKED_ITEMS_LIST* aItemsListPicker,
1362  bool aUseNetclassValue );
1363 
1364 
1365  // zone handling
1366 
1377  void Delete_OldZone_Fill( SEGZONE* aZone, timestamp_t aTimestamp = 0 );
1378 
1385  int Delete_LastCreatedCorner( wxDC* DC );
1386 
1397  int Begin_Zone( wxDC* DC );
1398 
1405  bool End_Zone( wxDC* DC );
1406 
1416  int Fill_Zone( ZONE_CONTAINER* aZone );
1417 
1426  int Fill_All_Zones( wxWindow * aActiveWindow );
1427 
1433  void Check_All_Zones( wxWindow* aActiveWindow );
1434 
1435 
1442  void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container );
1443 
1451  void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container );
1452 
1457  void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container );
1458 
1465  void Start_Move_Zone_Corner( wxDC* DC,
1466  ZONE_CONTAINER* zone_container,
1467  int corner_id,
1468  bool IsNewCorner );
1469 
1474  void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
1475  ZONE_CONTAINER* zone_container,
1476  int corner_id );
1477 
1484  void End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1485 
1491  void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
1492 
1504  void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container );
1505 
1512  void Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1513 
1514  // Target handling
1515  PCB_TARGET* CreateTarget( wxDC* DC );
1516  void DeleteTarget( PCB_TARGET* aTarget, wxDC* DC );
1517  void BeginMoveTarget( PCB_TARGET* aTarget, wxDC* DC );
1518  void PlaceTarget( PCB_TARGET* aTarget, wxDC* DC );
1519  void ShowTargetOptionsDialog( PCB_TARGET* aTarget, wxDC* DC );
1520 
1521  // Graphic segments type DRAWSEGMENT handling:
1522  DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T shape, wxDC* DC );
1523  void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1524  void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1525  void Delete_Drawings_All_Layer( PCB_LAYER_ID aLayer );
1526 
1527  // Dimension handling:
1528  void ShowDimensionPropertyDialog( DIMENSION* aDimension, wxDC* aDC );
1529  DIMENSION* EditDimension( DIMENSION* aDimension, wxDC* aDC );
1530  void DeleteDimension( DIMENSION* aDimension, wxDC* aDC );
1531  void BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC );
1532  void PlaceDimensionText( DIMENSION* aItem, wxDC* DC );
1533 
1534 
1535  // netlist handling:
1536  void InstallNetlistFrame( wxDC* DC );
1537 
1558  void ReadPcbNetlist( const wxString& aNetlistFileName,
1559  const wxString& aCmpFileName,
1560  REPORTER& aReporter,
1561  bool aChangeFootprint,
1562  bool aDeleteBadTracks,
1563  bool aDeleteExtraFootprints,
1564  bool aSelectByTimestamp,
1565  bool aDeleteSinglePadNets,
1566  bool aIsDryRun );
1567 
1575  bool RemoveMisConnectedTracks();
1576 
1577 
1578  // Autoplacement:
1579  void OnPlaceOrRouteFootprints( wxCommandEvent& event );
1580 
1581 #if defined( KICAD_SCRIPTING_WXPYTHON )
1582 
1587  void ScriptingConsoleEnableDisable( wxCommandEvent& aEvent );
1588 
1589  void OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent );
1590 
1591 #endif
1592 
1593  void LockModule( MODULE* aModule, bool aLocked );
1594 
1612  void SpreadFootprints( std::vector<MODULE*>* aFootprints,
1613  bool aMoveFootprintsOutsideBoardOnly,
1614  bool aCheckForBoardEdges,
1615  wxPoint aSpreadAreaPosition,
1616  bool aPrepareUndoCommand = true );
1617 
1618 
1626  void Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC );
1627 
1635  void Clean_Pcb();
1636 
1637  void InstallFindFrame();
1638 
1645  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
1646 
1652  void SendCrossProbeNetName( const wxString& aNetName );
1653 
1659  void Edit_Gap( wxDC* DC, MODULE* Module );
1660 
1670  MODULE* CreateMuWaveBaseFootprint( const wxString& aValue, int aTextSize, int aPadCount );
1671 
1679  MODULE* Create_MuWaveComponent( int shape_type );
1680 
1681  MODULE* Create_MuWavePolygonShape();
1682 
1683  void Begin_Self( wxDC* DC );
1684 
1685  void ShowChangedLanguage() override;
1686 
1697  void UpdateTitle();
1698 
1702  void InstallPreferences( PAGED_DIALOG* aParent ) override;
1703 
1707  void CommonSettingsChanged() override;
1708 
1709  void SyncMenusAndToolbars( wxEvent& aEvent ) override;
1710 
1711  DECLARE_EVENT_TABLE()
1712 };
1713 
1714 #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:60
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
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:52
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...
wxChoice * m_SelViaSizeBox
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
wxChoice * m_SelTrackWidthBox
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.
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:73
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:170
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:171
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:242
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:386
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