KiCad PCB EDA Suite
wxPcbStruct.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-2016 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #ifndef WXPCB_STRUCT_H_
30 #define WXPCB_STRUCT_H_
31 
32 
33 #include <pcb_base_edit_frame.h>
34 #include <config_params.h>
36 #include <zones.h>
37 
38 
39 /* Forward declarations of classes. */
40 class PCB_SCREEN;
41 class BOARD;
42 class BOARD_COMMIT;
44 class TEXTE_PCB;
45 class MODULE;
46 class TRACK;
47 class SEGZONE;
48 class VIA;
49 class D_PAD;
50 class TEXTE_MODULE;
51 class PCB_TARGET;
52 class DIMENSION;
53 class EDGE_MODULE;
54 class DRC;
55 class ZONE_CONTAINER;
56 class DRAWSEGMENT;
57 class GENERAL_COLLECTOR;
59 class PCB_LAYER_WIDGET;
60 class MARKER_PCB;
61 class BOARD_ITEM;
63 class NETLIST;
64 class REPORTER;
65 struct PARSE_ERROR;
66 class IO_ERROR;
67 class FP_LIB_TABLE;
68 struct AUTOROUTER_CONTEXT;
69 
70 namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
71 
78 #define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" )
79 
80 
82 {
83  friend struct PCB::IFACE;
84  friend class PCB_LAYER_WIDGET;
85 
88 
90  wxAuiToolBar* m_microWaveToolBar;
91 
92 
93 protected:
95 
97 
99 
100  wxString m_lastNetListRead;
101 
102  // The Tool Framework initalization
103  void setupTools();
104 
105  // we'll use lower case function names for private member functions.
106  void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
107  void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu );
108  void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu );
109  void createPopUpMenuForFpPads( D_PAD* aPad, wxMenu* aPopMenu );
110  void createPopupMenuForTracks( TRACK* aTrack, wxMenu* aPopMenu );
111  void createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu );
112  void createPopUpBlockMenu( wxMenu* menu );
113  void createPopUpMenuForMarkers( MARKER_PCB* aMarker, wxMenu* aPopMenu );
114 
119  void enableGALSpecificMenus();
120 
125  void forceColorsToLegacy();
126 
127 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
128 
132  void RebuildActionPluginMenus();
133 
139  void OnActionPlugin( wxCommandEvent& aEvent);
140 
146  void OnActionPluginRefresh( wxCommandEvent& aEvent)
147  {
149  }
150 #endif
151 
156  static const wxChar * pythonConsoleNameId()
157  {
158  return wxT( "PythonConsole" );
159  }
160 
164  static wxWindow * findPythonConsole()
165  {
166  return FindWindowByName( pythonConsoleNameId() );
167  }
168 
178  void syncLayerWidgetLayer();
179 
186  void syncRenderStates();
187 
194  void syncLayerVisibilities();
195 
196  virtual void unitsChangeRefresh() override;
197 
205  virtual bool doAutoSave() override;
206 
211  virtual bool isAutoSaveRequired() const override;
212 
219  void duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone );
220 
225  void moveExact();
226 
232  void duplicateItems( bool aIncrement ) override;
233 
234  // protected so that PCB::IFACE::CreateWindow() is the only factory.
235  PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
236 
237 public:
238  PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer
239  wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
240  wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
241 
244 
245  virtual ~PCB_EDIT_FRAME();
246 
256  void LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
257  throw( IO_ERROR, PARSE_ERROR );
258 
259  void OnQuit( wxCommandEvent& event );
260 
266  void PythonPluginsReload();
267 
273  static wxString GetAutoSaveFilePrefix();
274 
281  virtual void ExecuteRemoteCommand( const char* cmdline ) override;
282 
283  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
284 
290  void ToPlotter( wxCommandEvent& event );
291 
296  void ToPrinter( wxCommandEvent& event );
297 
302  void SVG_Print( wxCommandEvent& event );
303 
304  // User interface update command event handlers.
305  void OnUpdateSave( wxUpdateUIEvent& aEvent );
306  void OnUpdateLayerPair( wxUpdateUIEvent& aEvent );
307  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
308  void OnUpdateDrcEnable( wxUpdateUIEvent& aEvent );
309  void OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent );
310  void OnUpdateAutoDeleteTrack( wxUpdateUIEvent& aEvent );
311  void OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent );
312  void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent );
313  void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent );
314  void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
315  void OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent );
316  void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent );
317  void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
318  void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
319  void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
320  void OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent );
321  void OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent );
322  void OnUpdateAutoPlaceModulesMode( wxUpdateUIEvent& aEvent );
323  void OnUpdateAutoPlaceTracksMode( wxUpdateUIEvent& aEvent );
324  void OnUpdateMuWaveToolbar( wxUpdateUIEvent& aEvent );
325  void OnLayerColorChange( wxCommandEvent& aEvent );
326  void OnConfigurePaths( wxCommandEvent& aEvent );
327  void OnUpdatePCBFromSch( wxCommandEvent& event );
328 
332  void OnAltWheel( wxCommandEvent& event );
333 
343  virtual void PrintPage( wxDC* aDC, LSET aPrintMaskLayer, bool aPrintMirrorMode,
344  void* aData = NULL ) override;
345 
346  void GetKicadAbout( wxCommandEvent& event );
347 
352  virtual bool IsGridVisible() const override;
353 
360  virtual void SetGridVisibility( bool aVisible ) override;
361 
366  virtual COLOR4D GetGridColor() const override;
367 
372  virtual void SetGridColor( COLOR4D aColor ) override;
373 
374  // Configurations:
375  void Process_Config( wxCommandEvent& event );
376 
390 
396  void SaveProjectSettings( bool aAskForSave ) override;
397 
404  bool LoadProjectSettings();
405 
422 
423  void LoadSettings( wxConfigBase* aCfg ) override;
424 
425  void SaveSettings( wxConfigBase* aCfg ) override;
426 
427  wxConfigBase* GetSettings() { return config(); };
428 
434  wxString GetLastNetListRead();
435 
447  void SetLastNetListRead( const wxString& aNetListFile );
448 
450  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
451 
461  bool OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
462 
475  bool OnHotkeyDeleteItem( wxDC* aDC );
476 
485  bool OnHotkeyPlaceItem( wxDC* aDC );
486 
487  bool OnHotkeyEditItem( int aIdCommand );
488 
494  int OnHotkeyCopyItem();
495 
503  bool OnHotkeyDuplicateOrArrayItem( int aIdCommand );
504 
512  bool OnHotkeyMoveItem( int aIdCommand );
513 
522  bool OnHotkeyRotateItem( int aIdCommand );
523 
532  bool OnHotkeyFlipItem( int aIdCommand );
533 
544  TRACK * OnHotkeyBeginRoute( wxDC* aDC );
545 
546  void OnCloseWindow( wxCloseEvent& Event ) override;
547  void Process_Special_Functions( wxCommandEvent& event );
548  void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
549  void OnSelectTool( wxCommandEvent& aEvent );
550 
556  void OnResetModuleTextSizes( wxCommandEvent& event );
557 
558  void ProcessMuWaveFunctions( wxCommandEvent& event );
559  void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
560 
561  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
562  void ReCreateHToolbar() override;
563  void ReCreateAuxiliaryToolbar() override;
564  void ReCreateVToolbar() override;
566  void ReCreateOptToolbar();
567  void ReCreateMenuBar() override;
568 
576  void ReCreateLayerBox( bool aForceResizeToolbar = true );
577 
578 
589  bool SetCurrentNetClass( const wxString& aNetClassName );
590 
599  virtual void OnModify() override;
600 
606  virtual void SetActiveLayer( LAYER_ID aLayer ) override;
607 
616  bool IsElementVisible( int aElement ) const;
617 
625  void SetElementVisibility( int aElement, bool aNewState );
626 
631  void SetVisibleAlls();
632 
638  void ReFillLayerWidget();
639 
644  void Show3D_Frame( wxCommandEvent& event ) override;
645 
647  void UseGalCanvas( bool aEnable ) override;
648 
649  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
650 
655  void ShowDesignRulesEditor( wxCommandEvent& event );
656 
657  /* toolbars update UI functions: */
658 
659  void PrepareLayerIndicator();
660 
661  /* mouse functions events: */
662  void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
663  void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override;
664 
672  bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) override;
673 
674  void OnSelectOptionToolbar( wxCommandEvent& event );
675  void OnFlipPcbView( wxCommandEvent& event );
676  void ToolOnRightClick( wxCommandEvent& event ) override;
677 
678  /* Block operations: */
679 
688  virtual int BlockCommand( EDA_KEY aKey ) override;
689 
697  virtual void HandleBlockPlace( wxDC* DC ) override;
698 
709  virtual bool HandleBlockEnd( wxDC* DC ) override;
710 
717  void Block_SelectItems();
718 
723  void Block_Delete();
724 
730  void Block_Rotate();
731 
737  void Block_Flip();
738 
745  void Block_Move();
746 
751  void Block_Mirror_X();
752 
759  void Block_Duplicate( bool aIncrement );
760 
761  void Process_Settings( wxCommandEvent& event );
762  void OnConfigurePcbOptions( wxCommandEvent& aEvent );
763  void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
764  void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
765 
771  void GenFootprintsPositionFile( wxCommandEvent& event );
772 
787  int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
788  bool aForceSmdItems, int aSide, bool aFormatCSV = false );
789 
795  void GenFootprintsReport( wxCommandEvent& event );
796 
805  bool DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM );
806 
807  void InstallDrillFrame( wxCommandEvent& event );
808  void GenD356File( wxCommandEvent& event );
809  void ToPostProcess( wxCommandEvent& event );
810 
811  void OnFileHistory( wxCommandEvent& event );
812 
819  void Files_io( wxCommandEvent& event );
820 
835  void Files_io_from_id( int aId );
836 
851  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
852 
858  bool AppendBoardFile( const wxString& aFullFileName, int aCtl );
859 
872  bool SavePcbFile( const wxString& aFileName, bool aCreateBackupFile = CREATE_BACKUP_FILE );
873 
885  bool SavePcbCopy( const wxString& aFileName );
886 
887  // BOARD handling
888 
894  bool Clear_Pcb( bool aQuery );
895 
897  void SetBoard( BOARD* aBoard ) override;
898 
900  BOARD_ITEM_CONTAINER* GetModel() const override;
901 
903  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
904 
905  // Drc control
906 
907  /* function GetDrcController
908  * @return the DRC controller
909  */
910  DRC* GetDrcController() { return m_drc; }
911 
918  void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
919 
930  void ArchiveModulesOnBoard( bool aStoreInNewLib );
931 
936  void RecreateBOMFileFromBoard( wxCommandEvent& aEvent );
937 
942  void ExportToGenCAD( wxCommandEvent& event );
943 
948  void OnExportVRML( wxCommandEvent& event );
949 
979  bool ExportVRML_File( const wxString & aFullFileName, double aMMtoWRMLunit,
980  bool aExport3DFiles, bool aUseRelativePaths,
981  bool aUsePlainPCB, const wxString & a3D_Subdir,
982  double aXRef, double aYRef );
983 
988  void OnExportIDF3( wxCommandEvent& event );
989 
1001  bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName,
1002  bool aUseThou, double aXRef, double aYRef );
1003 
1004 
1009  void OnExportSTEP( wxCommandEvent& event );
1010 
1016  void ExportToSpecctra( wxCommandEvent& event );
1017 
1025  bool ExportSpecctraFile( const wxString& aFullFilename );
1026 
1034  void ImportSpecctraSession( wxCommandEvent& event );
1035 
1044  void ImportSpecctraDesign( wxCommandEvent& event );
1045 
1050  void Access_to_External_Tool( wxCommandEvent& event );
1051 
1058 
1065  void ListNetsAndSelect( wxCommandEvent& event );
1066 
1067  void Swap_Layers( wxCommandEvent& event );
1068 
1069  // Handling texts on the board
1070  void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1071  void FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC );
1072  TEXTE_PCB* CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText = NULL );
1073  void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1074  void StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aErase = true );
1075  void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
1076  void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC );
1077 
1078  // Graphic Segments type DRAWSEGMENT
1079  void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1080  void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
1081  void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC );
1082 
1083  // Footprint edition (see also PCB_BASE_FRAME)
1084  void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC );
1085 
1094  void StartMoveModule( MODULE* aModule, wxDC* aDC, bool aDragConnectedTracks );
1095 
1104  void DlgGlobalChange_PadSettings( D_PAD* aPad, bool aRedraw );
1105 
1113  bool Delete_Module( MODULE* aModule, wxDC* aDC );
1114 
1124  void Change_Side_Module( MODULE* Module, wxDC* DC );
1125 
1126  int InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
1127 
1137  void Exchange_Module( MODULE* aOldModule, MODULE* aNewModule, BOARD_COMMIT& aCommit );
1138 
1139  // loading modules: see PCB_BASE_FRAME
1140 
1141  // Board handling
1142  void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
1143 
1150  void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem ) override;
1151 
1156  int SelectHighLight( wxDC* DC );
1157 
1162  void HighLight( wxDC* DC );
1163 
1164  // Track and via edition:
1165  void Via_Edit_Control( wxCommandEvent& event );
1166 
1177  bool IsMicroViaAcceptable( void );
1178 
1191  bool Other_Layer_Route( TRACK* track, wxDC* DC );
1192  void HighlightUnconnectedPads( wxDC* DC );
1193 
1200  TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
1201 
1202  void Delete_Track( wxDC* DC, TRACK* Track );
1203  void Delete_net( wxDC* DC, TRACK* Track );
1204 
1211  void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
1212 
1220  bool Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack, bool aVia );
1221 
1230  bool Change_Net_Tracks_And_Vias_Sizes( int aNetcode, bool aUseNetclassValue );
1231 
1240  void Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment );
1241 
1248  void Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem );
1249 
1265  TRACK* Begin_Route( TRACK* aTrack, wxDC* aDC );
1266 
1274  bool End_Route( TRACK* aTrack, wxDC* aDC );
1275 
1276  void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
1277  void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On );
1278  void Attribut_net( wxDC* DC, int net_code, bool Flag_On );
1279 
1285  void StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aCommand );
1286 
1287  bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC );
1288 
1297  bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
1298 
1299  void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
1300  void SwitchLayer( wxDC* DC, LAYER_ID layer ) override;
1301 
1311  bool Add45DegreeSegment( wxDC* aDC );
1312 
1326  int EraseRedundantTrack( wxDC* aDC,
1327  TRACK* aNewTrack,
1328  int aNewTrackSegmentsCount,
1329  PICKED_ITEMS_LIST* aItemsListPicker );
1330 
1342  bool SetTrackSegmentWidth( TRACK* aTrackItem,
1343  PICKED_ITEMS_LIST* aItemsListPicker,
1344  bool aUseNetclassValue );
1345 
1346 
1347  // zone handling
1348 
1359  void Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp = 0 );
1360 
1367  int Delete_LastCreatedCorner( wxDC* DC );
1368 
1379  int Begin_Zone( wxDC* DC );
1380 
1387  bool End_Zone( wxDC* DC );
1388 
1398  int Fill_Zone( ZONE_CONTAINER* aZone );
1399 
1408  int Fill_All_Zones( wxWindow * aActiveWindow, bool aVerbose = true );
1409 
1410 
1417  void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container );
1418 
1426  void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container );
1427 
1432  void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container );
1433 
1440  void Start_Move_Zone_Corner( wxDC* DC,
1441  ZONE_CONTAINER* zone_container,
1442  int corner_id,
1443  bool IsNewCorner );
1444 
1449  void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
1450  ZONE_CONTAINER* zone_container,
1451  int corner_id );
1452 
1459  void End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1460 
1466  void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
1467 
1479  void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container );
1480 
1487  void Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );
1488 
1489  // Target handling
1490  PCB_TARGET* CreateTarget( wxDC* DC );
1491  void DeleteTarget( PCB_TARGET* aTarget, wxDC* DC );
1492  void BeginMoveTarget( PCB_TARGET* aTarget, wxDC* DC );
1493  void PlaceTarget( PCB_TARGET* aTarget, wxDC* DC );
1494  void ShowTargetOptionsDialog( PCB_TARGET* aTarget, wxDC* DC );
1495 
1496  // Graphic segments type DRAWSEGMENT handling:
1497  DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T shape, wxDC* DC );
1498  void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1499  void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
1500  void Delete_Drawings_All_Layer( LAYER_ID aLayer );
1501 
1502  // Dimension handling:
1503  void ShowDimensionPropertyDialog( DIMENSION* aDimension, wxDC* aDC );
1504  DIMENSION* EditDimension( DIMENSION* aDimension, wxDC* aDC );
1505  void DeleteDimension( DIMENSION* aDimension, wxDC* aDC );
1506  void BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC );
1507  void PlaceDimensionText( DIMENSION* aItem, wxDC* DC );
1508 
1509 
1510  // netlist handling:
1511  void InstallNetlistFrame( wxDC* DC );
1512 
1534  void ReadPcbNetlist( const wxString& aNetlistFileName,
1535  const wxString& aCmpFileName,
1536  REPORTER* aReporter,
1537  bool aChangeFootprint,
1538  bool aDeleteBadTracks,
1539  bool aDeleteExtraFootprints,
1540  bool aSelectByTimestamp,
1541  bool aDeleteSinglePadNets,
1542  bool aIsDryRun );
1543 
1551  bool RemoveMisConnectedTracks();
1552 
1553 
1554  // Autoplacement:
1555  void OnPlaceOrRouteFootprints( wxCommandEvent& event );
1556 
1557 #if defined( KICAD_SCRIPTING_WXPYTHON )
1558 
1563  void ScriptingConsoleEnableDisable( wxCommandEvent& aEvent );
1564 
1565  void OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent );
1566 
1567 #endif
1568 
1569  void OnSelectAutoPlaceMode( wxCommandEvent& aEvent );
1570 
1575  void OnOrientFootprints( wxCommandEvent& event );
1576 
1585  bool ReOrientModules( const wxString& ModuleMask, double Orient, bool include_fixe );
1586  void LockModule( MODULE* aModule, bool aLocked );
1587 
1605  void SpreadFootprints( std::vector<MODULE*>* aFootprints,
1606  bool aMoveFootprintsOutsideBoardOnly,
1607  bool aCheckForBoardEdges,
1608  wxPoint aSpreadAreaPosition,
1609  bool aPrepareUndoCommand = true );
1610 
1617  void AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC );
1618 
1619  // Autorouting:
1620  int Solve( AUTOROUTER_CONTEXT& aCtx, int aLayersCount );
1621  void Reset_Noroutable( wxDC* DC );
1622  void Autoroute( wxDC* DC, int mode );
1623  void ReadAutoroutedTracks( wxDC* DC );
1624  void GlobalRoute( wxDC* DC );
1625 
1633  void Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC );
1634 
1642  void Clean_Pcb();
1643 
1644  void InstallFindFrame();
1645 
1652  void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
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 
1682 
1683  void Begin_Self( wxDC* DC );
1684 
1685  void ShowChangedLanguage() override;
1686 
1697  void UpdateTitle();
1698 
1699  DECLARE_EVENT_TABLE()
1700 };
1701 
1702 #endif // WXPCB_STRUCT_H_
void BeginMoveTarget(PCB_TARGET *aTarget, wxDC *DC)
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
Definition: pcbframe.cpp:826
void syncRenderStates()
Function syncRenderStates updates the "Render" checkboxes in the layer widget according to current to...
Definition: pcbframe.cpp:917
void UpdateTitle()
Function UpdateTitle sets the main window title bar text.
Definition: pcbframe.cpp:1032
void InstallDisplayOptionsDialog(wxCommandEvent &aEvent)
void Edit_Track_Width(wxDC *aDC, TRACK *aTrackSegment)
Function Edit_Track_Width Modify a full track width (using DRC control).
void Place_DrawItem(DRAWSEGMENT *drawitem, wxDC *DC)
Definition: editedge.cpp:74
void ExportToSpecctra(wxCommandEvent &event)
Function ExporttoSPECCTRA Ask for a filename and call ExportSpecctraFile to export the current BOARD ...
bool MergeCollinearTracks(TRACK *track, wxDC *DC, int end)
IFACE(const char *aName, KIWAY::FACE_T aType)
Definition: pcbnew.cpp:377
void OnUpdateLayerPair(wxUpdateUIEvent &aEvent)
PCB_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
virtual void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
Definition: pcbframe.cpp:1004
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:78
A list of parameters type.
bool Other_Layer_Route(TRACK *track, wxDC *DC)
Function Other_Layer_Route operates in one of two ways.
void MuWaveCommand(wxDC *DC, const wxPoint &MousePos)
void SetPageSettings(const PAGE_INFO &aPageSettings) override
>
Definition: pcbframe.cpp:526
void RecreateCmpFileFromBoard(wxCommandEvent &aEvent)
Function RecreateBOMFileFromBoard Recreates a .cmp file from the current loaded board this is the sam...
Class KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
void SetElementVisibility(int aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
Definition: pcbframe.cpp:944
void DeleteTarget(PCB_TARGET *aTarget, wxDC *DC)
void OnExportIDF3(wxCommandEvent &event)
Function OnExportIDF3 will export the current BOARD to a IDFv3 board and lib files.
void Start_Move_Zone_Corner(wxDC *DC, ZONE_CONTAINER *zone_container, int corner_id, bool IsNewCorner)
Function Start_Move_Zone_Corner Prepares a move corner in a zone outline, called from a move corner c...
void Start_Move_Zone_Drag_Outline_Edge(wxDC *DC, ZONE_CONTAINER *zone_container, int corner_id)
Function Start_Move_Zone_Corner Prepares a drag edge in an existing zone outline,.
void GetKicadAbout(wxCommandEvent &event)
PARAM_CFG_ARRAY GetProjectFileParameters()
Function GetProjectFileParameters returns a project file parameter list for Pcbnew.
void syncLayerWidgetLayer()
Function syncLayerWidgetLayer updates the currently layer "selection" within the PCB_LAYER_WIDGET.
Definition: pcbframe.cpp:910
void SpreadFootprints(std::vector< MODULE * > *aFootprints, bool aMoveFootprintsOutsideBoardOnly, bool aCheckForBoardEdges, wxPoint aSpreadAreaPosition, bool aPrepareUndoCommand=true)
Function SpreadFootprints Footprints (after loaded by reading a netlist for instance) are moved to be...
TRACK * Delete_Segment(wxDC *DC, TRACK *Track)
Function Delete_Segment removes a track segment.
Definition: deltrack.cpp:45
void OnConfigurePaths(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1136
void Process_Config(wxCommandEvent &event)
void OnUpdateAutoPlaceTracksMode(wxUpdateUIEvent &aEvent)
void DeleteDimension(DIMENSION *aDimension, wxDC *aDC)
Definition: dimension.cpp:363
virtual void unitsChangeRefresh() override
Function unitsChangeRefresh is called when when the units setting has changed to allow for any derive...
Definition: pcbframe.cpp:930
void AutoPlaceModule(MODULE *Module, int place_mode, wxDC *DC)
Function AutoPlaceModule automatically places footprints within the confines of the PCB edges...
static wxString GetAutoSaveFilePrefix()
Function GetAutoSaveFilePrefix.
void OnPlaceOrRouteFootprints(wxCommandEvent &event)
bool End_Zone(wxDC *DC)
Function End_Zone terminates (if no DRC error ) the zone edge creation process.
void InstallTextPCBOptionsFrame(TEXTE_PCB *TextPCB, wxDC *DC)
Routine for main window class to launch text properties dialog.
int InstallExchangeModuleFrame(MODULE *ExchangeModuleModule)
Definition: pcbframe.cpp:1197
void InstallPcbGlobalDeleteFrame(const wxPoint &pos)
void LockModule(MODULE *aModule, bool aLocked)
void UseGalCanvas(bool aEnable) override
>
Definition: pcbframe.cpp:713
void OnAltWheel(wxCommandEvent &event)
called when the alt key is pressed during a mouse wheel action
DRAWSEGMENT * Begin_DrawSegment(DRAWSEGMENT *Segment, STROKE_T shape, wxDC *DC)
Definition: editedge.cpp:241
virtual void SetActiveLayer(LAYER_ID aLayer) override
Function SetActiveLayer will change the currently active layer to aLayer and also update the PCB_LAYE...
Definition: pcbframe.cpp:893
void PrepareLayerIndicator()
Definition: tool_pcb.cpp:93
void ToPlotter(wxCommandEvent &event)
Function ToPlotter Open a dialog frame to create plot and drill files relative to the current board...
Definition: pcbframe.cpp:1115
bool Delete_Module(MODULE *aModule, wxDC *aDC)
Function Delete Module Remove a footprint from m_Modules linked list and put it in undelete buffer Th...
Definition: modules.cpp:258
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
int Fill_All_Zones(wxWindow *aActiveWindow, bool aVerbose=true)
Function Fill_All_Zones Fill all zones on the board The old fillings are removed. ...
void PlaceDimensionText(DIMENSION *aItem, wxDC *DC)
Definition: dimension.cpp:445
void ToPrinter(wxCommandEvent &event)
Function ToPrinter Install the print dialog.
void SetLastNetListRead(const wxString &aNetListFile)
Set the last net list successfully read by the net list dialog box.
Definition: pcbframe.cpp:991
void Exchange_Module(MODULE *aOldModule, MODULE *aNewModule, BOARD_COMMIT &aCommit)
Function Exchange_Module Replaces OldModule by NewModule, using OldModule settings: position...
Class PCB_LAYER_WIDGET is here to implement the abstract functions of LAYER_WIDGET so they may be tie...
bool SavePcbCopy(const wxString &aFileName)
Function SavePcbCopy writes the board data structures to a aFileName but unlike SavePcbFile, does not make anything else (no backup, borad fliename change, no flag changes ...) Used under a project mgr to save under a new name the current board.
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
Definition: pcbframe.cpp:801
void FlipTextePcb(TEXTE_PCB *aTextePcb, wxDC *aDC)
void SVG_Print(wxCommandEvent &event)
Function SVG_Print shows the print SVG file dialog.
Definition: pcbframe.cpp:1015
bool OnHotkeyPlaceItem(wxDC *aDC)
Function OnHotkeyPlaceItem Place the item (footprint, track, text .
virtual bool doAutoSave() override
Function doAutoSave performs auto save when the board has been modified and not saved within the auto...
void ReCreateMicrowaveVToolbar()
Definition: tool_pcb.cpp:498
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void OnExportSTEP(wxCommandEvent &event)
Function OnExportSTEP Exports the current BOARD to a STEP assembly.
void ToolOnRightClick(wxCommandEvent &event) override
void InstallFindFrame()
wxChoice * m_SelViaSizeBox
Definition: wxPcbStruct.h:240
bool Add45DegreeSegment(wxDC *aDC)
Function Add45DegreeSegment adds a track segment between 2 tracks segments if these 2 segments make a...
Definition: editrack.cpp:300
void InstallGraphicItemPropertiesDialog(DRAWSEGMENT *aItem, wxDC *aDC)
void ToPostProcess(wxCommandEvent &event)
void BeginMoveDimensionText(DIMENSION *aItem, wxDC *DC)
Definition: dimension.cpp:381
void ShowDimensionPropertyDialog(DIMENSION *aDimension, wxDC *aDC)
Definition: dimension.cpp:353
bool Clear_Pcb(bool aQuery)
Function Clear_Pcb delete all and reinitialize the current board.
Definition: initpcb.cpp:39
void OnLayerColorChange(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1109
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.
Definition: export_idf.cpp:553
void Start_Move_Zone_Outlines(wxDC *DC, ZONE_CONTAINER *zone_container)
Function Start_Move_Zone_Outlines Initialize parameters to move an existing zone outlines.
virtual COLOR4D GetGridColor() const override
Function GetGridColor() , virtual.
Definition: pcbframe.cpp:854
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
void OnUpdateSave(wxUpdateUIEvent &aEvent)
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 ...
Definition: tool_pcb.cpp:709
bool OnRightClick(const wxPoint &aMousePos, wxMenu *aPopMenu) override
Function OnRightClick populates a popup menu with the choices appropriate for the current context...
PARAM_CFG_ARRAY & GetConfigurationSettings()
Function GetConfigurationSettings returns the Pcbnew applications settings list.
void Edit_Gap(wxDC *DC, MODULE *Module)
Function Edit_Gap edits the GAP module if it has changed the position and/or size of the pads that fo...
Definition: muonde.cpp:686
The common library.
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
Definition: basicframe.cpp:361
void Delete_Texte_Pcb(TEXTE_PCB *TextePcb, wxDC *DC)
void OnSelectTool(wxCommandEvent &aEvent)
Definition: edit.cpp:1422
void ExportToGenCAD(wxCommandEvent &event)
Function ExportToGenCAD creates a file in GenCAD 1.4 format from the current board.
virtual void SetGridColor(COLOR4D aColor) override
Function SetGridColor() , virtual.
Definition: pcbframe.cpp:860
Class to display a pcb layer list in a wxBitmapComboBox.
bool m_show_microwave_tools
Definition: wxPcbStruct.h:242
void ReCreateHToolbar() override
Definition: tool_pcb.cpp:203
void syncLayerVisibilities()
Function syncLayerVisibilities updates each "Layer" checkbox in the layer widget according to each la...
Definition: pcbframe.cpp:923
DRC * m_drc
the DRC controller, see drc.cpp
Definition: wxPcbStruct.h:96
DIMENSION * EditDimension(DIMENSION *aDimension, wxDC *aDC)
Definition: dimension.cpp:259
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void Swap_Layers(wxCommandEvent &event)
void Remove_Zone_Corner(wxDC *DC, ZONE_CONTAINER *zone_container)
Function End_Move_Zone_Corner_Or_Outlines Remove the currently selected corner in a zone outline the ...
void OnCloseWindow(wxCloseEvent &Event) override
Definition: pcbframe.cpp:606
TRACK * Begin_Route(TRACK *aTrack, wxDC *aDC)
Function Begin_Route Starts a new track and/or establish of a new track point.
Definition: editrack.cpp:98
void Block_Flip()
Function Block_Flip Flip items within the selected block.
bool SetCurrentNetClass(const wxString &aNetClassName)
Function SetCurrentNetClass Must be called after a netclass selection (or after a netclass parameter ...
Definition: pcbframe.cpp:1123
wxChoice * m_SelTrackWidthBox
Definition: wxPcbStruct.h:239
void ReadAutoroutedTracks(wxDC *DC)
void RemoveStruct(BOARD_ITEM *Item, wxDC *DC)
Definition: edit.cpp:1273
void SaveProjectSettings(bool aAskForSave) override
Function SaveProjectSettings saves changes to the project settings to the project (...
bool End_Route(TRACK *aTrack, wxDC *aDC)
Function End_Route Terminates a track currently being created.
Definition: editrack.cpp:415
static wxWindow * findPythonConsole()
Definition: wxPcbStruct.h:164
void Start_Move_DrawItem(DRAWSEGMENT *drawitem, wxDC *DC)
Definition: editedge.cpp:56
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE...
Definition: pcbframe.cpp:952
void ReadPcbNetlist(const wxString &aNetlistFileName, const wxString &aCmpFileName, REPORTER *aReporter, bool aChangeFootprint, bool aDeleteBadTracks, bool aDeleteExtraFootprints, bool aSelectByTimestamp, bool aDeleteSinglePadNets, bool aIsDryRun)
Function ReadPcbNetlist reads aNetlistFileName and updates the footprints (load missing footprints an...
virtual bool IsGridVisible() const override
Function IsGridVisible() , virtual.
Definition: pcbframe.cpp:842
bool SetTrackSegmentWidth(TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Function SetTrackSegmentWidth Modify one track segment width or one via diameter (using DRC control)...
void Begin_Self(wxDC *DC)
Definition: muonde.cpp:139
MODULE * ListAndSelectModuleName()
Function ListAndSelectModuleName builds and shows a list of existing modules on board that the user c...
void createPopUpBlockMenu(wxMenu *menu)
virtual bool isAutoSaveRequired() const override
Function isautoSaveRequired returns true if the board has been modified.
Definition: pcbframe.cpp:554
void PlaceTarget(PCB_TARGET *aTarget, wxDC *DC)
bool m_show_layer_manager_tools
Definition: wxPcbStruct.h:243
void moveExact()
Function moveExact Move the selected item exactly.
Definition: edit.cpp:1537
void Process_Settings(wxCommandEvent &event)
void GlobalRoute(wxDC *DC)
bool IsElementVisible(int aElement) const
Function IsElementVisible tests whether a given element category is visible.
Definition: pcbframe.cpp:938
void Place_Texte_Pcb(TEXTE_PCB *TextePcb, wxDC *DC)
PCB_TARGET * CreateTarget(wxDC *DC)
bool AppendBoardFile(const wxString &aFullFileName, int aCtl)
Function AppendBoardFile appends a board file onto the current one, creating God knows what...
void OnUpdateShowMicrowaveToolbar(wxUpdateUIEvent &aEvent)
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aForceSmdItems, int aSide, bool aFormatCSV=false)
Function DoGenFootprintsPositionFile Creates an ascii footprint position file.
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
void OnUpdateZoneDisplayStyle(wxUpdateUIEvent &aEvent)
bool DoGenFootprintsReport(const wxString &aFullFilename, bool aUnitsMM)
Function DoGenFootprintsReport Creates an ascii footprint report file giving some infos on footprints...
void Delete_Drawings_All_Layer(LAYER_ID aLayer)
Definition: editedge.cpp:148
void Attribut_Track(TRACK *track, wxDC *DC, bool Flag_On)
Definition: attribut.cpp:68
void GenFootprintsReport(wxCommandEvent &event)
Function GenFootprintsReport Calls DoGenFootprintsReport to create a footprint reprot file See DoGenF...
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
void StartMoveTextePcb(TEXTE_PCB *aTextePcb, wxDC *aDC, bool aErase=true)
bool OnHotkeyDuplicateOrArrayItem(int aIdCommand)
Function OnHotkeyDuplicateOrArrayItem Duplicate an item (optionally incrementing if necessary and pos...
wxAuiToolBar * m_microWaveToolBar
The auxiliary right vertical tool bar used to access the microwave tools.
Definition: wxPcbStruct.h:90
Class LSET is a set of LAYER_IDs.
MODULE * Create_MuWavePolygonShape()
Definition: muonde.cpp:579
void Show_1_Ratsnest(EDA_ITEM *item, wxDC *DC)
Function Show_1_Ratsnest draw ratsnest.
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:205
TEXTE_PCB * CreateTextePcb(wxDC *aDC, TEXTE_PCB *aText=NULL)
MODULE * Create_MuWaveComponent(int shape_type)
Create_MuWaveComponent creates a module "GAP" or "STUB" used in micro wave designs.
Definition: muonde.cpp:226
BOARD_ITEM_CONTAINER * GetModel() const override
>
Definition: pcbframe.cpp:520
void OnSelectOptionToolbar(wxCommandEvent &event)
Definition: tool_pcb.cpp:727
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Function OpenProjectFiles (was LoadOnePcbFile) loads a KiCad board (.kicad_pcb) from aFileName...
void Block_Delete()
Function Block_Delete deletes all items within the selected block.
bool RemoveMisConnectedTracks()
Function RemoveMisConnectedTracks finds all track segments which are mis-connected (to more than one ...
Definition: clean.cpp:783
int Begin_Zone(wxDC *DC)
Function Begin_Zone either initializes the first segment of a new zone, or adds an intermediate segme...
bool OnHotkeyMoveItem(int aIdCommand)
Function OnHotkeyMoveItem Moves or drag the item (footprint, track, text .
void OnConfigurePcbOptions(wxCommandEvent &aEvent)
void OnUpdateAutoDeleteTrack(wxUpdateUIEvent &aEvent)
int EraseRedundantTrack(wxDC *aDC, TRACK *aNewTrack, int aNewTrackSegmentsCount, PICKED_ITEMS_LIST *aItemsListPicker)
Function EraseRedundantTrack Called after creating a track Remove (if exists) the old track that have...
Definition: tr_modif.cpp:62
virtual void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command send by Eeschema via a socket, port KICAD_PCB_PORT_SERVICE_NUMBER (currently...
void OnLeftDClick(wxDC *DC, const wxPoint &MousePos) override
void Rotate_Texte_Pcb(TEXTE_PCB *TextePcb, wxDC *DC)
void OnUpdateShowLayerManager(wxUpdateUIEvent &aEvent)
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
void InstallModuleOptionsFrame(MODULE *Module, wxDC *DC)
Definition: editmod.cpp:49
void DlgGlobalChange_PadSettings(D_PAD *aPad, bool aRedraw)
Function DlgGlobalChange_PadSettings Function to change pad caracteristics for the given footprint or...
void Delete_OldZone_Fill(SEGZONE *aZone, time_t aTimestamp=0)
Function Delete_OldZone_Fill (obsolete) Used for compatibility with old boards Remove the zone fillin...
void createPopUpMenuForFootprints(MODULE *aModule, wxMenu *aPopMenu)
void Via_Edit_Control(wxCommandEvent &event)
void createPopUpMenuForZones(ZONE_CONTAINER *edge_zone, wxMenu *aPopMenu)
bool ReOrientModules(const wxString &ModuleMask, double Orient, bool include_fixe)
Function ReOrientModules Set the orientation of footprints.
void ReCreateVToolbar() override
Definition: tool_pcb.cpp:412
void ReCreateMenuBar() override
Function ReCreateMenuBar Creates recreates the menu bar.
virtual ~PCB_EDIT_FRAME()
Definition: pcbframe.cpp:500
void End_Move_Zone_Corner_Or_Outlines(wxDC *DC, ZONE_CONTAINER *zone_container)
Function End_Move_Zone_Corner_Or_Outlines Terminates a move corner in a zone outline, or a move zone outlines.
TRACK * OnHotkeyBeginRoute(wxDC *aDC)
Function OnHotkeyBeginRoute If the current active layer is a copper layer, and if no item currently e...
virtual bool HandleBlockEnd(wxDC *DC) override
Function HandleBlockEnd() Handle the "end" of a block command, i.e.
void ShowChangedLanguage() override
Function ShowChangedLanguage redraws the menus and what not in current language.
Definition: pcbframe.cpp:961
void Block_SelectItems()
Function Block_SelectItems Uses GetScreen()->m_BlockLocate select items within the selected block...
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:257
wxConfigBase * GetSettings()
Definition: wxPcbStruct.h:427
void Delete_Segment_Edge(DRAWSEGMENT *Segment, wxDC *DC)
Definition: editedge.cpp:113
void HighLight(wxDC *DC)
Function HighLight.
Definition: highlight.cpp:101
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:52
void StartMoveOneNodeOrSegment(TRACK *aTrack, wxDC *aDC, int aCommand)
Function StartMoveOneNodeOrSegment initializes the parameters to move one via or/and a terminal point...
void Start_DragTrackSegmentAndKeepSlope(TRACK *track, wxDC *DC)
bool OnHotkeyFlipItem(int aIdCommand)
Function OnHotkeyFlipItem Flip the item (text or footprint) found under the mouse cursor...
void OnQuit(wxCommandEvent &event)
Definition: pcbframe.cpp:600
PCB_LAYER_WIDGET * m_Layers
Definition: wxPcbStruct.h:94
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
int Fill_Zone(ZONE_CONTAINER *aZone)
Function Fill_Zone Calculate the zone filling for the outline zone_container The zone outline is a fr...
bool OnHotKey(wxDC *aDC, int aHotkeyCode, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
Function OnHotKey.
virtual void PrintPage(wxDC *aDC, LSET aPrintMaskLayer, bool aPrintMirrorMode, void *aData=NULL) override
Function PrintPage , virtual used to print a page Print the page pointed by the current screen...
void ReCreateOptToolbar()
Definition: tool_pcb.cpp:323
bool PlaceDraggedOrMovedTrackSegment(TRACK *Track, wxDC *DC)
int Delete_LastCreatedCorner(wxDC *DC)
Function Delete_LastCreatedCorner Used only while creating a new zone outline Remove and delete the c...
void Show3D_Frame(wxCommandEvent &event) override
Function Show3D_Frame displays the 3D view of current printed circuit board.
Definition: pcbframe.cpp:686
void Reset_Noroutable(wxDC *DC)
Definition: autorout.cpp:210
bool OnHotkeyDeleteItem(wxDC *aDC)
Function OnHotkeyDeleteItem Delete the item found under the mouse cursor Depending on the current act...
void Autoroute(wxDC *DC, int mode)
Definition: autorout.cpp:54
void Add_Similar_Zone(wxDC *DC, ZONE_CONTAINER *zone_container)
Function Add_Similar_Zone Add a zone to a given zone outline.
void OnUpdateDrcEnable(wxUpdateUIEvent &aEvent)
void ShowDesignRulesEditor(wxCommandEvent &event)
Function ShowDesignRulesEditor displays the Design Rules Editor.
Definition: pcbframe.cpp:787
void Add_Zone_Cutout(wxDC *DC, ZONE_CONTAINER *zone_container)
Function Add_Zone_Cutout Add a cutout zone to a given zone outline.
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
Definition: tracepcb.cpp:97
static const wxChar * pythonConsoleNameId()
Has meaning only if KICAD_SCRIPTING_WXPYTHON option is not defined.
Definition: wxPcbStruct.h:156
void Edit_Zone_Params(wxDC *DC, ZONE_CONTAINER *zone_container)
Function Edit_Zone_Params Edit params (layer, clearance, ...) for a zone outline. ...
void Attribut_net(wxDC *DC, int net_code, bool Flag_On)
Definition: attribut.cpp:97
void OnSelectAutoPlaceMode(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1078
void OnOrientFootprints(wxCommandEvent &event)
Function OnOrientFootprints install the dialog box for the common Orient Footprints.
void enableGALSpecificMenus()
an helper function to enable some menus only active when the display is switched to GAL mode and whic...
Definition: pcbframe.cpp:757
bool OnHotkeyRotateItem(int aIdCommand)
Function OnHotkeyRotateItem Rotate the item (text or footprint) found under the mouse cursor...
void Attribut_Segment(TRACK *track, wxDC *DC, bool Flag_On)
Definition: attribut.cpp:50
wxString m_lastNetListRead
Last net list read with relative path.
Definition: wxPcbStruct.h:100
void OnUpdateViaDrawMode(wxUpdateUIEvent &aEvent)
int Solve(AUTOROUTER_CONTEXT &aCtx, int aLayersCount)
Definition: solve.cpp:266
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void Delete_Track(wxDC *DC, TRACK *Track)
Definition: deltrack.cpp:140
void OnUpdateSelectCustomTrackWidth(wxUpdateUIEvent &aEvent)
void SendMessageToEESCHEMA(BOARD_ITEM *objectToSync)
Function SendMessageToEESCHEMA sends a message to the schematic editor so that it may move its cursor...
wxString GetLastNetListRead()
Get the last net list read with the net list dialog box.
Definition: pcbframe.cpp:976
void createPopUpMenuForFpPads(D_PAD *aPad, wxMenu *aPopMenu)
bool OnHotkeyEditItem(int aIdCommand)
void ShowTargetOptionsDialog(PCB_TARGET *aTarget, wxDC *DC)
Definition: target_edit.cpp:83
virtual void HandleBlockPlace(wxDC *DC) override
Function HandleBlockPlace() Called after HandleBlockEnd, when a block command needs to be executed af...
void OnFileHistory(wxCommandEvent &event)
void LoadFootprints(NETLIST &aNetlist, REPORTER *aReporter)
Function loadFootprints loads the footprints for each COMPONENT in aNetlist from the list of librarie...
void OnUpdatePCBFromSch(wxCommandEvent &event)
Definition: pcbframe.cpp:1142
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's report and his call site information: CPP source file, function, and line number.
Definition: ki_exception.h:94
void Block_Move()
Function Block_Move move all items within the selected block.
void createPopUpMenuForTexts(TEXTE_PCB *Text, wxMenu *menu)
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
void SetBoard(BOARD *aBoard) override
>
Definition: pcbframe.cpp:506
void createPopupMenuForTracks(TRACK *aTrack, wxMenu *aPopMenu)
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 ImportSpecctraSession(wxCommandEvent &event)
Function ImportSpecctraSession will import a specctra *.ses file and use it to relocate MODULEs and t...
Common, abstract interface for edit frames.
void Process_Special_Functions(wxCommandEvent &event)
Definition: edit.cpp:64
void OnUpdateHighContrastDisplayMode(wxUpdateUIEvent &aEvent)
void duplicateZone(wxDC *aDC, ZONE_CONTAINER *aZone)
Function duplicateZone duplicates the given zone.
void ArchiveModulesOnBoard(bool aStoreInNewLib)
Function ArchiveModulesOnBoard Save modules in a library:
Definition: librairi.cpp:564
void GenD356File(wxCommandEvent &event)
void updateViaSizeSelectBox()
Definition: tool_pcb.cpp:652
virtual void SetGridVisibility(bool aVisible) override
Function SetGridVisibility() , virtual It may be overloaded by derived classes if you want to store/r...
Definition: pcbframe.cpp:848
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:166
void OnEditItemRequest(wxDC *aDC, BOARD_ITEM *aItem) override
Function OnEditItemRequest Install the corresponding dialog editor for the given item.
LAYER_ID
Enum LAYER_ID is the set of PCB layers.
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: muonde.cpp:185
void StartMoveModule(MODULE *aModule, wxDC *aDC, bool aDragConnectedTracks)
Function StartMoveModule Initialize a drag or move pad command.
Definition: modules.cpp:98
Class DRC is the Design Rule Checker, and performs all the DRC tests.
Definition: drc_stuff.h:158
#define CREATE_BACKUP_FILE
Definition: wxstruct.h:59
Class GENERAL_COLLECTOR is intended for use when the right click button is pressed, or when the plain "arrow" tool is in effect.
Definition: collectors.h:211
void createPopUpMenuForMarkers(MARKER_PCB *aMarker, wxMenu *aPopMenu)
void OnExportVRML(wxCommandEvent &event)
Function OnExportVRML will export the current BOARD to a VRML file.
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
void Block_Rotate()
Function Block_Rotate Rotate all items within the selected block.
void OnUpdateVerticalToolbar(wxUpdateUIEvent &aEvent)
void createPopUpMenuForFpTexts(TEXTE_MODULE *aText, wxMenu *aPopMenu)
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
void OnUpdateTraceDrawMode(wxUpdateUIEvent &aEvent)
void OnUpdateMuWaveToolbar(wxUpdateUIEvent &aEvent)
void ListNetsAndSelect(wxCommandEvent &event)
Function ListNetsAndSelect called by a command event displays the sorted list of nets in a dialog fra...
void OnUpdateSelectAutoTrackWidth(wxUpdateUIEvent &aEvent)
void forceColorsToLegacy()
Helper function to coerce all colors to legacy-compatible when switching from GAL to legacy canvas...
Definition: pcbframe.cpp:735
void Delete_Zone_Contour(wxDC *DC, ZONE_CONTAINER *zone_container)
Function Delete_Zone Remove the zone which include the segment aZone, or the zone which have the give...
void Block_Mirror_X()
Function Block_Mirror_X mirrors all items within the currently selected block in the X axis...
void Delete_net(wxDC *DC, TRACK *Track)
Definition: deltrack.cpp:152
void Block_Duplicate(bool aIncrement)
Function Block_Duplicate Duplicate all items within the selected block.
bool IsMicroViaAcceptable(void)
Function IsMicroViaAcceptable return true if a microvia can be placed on the board.
Definition: pcbframe.cpp:872
virtual int BlockCommand(EDA_KEY aKey) override
Function BlockCommand Returns the block command internat code (BLOCK_MOVE, BLOCK_COPY...) corresponding to the keys pressed (ALT, SHIFT, SHIFT ALT ..) when block command is started by dragging the mouse.
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void SwitchLayer(wxDC *DC, LAYER_ID layer) override
Definition: edit.cpp:1350
void HighlightUnconnectedPads(wxDC *DC)
Definition: highlight.cpp:111
Abstract interface for BOARD_ITEMs capable of storing other items inside.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
Definition: wxPcbStruct.h:238
void OnUpdateShowBoardRatsnest(wxUpdateUIEvent &aEvent)
void ReFillLayerWidget()
Function ReFillLayerWidget changes out all the layers in m_Layers and may be called upon loading a ne...
Definition: pcbframe.cpp:581
void Files_io_from_id(int aId)
Function Files_io_from_id Read and write board files.
void Change_Side_Module(MODULE *Module, wxDC *DC)
Function Change_Side_Module Flip a footprint (switch layer from component or component to copper) The...
Definition: modules.cpp:285
Class GENERAL_COLLECTORS_GUIDE is a general implementation of a COLLECTORS_GUIDE. ...
Definition: collectors.h:378
void updateTraceWidthSelectBox()
Definition: tool_pcb.cpp:614
DRC * GetDrcController()
Definition: wxPcbStruct.h:910
bool Change_Net_Tracks_And_Vias_Sizes(int aNetcode, bool aUseNetclassValue)
Function Change_Net_Tracks_And_Vias_Sizes Reset all tracks width and vias diameters and drill to thei...
int OnHotkeyCopyItem()
Function OnHotkeyCopyItem returns the copy event id for copyable items.
PARAM_CFG_ARRAY m_configSettings
List of Pcbnew configuration settings.
Definition: wxPcbStruct.h:98
void ProcessMuWaveFunctions(wxCommandEvent &event)
void PythonPluginsReload()
Reload the Python plugins if they are newer than the already loaded, and load new plugins if any Do n...
Definition: pcbframe.cpp:1179
void OnFlipPcbView(wxCommandEvent &event)
Definition: pcbframe.cpp:1170
void OnUpdateAutoPlaceModulesMode(wxUpdateUIEvent &aEvent)
void duplicateItems(bool aIncrement) override
Function duplicateItems Duplicate selected item if possible and start a move.
Definition: edit.cpp:1568
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:47
void InstallDrillFrame(wxCommandEvent &event)
void Access_to_External_Tool(wxCommandEvent &event)
Function Access_to_External_Tool Run an external tool (like freeroute )
void ReCreateAuxiliaryToolbar() override
Definition: tool_pcb.cpp:541
void Clean_Pcb()
Function Clean_Pcb Clean up the board (remove redundant vias, not connected tracks and merges colline...
Definition: clean.cpp:129
Class DIMENSION.
void OnLeftClick(wxDC *DC, const wxPoint &MousePos) override
bool Reset_All_Tracks_And_Vias_To_Netclass_Values(bool aTrack, bool aVia)
Function Reset_All_Tracks_And_Vias_To_Netclass_Values Reset all tracks width and/or vias diameters an...
void Remove_One_Track(wxDC *DC, TRACK *pt_segm)
Function Remove_One_Track removes 1 track/ The leading segment is removed and all adjacent segments u...
Definition: deltrack.cpp:192
int SelectHighLight(wxDC *DC)
Locate track or pad and highlight the corresponding net.
Definition: highlight.cpp:44
void Edit_TrackSegm_Width(wxDC *aDC, TRACK *aTrackItem)
Function Edit_TrackSegm_Width Modify one track segment width or one via diameter (using DRC control)...
void OnResetModuleTextSizes(wxCommandEvent &event)
Function OnResetModuleTextSizes resets text size and width of all module text fields of given field t...
bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey=0) override
Function GeneralControl performs application specific control using aDC at aPosition in logical units...
void setupTools()
Definition: pcbframe.cpp:563
void ImportSpecctraDesign(wxCommandEvent &event)
Function ImportSpecctraDesign will import a specctra *.dsn file and use it to replace an entire BOARD...
void End_Edge(DRAWSEGMENT *Segment, wxDC *DC)
Definition: editedge.cpp:308
bool ExportSpecctraFile(const wxString &aFullFilename)
Function ExportSpecctraFile will export the current BOARD to a specctra dsn file. ...
void GenFootprintsPositionFile(wxCommandEvent &event)
Function GenFootprintsPositionFile Calls DoGenFootprintsPositionFile to create a footprint position f...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39