KiCad PCB EDA Suite
pcbframe.cpp
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) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
7  * Copyright (C) 2013-2017 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
32 #include <fctsys.h>
33 #include <kiface_i.h>
34 #include <pgm_base.h>
35 #include <class_drawpanel.h>
36 #include <confirm.h>
37 #include <wxPcbStruct.h>
38 #include <collectors.h>
39 #include <build_version.h>
40 #include <macros.h>
42 #include <msgpanel.h>
43 #include <fp_lib_table.h>
44 #include <bitmaps.h>
45 
46 #include <pcbnew.h>
47 #include <pcbnew_id.h>
48 #include <drc_stuff.h>
49 #include <layer_widget.h>
50 #include <dialog_design_rules.h>
51 #include <class_pcb_layer_widget.h>
52 #include <hotkeys.h>
53 #include <config_params.h>
54 #include <module_editor_frame.h>
55 #include <dialog_helpers.h>
56 #include <dialog_plot.h>
58 #include <convert_to_biu.h>
59 #include <view/view.h>
60 #include <view/view_controls.h>
61 #include <pcb_painter.h>
62 #include <invoke_pcb_dialog.h>
63 
64 #include <class_track.h>
65 #include <class_board.h>
66 #include <class_module.h>
67 #include <worksheet_viewitem.h>
68 #include <connectivity_data.h>
69 #include <ratsnest_viewitem.h>
70 
71 #include <tool/tool_manager.h>
72 #include <tool/tool_dispatcher.h>
73 #include <tools/pcb_actions.h>
74 
76 
77 #if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
78 #include <python_scripting.h>
79 #endif
80 
81 #include <pcb_draw_panel_gal.h>
83 #include <functional>
84 
85 using namespace std::placeholders;
86 
89 
90 static const wxString PlotLineWidthEntry = "PlotLineWidth_mm";
91 static const wxString MagneticPadsEntry = "PcbMagPadOpt";
92 static const wxString MagneticTracksEntry = "PcbMagTrackOpt";
93 static const wxString ShowMicrowaveEntry = "ShowMicrowaveTools";
94 static const wxString ShowLayerManagerEntry = "ShowLayerManagerTools";
95 static const wxString ShowPageLimitsEntry = "ShowPageLimits";
96 
98 
99 
100 BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
101  EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer )
102  EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest )
103 
104  EVT_CHOICE( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom )
105  EVT_CHOICE( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid )
106 
107  EVT_CLOSE( PCB_EDIT_FRAME::OnCloseWindow )
108  EVT_SIZE( PCB_EDIT_FRAME::OnSize )
109 
110  EVT_TOOL( ID_LOAD_FILE, PCB_EDIT_FRAME::Files_io )
113  EVT_TOOL( ID_NEW_BOARD, PCB_EDIT_FRAME::Files_io )
115  EVT_TOOL( ID_OPEN_MODULE_EDITOR, PCB_EDIT_FRAME::Process_Special_Functions )
116  EVT_TOOL( ID_OPEN_MODULE_VIEWER, PCB_EDIT_FRAME::Process_Special_Functions )
117 
118  // Menu Files:
119  EVT_MENU( ID_MAIN_MENUBAR, PCB_EDIT_FRAME::Process_Special_Functions )
121 
126  EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, PCB_EDIT_FRAME::OnFileHistory )
127 
128  EVT_MENU( ID_GEN_PLOT, PCB_EDIT_FRAME::ToPlotter )
129 
130  EVT_MENU( ID_GEN_EXPORT_SPECCTRA, PCB_EDIT_FRAME::ExportToSpecctra )
136 
137  EVT_MENU( ID_GEN_IMPORT_SPECCTRA_SESSION,PCB_EDIT_FRAME::ImportSpecctraSession )
138  EVT_MENU( ID_GEN_IMPORT_SPECCTRA_DESIGN, PCB_EDIT_FRAME::ImportSpecctraDesign )
139  EVT_MENU( ID_GEN_IMPORT_DXF_FILE, PCB_EDIT_FRAME::Process_Special_Functions )
140 
141  EVT_MENU( ID_MENU_ARCHIVE_MODULES_IN_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
143 
144  EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit )
145 
146  // menu Config
147  EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions )
148  EVT_MENU( ID_PCB_LIB_TABLE_EDIT, PCB_EDIT_FRAME::Process_Config )
149  EVT_MENU( ID_PCB_LIB_WIZARD, PCB_EDIT_FRAME::Process_Config )
152  EVT_MENU( ID_CONFIG_SAVE, PCB_EDIT_FRAME::Process_Config )
153  EVT_MENU( ID_CONFIG_READ, PCB_EDIT_FRAME::Process_Config )
155  PCB_EDIT_FRAME::Process_Config )
158  EVT_MENU( wxID_PREFERENCES, PCB_EDIT_FRAME::Process_Config )
159  EVT_MENU( ID_PCB_LAYERS_SETUP, PCB_EDIT_FRAME::Process_Config )
160  EVT_MENU( ID_PCB_MASK_CLEARANCE, PCB_EDIT_FRAME::Process_Config )
161  EVT_MENU( ID_PCB_PAD_SETUP, PCB_EDIT_FRAME::Process_Config )
162  EVT_MENU( ID_CONFIG_SAVE, PCB_EDIT_FRAME::Process_Config )
163  EVT_MENU( ID_CONFIG_READ, PCB_EDIT_FRAME::Process_Config )
164  EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP, PCB_EDIT_FRAME::InstallDisplayOptionsDialog )
165  EVT_MENU( ID_PCB_USER_GRID_SETUP, PCB_EDIT_FRAME::Process_Special_Functions )
166 
167  // menu Postprocess
168  EVT_MENU( ID_PCB_GEN_POS_MODULES_FILE, PCB_EDIT_FRAME::GenFootprintsPositionFile )
169  EVT_MENU( ID_PCB_GEN_DRILL_FILE, PCB_EDIT_FRAME::InstallDrillFrame )
171  EVT_MENU( ID_PCB_GEN_CMP_FILE, PCB_EDIT_FRAME::RecreateCmpFileFromBoard )
172  EVT_MENU( ID_PCB_GEN_BOM_FILE_FROM_BOARD, PCB_EDIT_FRAME::RecreateBOMFileFromBoard )
173 
174  // menu Miscellaneous
175  EVT_MENU( ID_MENU_LIST_NETS, PCB_EDIT_FRAME::ListNetsAndSelect )
176  EVT_MENU( ID_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE, PCB_EDIT_FRAME::Process_Special_Functions )
177  EVT_MENU( ID_PCB_GLOBAL_DELETE, PCB_EDIT_FRAME::Process_Special_Functions )
178  EVT_MENU( ID_MENU_PCB_CLEAN, PCB_EDIT_FRAME::Process_Special_Functions )
179  EVT_MENU( ID_MENU_PCB_SWAP_LAYERS, PCB_EDIT_FRAME::Process_Special_Functions )
181  PCB_EDIT_FRAME::OnResetModuleTextSizes )
182 
183  // Menu Help
184  EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
185  EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
186  EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
187  EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
188 
189  // Menu 3D Frame
191 
192  // Switching canvases
196 
197  // Menu Get Design Rules Editor
199 
200  // Horizontal toolbar
201  EVT_TOOL( ID_RUN_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
202  EVT_TOOL( ID_SHEET_SET, EDA_DRAW_FRAME::Process_PageSettings )
203  EVT_TOOL( wxID_CUT, PCB_EDIT_FRAME::Process_Special_Functions )
204  EVT_TOOL( wxID_COPY, PCB_EDIT_FRAME::Process_Special_Functions )
205  EVT_TOOL( wxID_PASTE, PCB_EDIT_FRAME::Process_Special_Functions )
206  EVT_TOOL( wxID_UNDO, PCB_BASE_EDIT_FRAME::RestoreCopyFromUndoList )
207  EVT_TOOL( wxID_REDO, PCB_BASE_EDIT_FRAME::RestoreCopyFromRedoList )
208  EVT_TOOL( wxID_PRINT, PCB_EDIT_FRAME::ToPrinter )
210  EVT_TOOL( ID_GEN_PLOT, PCB_EDIT_FRAME::Process_Special_Functions )
211  EVT_TOOL( ID_FIND_ITEMS, PCB_EDIT_FRAME::Process_Special_Functions )
212  EVT_TOOL( ID_GET_NETLIST, PCB_EDIT_FRAME::Process_Special_Functions )
213  EVT_TOOL( ID_DRC_CONTROL, PCB_EDIT_FRAME::Process_Special_Functions )
214  EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::Process_Special_Functions )
215  EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
216  EVT_COMBOBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions )
217  EVT_CHOICE( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
218  EVT_CHOICE( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
219  EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnSelectAutoPlaceMode )
220  EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnSelectAutoPlaceMode )
221  EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool )
222 
223 
224 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
225  EVT_TOOL( ID_TOOLBARH_PCB_ACTION_PLUGIN_REFRESH, PCB_EDIT_FRAME::OnActionPluginRefresh )
226 #endif
227 
228 #if defined( KICAD_SCRIPTING_WXPYTHON )
229  // has meaning only with KICAD_SCRIPTING_WXPYTHON enabled
230  EVT_TOOL( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::ScriptingConsoleEnableDisable )
232  PCB_EDIT_FRAME::OnUpdateScriptingConsoleState )
233 #endif
234 
235  // Option toolbar
239  PCB_EDIT_FRAME::OnSelectOptionToolbar )
241  PCB_EDIT_FRAME::OnSelectOptionToolbar )
243  PCB_EDIT_FRAME::OnSelectOptionToolbar )
245  PCB_EDIT_FRAME::OnSelectOptionToolbar )
247  PCB_EDIT_FRAME::OnSelectOptionToolbar )
249  PCB_EDIT_FRAME::OnSelectOptionToolbar )
250 
251  EVT_TOOL( ID_UPDATE_PCB_FROM_SCH, PCB_EDIT_FRAME::OnUpdatePCBFromSch )
252 
254  PCB_EDIT_FRAME::OnSelectOptionToolbar )
255 
257  PCB_EDIT_FRAME::OnSelectOptionToolbar )
258 
259  // Vertical main toolbar:
261  EVT_TOOL( ID_ZOOM_SELECTION, PCB_EDIT_FRAME::OnSelectTool )
263  PCB_EDIT_FRAME::OnSelectTool )
264 
266  PCB_EDIT_FRAME::ProcessMuWaveFunctions )
267 
269  PCB_EDIT_FRAME::Process_Special_Functions )
270 
271  // Tracks and vias sizes general options
274  PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
275 
276  // popup menus
277  EVT_MENU( ID_POPUP_PCB_DELETE_TRACKSEG, PCB_EDIT_FRAME::Process_Special_Functions )
279  PCB_EDIT_FRAME::Process_Special_Functions )
280 
281  // User interface update event handlers.
282  EVT_UPDATE_UI( ID_SAVE_BOARD, PCB_EDIT_FRAME::OnUpdateSave )
283  EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::OnUpdateLayerPair )
284  EVT_UPDATE_UI( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::OnUpdateLayerSelectBox )
285  EVT_UPDATE_UI( ID_TB_OPTIONS_DRC_OFF, PCB_EDIT_FRAME::OnUpdateDrcEnable )
286  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_RATSNEST, PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest )
287  EVT_UPDATE_UI( ID_TB_OPTIONS_AUTO_DEL_TRACK, PCB_EDIT_FRAME::OnUpdateAutoDeleteTrack )
288  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, PCB_EDIT_FRAME::OnUpdateViaDrawMode )
289  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, PCB_EDIT_FRAME::OnUpdateTraceDrawMode )
290  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
291  PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode )
292  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
293  PCB_EDIT_FRAME::OnUpdateShowLayerManager )
294  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE,
295  PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar )
296  EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnUpdateVerticalToolbar )
297  EVT_UPDATE_UI( ID_ZOOM_SELECTION, PCB_EDIT_FRAME::OnUpdateVerticalToolbar )
298  EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
299  EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
300  PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth )
301  EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth )
303  PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth )
304  EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::OnUpdateSelectViaSize )
305  EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnUpdateAutoPlaceModulesMode )
306  EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnUpdateAutoPlaceTracksMode )
308  PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
310  PCB_EDIT_FRAME::OnUpdateSelectViaSize )
311  EVT_UPDATE_UI_RANGE( ID_PCB_HIGHLIGHT_BUTT, ID_PCB_MEASUREMENT_TOOL,
312  PCB_EDIT_FRAME::OnUpdateVerticalToolbar )
313  EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SHOW_ZONES, ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY,
314  PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle )
315  EVT_UPDATE_UI_RANGE( ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_END_CMD,
316  PCB_EDIT_FRAME::OnUpdateMuWaveToolbar )
317 
318  EVT_COMMAND( wxID_ANY, LAYER_WIDGET::EVT_LAYER_COLOR_CHANGE, PCB_EDIT_FRAME::OnLayerColorChange )
319 END_EVENT_TABLE()
320 
321 
322 PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
323  PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB, wxT( "Pcbnew" ), wxDefaultPosition,
325 {
326  m_showBorderAndTitleBlock = true; // true to display sheet references
327  m_showAxis = false; // true to display X and Y axis
328  m_showOriginAxis = true;
329  m_showGridAxis = true;
330  m_SelTrackWidthBox = NULL;
331  m_SelViaSizeBox = NULL;
332  m_SelLayerBox = NULL;
333  m_show_microwave_tools = false;
334  m_show_layer_manager_tools = true;
335  m_hotkeysDescrList = g_Board_Editor_Hokeys_Descr;
336  m_hasAutoSave = true;
337  m_microWaveToolBar = NULL;
338 
339  m_rotationAngle = 900;
340 
341  // Create GAL canvas
342  EDA_DRAW_PANEL_GAL* galCanvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ),
343  m_FrameSize,
344  GetGalDisplayOptions(),
346 
347  SetGalCanvas( galCanvas );
348 
349  SetBoard( new BOARD() );
350 
351  // Create the PCB_LAYER_WIDGET *after* SetBoard():
352 
353  wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
354  int pointSize = font.GetPointSize();
355  int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
356 
357  // printf( "pointSize:%d 80%%:%d\n", pointSize, (pointSize*8)/10 );
358 
359  if( screenHeight <= 900 )
360  pointSize = (pointSize * 8) / 10;
361 
362  m_Layers = new PCB_LAYER_WIDGET( this, GetCanvas(), pointSize );
363 
364  m_drc = new DRC( this ); // these 2 objects point to each other
365 
366  wxIcon icon;
367  icon.CopyFromBitmap( KiBitmap( icon_pcbnew_xpm ) );
368  SetIcon( icon );
369 
370  // LoadSettings() *after* creating m_LayersManager, because LoadSettings()
371  // initialize parameters in m_LayersManager
372  LoadSettings( config() );
373 
374  SetScreen( new PCB_SCREEN( GetPageSettings().GetSizeIU() ) );
375  GetScreen()->SetMaxUndoItems( m_UndoRedoCountMax );
376 
377  // PCB drawings start in the upper left corner.
378  GetScreen()->m_Center = false;
379 
380  SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
381 
382  GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER );
383  GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
384 
385  if( m_canvas )
386  m_canvas->SetEnableBlockCommands( true );
387 
388  ReCreateMenuBar();
389  ReCreateHToolbar();
390  ReCreateAuxiliaryToolbar();
391  ReCreateVToolbar();
392  ReCreateOptToolbar();
393 
394  ReCreateMicrowaveVToolbar();
395 
396  m_auimgr.SetManagedWindow( this );
397 
398  EDA_PANEINFO horiz;
399  horiz.HorizontalToolbarPane();
400 
401  EDA_PANEINFO vert;
402  vert.VerticalToolbarPane();
403 
404  EDA_PANEINFO mesg;
405  mesg.MessageToolbarPane();
406 
407  // Create a wxAuiPaneInfo for the Layers Manager, not derived from the template.
408  // LAYER_WIDGET is floatable, but initially docked at far right
409  EDA_PANEINFO lyrs;
410  lyrs.LayersToolbarPane();
411  lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget
412  lyrs.BestSize( m_Layers->GetBestSize() );
413  lyrs.Caption( _( "Visibles" ) );
414  lyrs.TopDockable( false ).BottomDockable( false );
415 
416  if( m_mainToolBar ) // The main horizontal toolbar
417  {
418  m_auimgr.AddPane( m_mainToolBar,
419  wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top().Row( 0 ) );
420  }
421 
422  if( m_auxiliaryToolBar ) // the auxiliary horizontal toolbar, that shows track and via sizes, zoom ...)
423  {
424  m_auimgr.AddPane( m_auxiliaryToolBar,
425  wxAuiPaneInfo( horiz ).Name( wxT( "m_auxiliaryToolBar" ) ).Top().Row( 1 ) );
426  }
427 
428  if( m_microWaveToolBar ) // The auxiliary vertical right toolbar (currently microwave tools)
429  m_auimgr.AddPane( m_microWaveToolBar,
430  wxAuiPaneInfo( vert ).Name( wxT( "m_microWaveToolBar" ) ).
431  Right().Layer( 1 ).Position(1).Hide() );
432 
433  if( m_drawToolBar ) // The main right vertical toolbar
434  m_auimgr.AddPane( m_drawToolBar,
435  wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Layer( 2 ) );
436 
437  // Add the layer manager ( most right side of pcbframe )
438  m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 3 ) );
439 
440  if( m_optionsToolBar ) // The left vertical toolbar (fast acces display options of Pcbnew)
441  {
442  m_auimgr.AddPane( m_optionsToolBar,
443  wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ).Left().Layer(1) );
444 
445  m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
446  m_auimgr.GetPane( wxT( "m_microWaveToolBar" ) ).Show( m_show_microwave_tools );
447  }
448 
449  if( m_canvas )
450  m_auimgr.AddPane( m_canvas,
451  wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() );
452 
453  if( GetGalCanvas() )
454  m_auimgr.AddPane( (wxWindow*) GetGalCanvas(),
455  wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() );
456 
457  if( m_messagePanel )
458  m_auimgr.AddPane( m_messagePanel,
459  wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) );
460 
461  ReFillLayerWidget(); // this is near end because contents establish size
462  m_Layers->ReFillRender(); // Update colors in Render after the config is read
463  syncLayerWidgetLayer();
464 
465  m_auimgr.Update();
466 
467  setupTools();
468 
469  Zoom_Automatique( false );
470 
471  EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = loadCanvasTypeSetting();
472 
473  if( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
474  {
475  if( GetGalCanvas()->SwitchBackend( canvasType ) )
476  UseGalCanvas( true );
477  }
478 
479  enableGALSpecificMenus();
480 
481  // disable Export STEP item if kicad2step does not exist
482  wxString strK2S = Pgm().GetExecutablePath();
483  #ifdef __WXMAC__
484  strK2S += "Contents/MacOS/";
485  #endif
486  wxFileName appK2S( strK2S, "kicad2step" );
487 
488  #ifdef _WIN32
489  appK2S.SetExt( "exe" );
490  #endif
491 
492  if( !appK2S.FileExists() )
493  GetMenuBar()->FindItem( ID_GEN_EXPORT_FILE_STEP )->Enable( false );
494 }
495 
496 
498 {
499  delete m_drc;
500 }
501 
502 
504 {
506 
507  if( IsGalCanvasActive() )
508  {
509  aBoard->GetConnectivity()->Build( aBoard );
510 
511  // reload the worksheet
512  SetPageSettings( aBoard->GetPageSettings() );
513  }
514 }
515 
516 
518 {
519  return m_Pcb;
520 }
521 
522 
523 void PCB_EDIT_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
524 {
525  PCB_BASE_FRAME::SetPageSettings( aPageSettings );
526 
527  if( IsGalCanvasActive() )
528  {
529  PCB_DRAW_PANEL_GAL* drawPanel = static_cast<PCB_DRAW_PANEL_GAL*>( GetGalCanvas() );
530 
531  // Prepare worksheet template
532  KIGFX::WORKSHEET_VIEWITEM* worksheet;
533  worksheet = new KIGFX::WORKSHEET_VIEWITEM( &m_Pcb->GetPageSettings(),
534  &m_Pcb->GetTitleBlock() );
535  worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) );
536 
537  BASE_SCREEN* screen = GetScreen();
538 
539  if( screen != NULL )
540  {
541  worksheet->SetSheetNumber( screen->m_ScreenNumber );
542  worksheet->SetSheetCount( screen->m_NumberOfScreens );
543  }
544 
545  // PCB_DRAW_PANEL_GAL takes ownership of the worksheet
546  drawPanel->SetWorksheet( worksheet );
547  }
548 }
549 
550 
552 {
553  if( GetScreen() )
554  return GetScreen()->IsSave();
555 
556  return false;
557 }
558 
559 
561 {
562  // Create the manager and dispatcher & route draw panel events to the dispatcher
563  m_toolManager = new TOOL_MANAGER;
564  m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(),
565  GetGalCanvas()->GetViewControls(), this );
566  m_actions = new PCB_ACTIONS();
567  m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, m_actions );
568 
569  // Register tools
570  m_actions->RegisterAllTools( m_toolManager );
571  m_toolManager->InitTools();
572 
573  // Run the selection tool, it is supposed to be always active
574  m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" );
575 }
576 
577 
579 {
580  m_Layers->ReFill();
581 
582  wxAuiPaneInfo& lyrs = m_auimgr.GetPane( m_Layers );
583 
584  wxSize bestz = m_Layers->GetBestSize();
585 
586  lyrs.MinSize( bestz );
587  lyrs.BestSize( bestz );
588  lyrs.FloatingSize( bestz );
589 
590  if( lyrs.IsDocked() )
591  m_auimgr.Update();
592  else
593  m_Layers->SetSize( bestz );
594 }
595 
596 
597 void PCB_EDIT_FRAME::OnQuit( wxCommandEvent& event )
598 {
599  Close( false );
600 }
601 
602 
603 void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
604 {
605  m_canvas->SetAbortRequest( true );
606 
607  if( GetScreen()->IsModify() )
608  {
609  wxString msg = wxString::Format( _(
610  "Save the changes in\n"
611  "'%s'\n"
612  "before closing?" ),
613  GetChars( GetBoard()->GetFileName() )
614  );
615 
616  int ii = DisplayExitDialog( this, msg );
617  switch( ii )
618  {
619  case wxID_CANCEL:
620  Event.Veto();
621  return;
622 
623  case wxID_NO:
624  break;
625 
626  case wxID_YES:
627  // save the board. if the board has no name,
628  // the ID_SAVE_BOARD_AS will actually made
629  Files_io_from_id( ID_SAVE_BOARD );
630  break;
631  }
632  }
633 
634  if( IsGalCanvasActive() )
635  {
636  // On Windows 7 / 32 bits, on OpenGL mode only, Pcbnew crashes
637  // when closing this frame if a footprint was selected, and the footprint editor called
638  // to edit this footprint, and when closing pcbnew if this footprint is still selected
639  // See https://bugs.launchpad.net/kicad/+bug/1655858
640  // I think this is certainly a OpenGL event fired after frame deletion, so this workaround
641  // avoid the crash (JPC)
642  GetGalCanvas()->SetEvtHandlerEnabled( false );
643  }
644 
645  GetGalCanvas()->StopDrawing();
646 
647  // Delete the auto save file if it exists.
648  wxFileName fn = GetBoard()->GetFileName();
649 
650  // Auto save file name is the normal file name prefixed with '_autosave'.
651  fn.SetName( GetAutoSaveFilePrefix() + fn.GetName() );
652 
653  // When the auto save feature does not have write access to the board file path, it falls
654  // back to a platform specific user temporary file path.
655  if( !fn.IsOk() || !fn.IsDirWritable() )
656  fn.SetPath( wxFileName::GetTempDir() );
657 
658  wxLogTrace( traceAutoSave, "Deleting auto save file <" + fn.GetFullPath() + ">" );
659 
660  // Remove the auto save file on a normal close of Pcbnew.
661  if( fn.FileExists() && !wxRemoveFile( fn.GetFullPath() ) )
662  {
663  wxString msg = wxString::Format( _(
664  "The auto save file '%s' could not be removed!" ),
665  GetChars( fn.GetFullPath() )
666  );
667 
668  wxMessageBox( msg, Pgm().App().GetAppName(), wxOK | wxICON_ERROR, this );
669  }
670 
671  // Delete board structs and undo/redo lists, to avoid crash on exit
672  // when deleting some structs (mainly in undo/redo lists) too late
673  Clear_Pcb( false );
674 
675  // do not show the window because ScreenPcb will be deleted and we do not
676  // want any paint event
677  Show( false );
678 
679  Destroy();
680 }
681 
682 
683 void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
684 {
685  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
686 
687  if( draw3DFrame )
688  {
689  // Raising the window does not show the window on Windows if iconized.
690  // This should work on any platform.
691  if( draw3DFrame->IsIconized() )
692  draw3DFrame->Iconize( false );
693 
694  draw3DFrame->Raise();
695 
696  // Raising the window does not set the focus on Linux. This should work on any platform.
697  if( wxWindow::FindFocus() != draw3DFrame )
698  draw3DFrame->SetFocus();
699 
700  return;
701  }
702 
703  draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) );
704  draw3DFrame->SetDefaultFileName( GetBoard()->GetFileName() );
705  draw3DFrame->Raise(); // Needed with some Window Managers
706  draw3DFrame->Show( true );
707 }
708 
709 
710 void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
711 {
712  if( !aEnable )
713  Compile_Ratsnest( NULL, true );
714 
716  COLORS_DESIGN_SETTINGS& cds = Settings().Colors();
717 
718  if( aEnable )
719  {
720  cds.SetLegacyMode( false );
721  GetGalCanvas()->GetGAL()->SetGridColor( cds.GetLayerColor( LAYER_GRID ) );
722  auto view = GetGalCanvas()->GetView();
723  view->GetPainter()->GetSettings()->ImportLegacyColors( &cds );
724  GetGalCanvas()->Refresh();
725  }
726 
727  enableGALSpecificMenus();
728 
729  // Force colors to be legacy-compatible in case they were changed in GAL
730  if( !aEnable )
731  {
732  cds.SetLegacyMode( true );
733  Refresh();
734  }
735 
736  // Re-create the layer manager to allow arbitrary colors when GAL is enabled
738 }
739 
740 
742 {
743  // some menus are active only in GAL mode and do nothing in legacy mode.
744  // So enable or disable them, depending on the display mode
745 
746  ReCreateMenuBar();
747 
748  if( GetMenuBar() )
749  {
750  // Enable / disable some menus which are usable only on GAL
751  pcbnew_ids id_list[] =
752  {
759  ID_MENU_PCB_FLIP_VIEW
760  };
761 
762  bool enbl = IsGalCanvasActive();
763 
764  for( unsigned ii = 0; ii < DIM( id_list ); ii++ )
765  {
766  if( GetMenuBar()->FindItem( id_list[ii] ) )
767  GetMenuBar()->FindItem( id_list[ii] )->Enable( enbl );
768  }
769 
770  // Update settings for GAL menus
771  auto view = GetGalCanvas()->GetView();
772  GetMenuBar()->FindItem( ID_MENU_PCB_FLIP_VIEW )->Check( view->IsMirroredX() );
773  }
774 }
775 
776 
777 void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event )
778 {
779  DIALOG_DESIGN_RULES dR_editor( this );
780  int returncode = dR_editor.ShowModal();
781 
782  if( returncode == wxID_OK ) // New rules, or others changes.
783  {
784  ReCreateLayerBox();
785  ReCreateAuxiliaryToolbar();
786  OnModify();
787  }
788 }
789 
790 
791 void PCB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
792 {
794 
795  wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
796 
797  m_configSettings.Load( aCfg );
798 
799  double dtmp;
800  aCfg->Read( PlotLineWidthEntry, &dtmp, 0.1 ); // stored in mm
801 
802  if( dtmp < 0.01 )
803  dtmp = 0.01;
804 
805  if( dtmp > 5.0 )
806  dtmp = 5.0;
807 
808  g_DrawDefaultLineThickness = Millimeter2iu( dtmp );
809 
810  aCfg->Read( ShowMicrowaveEntry, &m_show_microwave_tools );
811  aCfg->Read( ShowLayerManagerEntry, &m_show_layer_manager_tools );
812  aCfg->Read( ShowPageLimitsEntry, &m_showPageLimits );
813 }
814 
815 
816 void PCB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
817 {
818  m_configSettings.Save( aCfg );
819 
821 
822  wxConfigSaveSetups( aCfg, GetConfigurationSettings() );
823 
824  // This value is stored in mm )
825  aCfg->Write( PlotLineWidthEntry, MM_PER_IU * g_DrawDefaultLineThickness );
826  aCfg->Write( ShowMicrowaveEntry, (long) m_show_microwave_tools );
827  aCfg->Write( ShowLayerManagerEntry, (long)m_show_layer_manager_tools );
828  aCfg->Write( ShowPageLimitsEntry, m_showPageLimits );
829 }
830 
831 
833 {
834  return IsElementVisible( LAYER_GRID );
835 }
836 
837 
839 {
840  SetElementVisibility( LAYER_GRID, aVisible );
841 }
842 
843 
845 {
846  return Settings().Colors().GetItemColor( LAYER_GRID );
847 }
848 
849 
851 {
852 
853  Settings().Colors().SetItemColor( LAYER_GRID, aColor );
854 
855  if( IsGalCanvasActive() )
856  {
857  GetGalCanvas()->GetGAL()->SetGridColor( aColor );
858  }
859 }
860 
861 
863 {
864  int copperlayercnt = GetBoard()->GetCopperLayerCount( );
865  PCB_LAYER_ID currLayer = GetActiveLayer();
866 
867  if( !GetDesignSettings().m_MicroViasAllowed )
868  return false; // Obvious..
869 
870  if( copperlayercnt < 4 )
871  return false; // Only on multilayer boards..
872 
873  if( ( currLayer == B_Cu )
874  || ( currLayer == F_Cu )
875  || ( currLayer == copperlayercnt - 2 )
876  || ( currLayer == In1_Cu ) )
877  return true;
878 
879  return false;
880 }
881 
882 
884 {
886 
887  syncLayerWidgetLayer();
888 
889  if( IsGalCanvasActive() )
890  {
891  m_toolManager->RunAction( PCB_ACTIONS::layerChanged ); // notify other tools
892  GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere
893 
894  GetGalCanvas()->SetHighContrastLayer( aLayer );
895  GetGalCanvas()->Refresh();
896  }
897 }
898 
899 
901 {
902  m_Layers->SelectLayer( GetActiveLayer() );
903  m_Layers->OnLayerSelected();
904 }
905 
906 
908 {
909  m_Layers->SyncRenderStates();
910 }
911 
912 
914 {
915  m_Layers->SyncLayerVisibilities();
916  static_cast<PCB_DRAW_PANEL_GAL*>( GetGalCanvas() )->SyncLayersVisibility( m_Pcb );
917 }
918 
919 
921 {
922  PCB_BASE_FRAME::unitsChangeRefresh(); // Update the grid size select box.
923 
924  ReCreateAuxiliaryToolbar();
925 }
926 
927 
929 {
930  return GetBoard()->IsElementVisible( aElement );
931 }
932 
933 
934 void PCB_EDIT_FRAME::SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState )
935 {
936  GetGalCanvas()->GetView()->SetLayerVisible( aElement , aNewState );
937  GetBoard()->SetElementVisibility( aElement, aNewState );
938  m_Layers->SetRenderState( aElement, aNewState );
939 }
940 
941 
943 {
945 
947  m_Layers->SetRenderState( ii, true );
948 }
949 
950 
952 {
953  // call my base class
955 
956  m_Layers->SetLayersManagerTabsText();
957 
958  wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers );
959 
960  pane_info.Caption( _( "Visibles" ) );
961  m_auimgr.Update();
962  ReFillLayerWidget();
963 }
964 
965 
967 {
968  wxFileName absoluteFileName = m_lastNetListRead;
969  wxFileName pcbFileName = GetBoard()->GetFileName();
970 
971  if( !absoluteFileName.MakeAbsolute( pcbFileName.GetPath() ) || !absoluteFileName.FileExists() )
972  {
973  absoluteFileName.Clear();
974  m_lastNetListRead = wxEmptyString;
975  }
976 
977  return absoluteFileName.GetFullPath();
978 }
979 
980 
981 void PCB_EDIT_FRAME::SetLastNetListRead( const wxString& aLastNetListRead )
982 {
983  wxFileName relativeFileName = aLastNetListRead;
984  wxFileName pcbFileName = GetBoard()->GetFileName();
985 
986  if( relativeFileName.MakeRelativeTo( pcbFileName.GetPath() )
987  && relativeFileName.GetFullPath() != aLastNetListRead )
988  {
989  m_lastNetListRead = relativeFileName.GetFullPath();
990  }
991 }
992 
993 
995 {
997 
998  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
999 
1000  if( draw3DFrame )
1001  draw3DFrame->ReloadRequest();
1002 }
1003 
1004 
1005 void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event )
1006 {
1007  PCB_PLOT_PARAMS plot_prms = GetPlotSettings();
1008 
1009  // we don't want dialogs knowing about complex wxFrame functions so
1010  // pass everything the dialog needs without reference to *this frame's class.
1011  if( InvokeSVGPrint( this, GetBoard(), &plot_prms ) )
1012  {
1013  if( !plot_prms.IsSameAs( GetPlotSettings(), false ) )
1014  {
1015  // First, mark board as modified only for parameters saved in file
1016  if( !plot_prms.IsSameAs( GetPlotSettings(), true ) )
1017  OnModify();
1018 
1019  // Now, save any change, for the session
1020  SetPlotSettings( plot_prms );
1021  }
1022  }
1023 }
1024 
1025 
1027 {
1028  wxFileName fileName = GetBoard()->GetFileName();
1029  wxString fileinfo;
1030 
1031  if( fileName.IsOk() && fileName.FileExists() )
1032  {
1033  fileinfo = fileName.IsFileWritable()
1034  ? wxString( wxEmptyString )
1035  : _( " [Read Only]" );
1036  }
1037  else
1038  {
1039  fileinfo = _( " [new file]" );
1040  }
1041 
1042  wxString title;
1043  title.Printf( L"Pcbnew \u2014 %s%s",
1044  fileName.GetFullPath(),
1045  fileinfo );
1046 
1047  SetTitle( title );
1048 }
1049 
1050 
1052 {
1053  // Update the layer manager and other widgets from the board setup
1054  // (layer and items visibility, colors ...)
1055 
1056  // Rebuild list of nets (full ratsnest rebuild)
1057  Compile_Ratsnest( NULL, true );
1059 
1060  // Update info shown by the horizontal toolbars
1061  ReCreateLayerBox();
1062 
1063  // Update the layer manager
1064  m_Layers->Freeze();
1065  ReFillLayerWidget();
1066  m_Layers->ReFillRender();
1067 
1068  // upate the layer widget to match board visibility states, both layers and render columns.
1069  syncLayerVisibilities();
1070  syncLayerWidgetLayer();
1071  syncRenderStates();
1072 
1073  m_Layers->Thaw();
1074 }
1075 
1076 
1077 #if defined( KICAD_SCRIPTING_WXPYTHON )
1078 
1079 void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent )
1080 {
1081 
1082  wxWindow * pythonPanelFrame = findPythonConsole();
1083  bool pythonPanelShown = true;
1084 
1085  if( pythonPanelFrame == NULL )
1086  pythonPanelFrame = CreatePythonShellWindow( this, pythonConsoleNameId() );
1087  else
1088  pythonPanelShown = ! pythonPanelFrame->IsShown();
1089 
1090  if( pythonPanelFrame )
1091  pythonPanelFrame->Show( pythonPanelShown );
1092  else
1093  wxMessageBox( wxT( "Error: unable to create the Python Console" ) );
1094 }
1095 #endif
1096 
1097 
1098 void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent )
1099 {
1100  // Automatic placement of modules and tracks is a mutually exclusive operation so
1101  // clear the other tool if one of the two is selected.
1102  // Be careful: this event function is called both by the
1103  // ID_TOOLBARH_PCB_MODE_MODULE and the ID_TOOLBARH_PCB_MODE_TRACKS tool
1104  // Therefore we should avoid a race condition when deselecting one of these tools
1105  // inside this function (seems happen on some Linux/wxWidgets versions)
1106  // when the other tool is selected
1107 
1108  switch( aEvent.GetId() )
1109  {
1110  case ID_TOOLBARH_PCB_MODE_MODULE:
1111  if( aEvent.IsChecked() &&
1112  m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
1113  {
1114  m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_TRACKS, false );
1115  }
1116  break;
1117 
1118  case ID_TOOLBARH_PCB_MODE_TRACKS:
1119  if( aEvent.IsChecked() &&
1120  m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
1121  {
1122  m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_MODULE, false );
1123  }
1124  break;
1125  }
1126 }
1127 
1128 
1129 void PCB_EDIT_FRAME::OnLayerColorChange( wxCommandEvent& aEvent )
1130 {
1131  ReCreateLayerBox();
1132 }
1133 
1134 
1135 void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
1136 {
1137  // switches currently used canvas (default / Cairo / OpenGL).
1138  PCB_BASE_FRAME::SwitchCanvas( aEvent );
1139 
1140  // The base class method reinit the layers manager.
1141  // We must upate the layer widget to match board visibility states,
1142  // both layers and render columns.
1143  syncLayerVisibilities();
1144  syncLayerWidgetLayer();
1145  syncRenderStates();
1146 }
1147 
1148 void PCB_EDIT_FRAME::ToPlotter( wxCommandEvent& event )
1149 {
1150  DIALOG_PLOT dlg( this );
1151 
1152  dlg.ShowModal();
1153 }
1154 
1155 
1156 bool PCB_EDIT_FRAME::SetCurrentNetClass( const wxString& aNetClassName )
1157 {
1158  bool change = GetDesignSettings().SetCurrentNetClass( aNetClassName );
1159 
1160  if( change )
1161  {
1162  ReCreateAuxiliaryToolbar();
1163  }
1164 
1165  return change;
1166 }
1167 
1168 
1169 void PCB_EDIT_FRAME::OnConfigurePaths( wxCommandEvent& aEvent )
1170 {
1171  Pgm().ConfigurePaths( this );
1172 }
1173 
1174 
1175 void PCB_EDIT_FRAME::OnUpdatePCBFromSch( wxCommandEvent& event )
1176 {
1177  if( Kiface().IsSingle() )
1178  {
1179  DisplayError( this, _( "Cannot update the PCB, because Pcbnew is "
1180  "opened in stand-alone mode. In order to create or update "
1181  "PCBs from schematics, you need to launch the KiCad project manager "
1182  "and create a PCB project." ) );
1183  return;
1184  }
1185  else
1186  {
1187  KIWAY_PLAYER* frame = Kiway().Player( FRAME_SCH, true );
1188  wxFileName schfn( Prj().GetProjectPath(), Prj().GetProjectName(), SchematicFileExtension );
1189 
1190  if( !frame->IsVisible() )
1191  {
1192  frame->OpenProjectFiles( std::vector<wxString>( 1, schfn.GetFullPath() ) );
1193  frame->Show( false );
1194  }
1195 
1197  }
1198 }
1199 
1200 
1201 void PCB_EDIT_FRAME::OnFlipPcbView( wxCommandEvent& evt )
1202 {
1203  auto view = GetGalCanvas()->GetView();
1204  view->SetMirror( evt.IsChecked(), false );
1205  view->RecacheAllItems();
1206  Refresh();
1207 }
1208 
1209 
1211 {
1212  // Reload Python plugins if they are newer than
1213  // the already loaded, and load new plugins
1214 #if defined(KICAD_SCRIPTING)
1215  //Reload plugin list: reload Python plugins if they are newer than
1216  // the already loaded, and load new plugins
1218 
1219  #if defined(KICAD_SCRIPTING_ACTION_MENU)
1220  // Action plugins can be modified, therefore the plugins menu
1221  // must be updated:
1222  RebuildActionPluginMenus();
1223  #endif
1224 #endif
1225 }
1226 
1227 
1229 {
1230  DIALOG_EXCHANGE_MODULE dialog( this, Module );
1231 
1232  return dialog.ShowQuasiModal();
1233 }
void SetWorksheet(KIGFX::WORKSHEET_VIEWITEM *aWorksheet)
Function SetWorksheet Sets (or updates) worksheet used by the draw panel.
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.
EDA_PANEINFO & HorizontalToolbarPane()
Function HorizontalToolbarPane Change *this to a horizontal toolbar for KiCad.
Definition: wxstruct.h:487
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
Definition: pcbframe.cpp:816
void syncRenderStates()
Function syncRenderStates updates the "Render" checkboxes in the layer widget according to current to...
Definition: pcbframe.cpp:907
void UpdateTitle()
Function UpdateTitle sets the main window title bar text.
Definition: pcbframe.cpp:1026
#define DIM(x)
of elements in an array
Definition: macros.h:98
virtual void SwitchCanvas(wxCommandEvent &aEvent)
switches currently used canvas (default / Cairo / OpenGL).
#define KICAD_DEFAULT_DRAWFRAME_STYLE
Definition: wxstruct.h:55
virtual void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
Definition: pcbframe.cpp:994
void SetPageSettings(const PAGE_INFO &aPageSettings) override
>
Definition: pcbframe.cpp:523
Definition of class FOOTPRINT_EDIT_FRAME.
Class KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a porti...
Definition: kiway_player.h:111
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
Definition: pcbframe.cpp:934
Class that draws missing connections on a PCB.
virtual void unitsChangeRefresh() override
Function unitsChangeRefresh is called when when the units setting has changed to allow for any derive...
void syncLayerWidgetLayer()
Function syncLayerWidgetLayer updates the currently layer "selection" within the PCB_LAYER_WIDGET.
Definition: pcbframe.cpp:900
void SetElementVisibility(GAL_LAYER_ID aLayer, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
void OnConfigurePaths(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1169
virtual void unitsChangeRefresh() override
Function unitsChangeRefresh is called when when the units setting has changed to allow for any derive...
Definition: pcbframe.cpp:920
int InstallExchangeModuleFrame(MODULE *ExchangeModuleModule)
Definition: pcbframe.cpp:1228
void UseGalCanvas(bool aEnable) override
>
Definition: pcbframe.cpp:710
void ToPlotter(wxCommandEvent &event)
Function ToPlotter Open a dialog frame to create plot and drill files relative to the current board...
Definition: pcbframe.cpp:1148
This file is part of the common library.
VTBL_ENTRY const wxString & GetExecutablePath() const
Definition: pgm_base.h:173
void SetLastNetListRead(const wxString &aNetListFile)
Set the last net list successfully read by the net list dialog box.
Definition: pcbframe.cpp:981
Class PCB_LAYER_WIDGET is here to implement the abstract functions of LAYER_WIDGET so they may be tie...
static const wxString ShowPageLimitsEntry
Definition: pcbframe.cpp:95
VIEW_CONTROLS class definition.
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
Definition: pcbframe.cpp:791
PROJECT & Prj()
Definition: kicad.cpp:270
void SVG_Print(wxCommandEvent &event)
Function SVG_Print shows the print SVG file dialog.
Definition: pcbframe.cpp:1005
Class BOARD to handle a board.
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::Process_Special_Functions EVT_UPDATE_UI(ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode) EVT_UPDATE_UI(ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
static const wxString MagneticTracksEntry
Definition: pcbframe.cpp:92
int GetCopperLayerCount() const
Function GetCopperLayerCount.
void OnLayerColorChange(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1129
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
The common library.
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
void SetVisibleAlls()
Function SetVisibleAlls changes the bit-mask of visible element categories and layers.
static const wxString MagneticPadsEntry
Definition: pcbframe.cpp:91
virtual void SetGridColor(COLOR4D aColor) override
Function SetGridColor() , virtual.
Definition: pcbframe.cpp:850
EVT_MENU_RANGE(ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, PCB_EDIT_FRAME::Process_Config) EVT_MENU(ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES
This is the end of the layers used for visibility bitmasks in Pcbnew There can be at most 32 layers a...
void syncLayerVisibilities()
Function syncLayerVisibilities updates each "Layer" checkbox in the layer widget according to each la...
Definition: pcbframe.cpp:913
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::OnUpdateShowLayerManager PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth PCB_EDIT_FRAME::OnUpdateSelectTrackWidth EVT_UPDATE_UI_RANGE(ID_POPUP_PCB_SELECT_VIASIZE1, ID_POPUP_PCB_SELECT_VIASIZE8, PCB_EDIT_FRAME::OnUpdateSelectViaSize) EVT_UPDATE_UI_RANGE(ID_PCB_HIGHLIGHT_BUTT
void OnCloseWindow(wxCloseEvent &Event) override
Definition: pcbframe.cpp:603
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
Definition: draw_frame.h:54
EDA_PANEINFO & LayersToolbarPane()
Function LayersToolbarPane Change *this to a layers toolbar for KiCad.
Definition: wxstruct.h:539
bool SetCurrentNetClass(const wxString &aNetClassName)
Function SetCurrentNetClass Must be called after a netclass selection (or after a netclass parameter ...
Definition: pcbframe.cpp:1156
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE...
Definition: pcbframe.cpp:942
PCB_EDIT_FRAME::OnResetModuleTextSizes EVT_TOOL(ID_TB_OPTIONS_DRC_OFF, PCB_EDIT_FRAME::OnSelectOptionToolbar) EVT_TOOL(ID_TB_OPTIONS_SHOW_RATSNEST
Specialization of the wxAuiPaneInfo class for KiCad panels.
Definition: wxstruct.h:478
virtual bool IsGridVisible() const override
Function IsGridVisible() , virtual.
Definition: pcbframe.cpp:832
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::OnUpdateShowLayerManager PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth ID_POPUP_PCB_SELECT_WIDTH8
Definition: pcbframe.cpp:307
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
Functions relatives to tracks, vias and segments used to fill zones.
VTBL_ENTRY bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList...
Definition: kiway_player.h:170
Pcbnew hotkeys.
static const wxString PlotLineWidthEntry
Definition: pcbframe.cpp:90
void UseGalCanvas(bool aEnable) override
>
This file contains miscellaneous commonly used macros and functions.
virtual bool isAutoSaveRequired() const override
Function isautoSaveRequired returns true if the board has been modified.
Definition: pcbframe.cpp:551
bool InvokeSVGPrint(wxTopLevelWindow *aCaller, BOARD *aBoard, PCB_PLOT_PARAMS *aSettings)
Function InvokeSVGPrint shows the SVG print dialog.
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config EDA_BASE_FRAME::OnSelectPreferredEditor EVT_COMBOBOX(ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, GERBVIEW_FRAME::OnSelectActiveLayer) EVT_MENU_RANGE(ID_POPUP_GENERAL_START_RANGE
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hokeys_Descr[]
VTBL_ENTRY void ConfigurePaths(wxWindow *aParent=NULL)
Function ConfigurePaths.
Definition: pgm_base.cpp:905
Class that handles properties and drawing of worksheet layout.
Class TOOL_MANAGER.
Definition: tool_manager.h:49
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
EDA_PANEINFO & VerticalToolbarPane()
Function VerticalToolbarPane Change *this to a vertical toolbar for KiCad.
Definition: wxstruct.h:505
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
Definition: pcbframe.cpp:928
static const wxString ShowLayerManagerEntry
Definition: pcbframe.cpp:94
PCB_LAYER_ID
A quick note on layer IDs:
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, KIWAY_PLAYER *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:302
void SetSheetName(const std::string &aSheetName)
Function SetSheetName() Sets the sheet name displayed in the title block.
BOARD_ITEM_CONTAINER * GetModel() const override
>
Definition: pcbframe.cpp:517
void OnSelectOptionToolbar(wxCommandEvent &event)
Definition: tool_pcb.cpp:732
void Refresh()
Update the board display after modifying it bu a python script (note: it is automatically called by a...
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, wxWindow *aFrame)
Sets the work environment (model, view, view controls and the parent window).
const wxString & GetFileName() const
Definition: class_board.h:234
int ShowQuasiModal()
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool EVT_TOOL_RANGE(ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_END_CMD, PCB_EDIT_FRAME::ProcessMuWaveFunctions) EVT_MENU_RANGE(ID_POPUP_PCB_START_RANGE
EVT_MENU(ID_SELECT_PREFERED_PDF_BROWSER_NAME, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser) EVT_MENU_RANGE(ID_LANGUAGE_CHOICE
virtual ~PCB_EDIT_FRAME()
Definition: pcbframe.cpp:497
The common library.
Helper dialog and control classes.
void ShowChangedLanguage() override
Function ShowChangedLanguage redraws the menus and what not in current language.
Definition: pcbframe.cpp:951
virtual COLOR4D GetGridColor() override
Function GetGridColor() , virtual.
Definition: pcbframe.cpp:844
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:257
void SetSheetNumber(int aSheetNumber)
Function SetSheetNumber() Changes the sheet number displayed in the title block.
virtual void SwitchCanvas(wxCommandEvent &aEvent) override
switches currently used canvas (default / Cairo / OpenGL).
Definition: pcbframe.cpp:1135
void BuildConnectivity()
Builds or rebuilds the board connectivity database for the board, especially the list of connected it...
void OnQuit(wxCommandEvent &event)
Definition: pcbframe.cpp:597
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility, colors ...)
Definition: pcbframe.cpp:1051
int g_DrawDefaultLineThickness
Default line thickness in internal units used to draw or plot items using a default thickness line va...
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
Function SetActiveLayer will change the currently active layer to aLayer.
static const wxString ShowMicrowaveEntry
Definition: pcbframe.cpp:93
ID_POPUP_GRID_USER
Definition: draw_frame.cpp:108
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::Process_Special_Functions PCB_EDIT_FRAME::OnUpdateShowLayerManager PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth PCB_EDIT_FRAME::OnUpdateSelectTrackWidth PCB_EDIT_FRAME::OnUpdateVerticalToolbar ID_PCB_MUWAVE_END_CMD
Definition: pcbframe.cpp:315
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
void Show3D_Frame(wxCommandEvent &event) override
Function Show3D_Frame displays the 3D view of current printed circuit board.
Definition: pcbframe.cpp:683
bool IsSameAs(const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms) const
Compare current settings to aPcbPlotParams, including not saved parameters in brd file...
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:547
void ShowDesignRulesEditor(wxCommandEvent &event)
Function ShowDesignRulesEditor displays the Design Rules Editor.
Definition: pcbframe.cpp:777
Class TOOL_DISPATCHER.
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY
Definition: pcbframe.cpp:253
Class DIALOG_PLOT is the dialog to set the plot options, and create plot files in various formats...
Definition: dialog_plot.h:37
void OnSelectAutoPlaceMode(wxCommandEvent &aEvent)
Definition: pcbframe.cpp:1098
BOARD * GetBoard()
ID_PREFERENCES_HOTKEY_END
void enableGALSpecificMenus()
an helper function to enable some menus only active when the display is switched to GAL mode and whic...
Definition: pcbframe.cpp:741
void PythonPluginsReloadBase()
Helper function PythonPluginsReloadBase Reload Python plugins if they are newer than the already load...
Definition: pcbnew.cpp:289
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
Class LAYER_WIDGET is abstract and is used to manage a list of layers, with the notion of a "current"...
Definition: layer_widget.h:77
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Function IsElementVisible tests whether a given element category is visible.
wxString GetLastNetListRead()
Get the last net list read with the net list dialog box.
Definition: pcbframe.cpp:966
static TOOL_ACTION layerChanged
Definition: pcb_actions.h:270
EDA_PANEINFO & MessageToolbarPane()
Function MessageToolbarPane Change *this to a message pane for KiCad.
Definition: wxstruct.h:524
int DisplayExitDialog(wxWindow *parent, const wxString &aMessage)
Function DisplayExitDialog displays a dialog with 3 buttons: Save and Exit Cancel Exit without save...
Definition: confirm.cpp:61
Class PCB_ACTIONS.
Definition: pcb_actions.h:42
void OnUpdatePCBFromSch(wxCommandEvent &event)
Definition: pcbframe.cpp:1175
void wxConfigSaveSetups(wxConfigBase *aCfg, const PARAM_CFG_ARRAY &aList)
Function wxConfigSaveSetups writes aList of PARAM_CFG_ARRAY elements to save configuration values to ...
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
see class PGM_BASE
void SetBoard(BOARD *aBoard) override
>
Definition: pcbframe.cpp:503
Declaration of the eda_3d_viewer class.
Common, abstract interface for edit frames.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool ID_POPUP_PCB_END_RANGE
Definition: pcbframe.cpp:268
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:838
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
pcbnew_ids
Definition: pcbnew_id.h:16
void LoadSettings(wxConfigBase *aCfg) override
Function LoadSettings loads common frame parameters from a configuration file.
VTBL_ENTRY void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, const std::string &aPayload, wxWindow *aSource=NULL)
Function ExpressMail send aPayload to aDestination from aSource.
Definition: kiway.cpp:387
Class DRC is the Design Rule Checker, and performs all the DRC tests.
Definition: drc_stuff.h:158
virtual void SetBoard(BOARD *aBoard) override
>
void SetSheetCount(int aSheetCount)
Function SetSheetCount() Changes the sheets count number displayed in the title block.
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
Definition: wxstruct.h:117
COLOR4D GetLayerColor(LAYER_NUM aLayer) const
Function GetLayerColor.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings) override
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
Definition: id.h:96
void SetLegacyMode(bool aMode)
Enables or disables legacy color mode.
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectTool PCB_EDIT_FRAME::Process_Special_Functions ID_POPUP_GENERAL_END_RANGE
Definition: pcbframe.cpp:278
bool IsMicroViaAcceptable(void)
Function IsMicroViaAcceptable return true if a microvia can be placed on the board.
Definition: pcbframe.cpp:862
Class EDA_3D_VIEWER Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard...
Definition: eda_3d_viewer.h:50
Module description (excepted pads)
Abstract interface for BOARD_ITEMs capable of storing other items inside.
void ReFillLayerWidget()
Function ReFillLayerWidget changes out all the layers in m_Layers and may be called upon loading a ne...
Definition: pcbframe.cpp:578
#define PCB_EDIT_FRAME_NAME
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
Definition: wxPcbStruct.h:78
Message panel definition file.
void SetDefaultFileName(const wxString &aFn)
Function SetDefaultFileName Set the default file name (eg: to be suggested to a screenshot) ...
Definition: eda_3d_viewer.h:93
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:1210
void wxConfigLoadSetups(wxConfigBase *aCfg, const PARAM_CFG_ARRAY &aList)
Function wxConfigLoadSetups uses aList of PARAM_CFG_ARRAY elements to load configuration values from ...
void OnFlipPcbView(wxCommandEvent &event)
Definition: pcbframe.cpp:1201
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
virtual void ShowChangedLanguage()
Function ShowChangedLanguage redraws the menus and what not in current language.
Definition: basicframe.cpp:261
virtual void SetActiveLayer(PCB_LAYER_ID aLayer) override
Function SetActiveLayer will change the currently active layer to aLayer and also update the PCB_LAYE...
Definition: pcbframe.cpp:883
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:290
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
const wxString SchematicFileExtension
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar ID_PCB_MEASUREMENT_TOOL
Definition: pcbframe.cpp:262
void ReloadRequest()
Request reloading the 3D view.
void setupTools()
Definition: pcbframe.cpp:560
KIWAY Kiway
const wxChar traceAutoSave[]
Flag to enable auto save feature debug tracing.
Definition: basicframe.cpp:53
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39