KiCad PCB EDA Suite
menubar_pcb_editor.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) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
7  * Copyright (C) 1992-2021 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 
27 #include <advanced_config.h>
28 #include <bitmaps.h>
29 #include <filehistory.h>
30 #include <kiface_i.h>
31 #include <menus_helpers.h>
32 #include <pcb_edit_frame.h>
33 #include <pcbnew_id.h>
34 #include <pgm_base.h>
35 #include <tool/actions.h>
36 #include <tool/tool_manager.h>
37 #include <tools/pcb_actions.h>
39 #include <widgets/wx_menubar.h>
40 
41 
43 {
45  // wxWidgets handles the Mac Application menu behind the scenes, but that means
46  // we always have to start from scratch with a new wxMenuBar.
47  wxMenuBar* oldMenuBar = GetMenuBar();
48  WX_MENUBAR* menuBar = new WX_MENUBAR();
49 
50  // Recreate all menus:
51 
52  //-- File menu -----------------------------------------------------------
53  //
54  ACTION_MENU* fileMenu = new ACTION_MENU( false, selTool );
55  static ACTION_MENU* openRecentMenu;
56 
57  if( Kiface().IsSingle() ) // not when under a project mgr
58  {
59  FILE_HISTORY& fileHistory = GetFileHistory();
60 
61  // Create the menu if it does not exist. Adding a file to/from the history
62  // will automatically refresh the menu.
63  if( !openRecentMenu )
64  {
65  openRecentMenu = new ACTION_MENU( false, selTool );
66  openRecentMenu->SetTitle( _( "Open Recent" ) );
67  openRecentMenu->SetIcon( BITMAPS::recent );
68 
69  fileHistory.UseMenu( openRecentMenu );
70  fileHistory.AddFilesToMenu();
71  }
72 
73  fileMenu->Add( ACTIONS::doNew );
74  fileMenu->Add( ACTIONS::open );
75 
76  wxMenuItem* item = fileMenu->Add( openRecentMenu );
77 
78  // Add the file menu condition here since it needs the item ID for the submenu
79  ACTION_CONDITIONS cond;
80  cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
81  RegisterUIUpdateHandler( item->GetId(), cond );
82 
83  fileMenu->Add( PCB_ACTIONS::appendBoard );
84  fileMenu->AppendSeparator();
85  }
86 
87  fileMenu->Add( ACTIONS::save );
88 
89  // Save as menu:
90  // under a project mgr we do not want to modify the board filename
91  // to keep consistency with the project mgr which expects files names same as prj name
92  // for main files
93  if( Kiface().IsSingle() )
94  fileMenu->Add( ACTIONS::saveAs );
95  else
96  fileMenu->Add( ACTIONS::saveCopyAs );
97 
98  fileMenu->AppendSeparator();
99  fileMenu->Add( _( "Resc&ue" ),
100  _( "Clear board and get last rescue file automatically saved by PCB editor" ),
102  BITMAPS::rescue );
103 
104  // Import submenu
105  ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
106  submenuImport->SetTitle( _( "Import" ) );
107  submenuImport->SetIcon( BITMAPS::import );
108 
109  submenuImport->Add( PCB_ACTIONS::importNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
110  submenuImport->Add( PCB_ACTIONS::importSpecctraSession, ACTION_MENU::NORMAL, _( "Specctra Session..." ) );
111  submenuImport->Add( PCB_ACTIONS::placeImportedGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
112 
113  if( Kiface().IsSingle() )
114  {
115  submenuImport->Add( _( "Non-KiCad Board File..." ),
116  _( "Import board file from other applications" ),
118  }
119 
120  fileMenu->AppendSeparator();
121  fileMenu->Add( submenuImport );
122 
123  // Export submenu
124  ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
125  submenuExport->SetTitle( _( "Export" ) );
126  submenuExport->SetIcon( BITMAPS::export_file );
127 
128  submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN, ACTION_MENU::NORMAL, _( "Specctra DSN..." ) );
129  submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
131  submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
133  submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
135  submenuExport->Add( _( "STEP..." ), _( "Export STEP 3D board representation" ),
137  submenuExport->Add( _( "SVG..." ), _( "Export SVG board representation" ),
139  submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
140  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
142  submenuExport->Add( _( "Hyperlynx..." ), "",
144 
145  if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
146  submenuExport->Add( *m_exportNetlistAction );
147 
148  submenuExport->AppendSeparator();
149  submenuExport->Add( _( "Footprints to Library..." ),
150  _( "Add footprints used on board to an existing footprint library\n"
151  "(does not remove other footprints from this library)" ),
153 
154  submenuExport->Add( _( "Footprints to New Library..." ),
155  _( "Create a new footprint library containing the footprints used on board\n"
156  "(if the library already exists it will be replaced)" ),
158 
159  fileMenu->Add( submenuExport );
160 
161  // Fabrication Outputs submenu
162  ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false, selTool );
163  submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
164  submenuFabOutputs->SetIcon( BITMAPS::fabrication );
165 
166  submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
167  submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
168  submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
169  submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
170  submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
171  submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
172  fileMenu->Add( submenuFabOutputs );
173 
174  fileMenu->AppendSeparator();
175  fileMenu->Add( PCB_ACTIONS::boardSetup );
176 
177  fileMenu->AppendSeparator();
178  fileMenu->Add( ACTIONS::pageSettings );
179  fileMenu->Add( ACTIONS::print );
180  fileMenu->Add( ACTIONS::plot );
181 
182  fileMenu->AppendSeparator();
183  fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
184 
185  //-- Edit menu -----------------------------------------------------------
186  //
187  ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
188 
189  editMenu->Add( ACTIONS::undo );
190  editMenu->Add( ACTIONS::redo );
191 
192  editMenu->AppendSeparator();
193  editMenu->Add( ACTIONS::cut );
194  editMenu->Add( ACTIONS::copy );
195  editMenu->Add( ACTIONS::paste );
196  editMenu->Add( ACTIONS::doDelete );
197 
198  editMenu->AppendSeparator();
199  editMenu->Add( ACTIONS::selectAll );
200 
201  editMenu->AppendSeparator();
202  editMenu->Add( ACTIONS::find );
203 
204  editMenu->AppendSeparator();
205  editMenu->Add( PCB_ACTIONS::editTracksAndVias );
207  editMenu->Add( PCB_ACTIONS::changeFootprints );
208  editMenu->Add( PCB_ACTIONS::swapLayers );
209 
210  editMenu->AppendSeparator();
211  editMenu->Add( PCB_ACTIONS::zoneFillAll );
212  editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
213 
214  editMenu->AppendSeparator();
215  editMenu->Add( ACTIONS::deleteTool );
216  editMenu->Add( PCB_ACTIONS::globalDeletions );
217 
218 
219  //----- View menu -----------------------------------------------------------
220  //
221  ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
222 
224  viewMenu->Add( ACTIONS::showFootprintBrowser );
225  viewMenu->Add( ACTIONS::show3DViewer );
226 
227  viewMenu->AppendSeparator();
228  viewMenu->Add( ACTIONS::zoomInCenter );
229  viewMenu->Add( ACTIONS::zoomOutCenter );
230  viewMenu->Add( ACTIONS::zoomFitScreen );
231  viewMenu->Add( ACTIONS::zoomFitObjects );
232  viewMenu->Add( ACTIONS::zoomTool );
233  viewMenu->Add( ACTIONS::zoomRedraw );
234 
235  viewMenu->AppendSeparator();
237  viewMenu->Add( ACTIONS::gridProperties );
239 
240  // Units submenu
241  ACTION_MENU* unitsSubMenu = new ACTION_MENU( false, selTool );
242  unitsSubMenu->SetTitle( _( "&Units" ) );
243  unitsSubMenu->SetIcon( BITMAPS::unit_mm );
244  unitsSubMenu->Add( ACTIONS::inchesUnits, ACTION_MENU::CHECK );
245  unitsSubMenu->Add( ACTIONS::milsUnits, ACTION_MENU::CHECK );
247  viewMenu->Add( unitsSubMenu );
248 
250 
251  viewMenu->AppendSeparator();
254 
255  viewMenu->AppendSeparator();
256  // Drawing Mode Submenu
257  ACTION_MENU* drawingModeSubMenu = new ACTION_MENU( false, selTool );
258  drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
259  drawingModeSubMenu->SetIcon( BITMAPS::add_zone );
260 
261  drawingModeSubMenu->Add( PCB_ACTIONS::zoneDisplayEnable, ACTION_MENU::CHECK );
264 
265  drawingModeSubMenu->AppendSeparator();
266  drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
267  drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
268  drawingModeSubMenu->Add( PCB_ACTIONS::trackDisplayMode, ACTION_MENU::CHECK );
269 
270  drawingModeSubMenu->AppendSeparator();
271  drawingModeSubMenu->Add( PCB_ACTIONS::graphicsOutlines, ACTION_MENU::CHECK );
272  drawingModeSubMenu->Add( PCB_ACTIONS::textOutlines, ACTION_MENU::CHECK );
273 
274  viewMenu->Add( drawingModeSubMenu );
275 
276  // Contrast Mode Submenu
277  ACTION_MENU* contrastModeSubMenu = new ACTION_MENU( false, selTool );
278  contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
279  contrastModeSubMenu->SetIcon( BITMAPS::contrast_mode );
280 
281  contrastModeSubMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
282  contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaDec );
283  contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
284  viewMenu->Add( contrastModeSubMenu );
285 
287 
288 #ifdef __APPLE__
289  viewMenu->AppendSeparator();
290 #endif
291 
292  //-- Place Menu ----------------------------------------------------------
293  //
294  ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
295 
296  placeMenu->Add( PCB_ACTIONS::placeFootprint );
297  placeMenu->Add( PCB_ACTIONS::drawVia );
298  placeMenu->Add( PCB_ACTIONS::drawZone );
299  placeMenu->Add( PCB_ACTIONS::drawRuleArea );
300  placeMenu->Add( PCB_ACTIONS::placeText );
301  placeMenu->Add( PCB_ACTIONS::drawLine );
302  placeMenu->Add( PCB_ACTIONS::drawArc );
303  placeMenu->Add( PCB_ACTIONS::drawRectangle );
304  placeMenu->Add( PCB_ACTIONS::drawCircle );
305  placeMenu->Add( PCB_ACTIONS::drawPolygon );
306 
307  placeMenu->AppendSeparator();
311  placeMenu->Add( PCB_ACTIONS::drawLeader );
312 
313  placeMenu->AppendSeparator();
315  placeMenu->Add( PCB_ACTIONS::placeStackup );
316  placeMenu->Add( PCB_ACTIONS::placeTarget );
317 
318  placeMenu->AppendSeparator();
319  placeMenu->Add( PCB_ACTIONS::drillOrigin );
320  placeMenu->Add( ACTIONS::gridSetOrigin );
321 
322  placeMenu->AppendSeparator();
323 
324  ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
325  autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
326  autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
327 
328  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceOffboardComponents );
329  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceSelectedComponents );
330 
331  placeMenu->Add( autoplaceSubmenu );
332 
333 
334  //-- Route Menu ----------------------------------------------------------
335  //
336  ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
337 
338  routeMenu->Add( PCB_ACTIONS::selectLayerPair );
339 
340  routeMenu->AppendSeparator();
341  routeMenu->Add( PCB_ACTIONS::routeSingleTrack );
342  routeMenu->Add( PCB_ACTIONS::routeDiffPair );
343 
344  routeMenu->AppendSeparator();
346  routeMenu->Add( PCB_ACTIONS::routerTuneDiffPair );
348 
349  routeMenu->AppendSeparator();
351 
352 
353  //-- Inspect Menu --------------------------------------------------------
354  //
355  ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
356 
357  inspectMenu->Add( PCB_ACTIONS::listNets );
358  inspectMenu->Add( PCB_ACTIONS::boardStatistics );
359  inspectMenu->Add( ACTIONS::measureTool );
360 
361  inspectMenu->AppendSeparator();
362  inspectMenu->Add( PCB_ACTIONS::runDRC );
363  inspectMenu->Add( ACTIONS::prevMarker );
364  inspectMenu->Add( ACTIONS::nextMarker );
365  inspectMenu->Add( ACTIONS::excludeMarker );
366 
367  inspectMenu->AppendSeparator();
368  inspectMenu->Add( PCB_ACTIONS::inspectClearance );
369  inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
370 
371 
372  //-- Tools menu ----------------------------------------------------------
373  //
374  ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
375 
376  wxMenuItem* update = toolsMenu->Add( ACTIONS::updatePcbFromSchematic );
377  update->Enable( !Kiface().IsSingle() );
378 
379  toolsMenu->Add( PCB_ACTIONS::showEeschema );
380 
381  toolsMenu->AppendSeparator();
382  toolsMenu->Add( ACTIONS::showFootprintEditor );
383  toolsMenu->Add( PCB_ACTIONS::updateFootprints );
384 
385  toolsMenu->AppendSeparator();
387  toolsMenu->Add( PCB_ACTIONS::removeUnusedPads );
388  toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
389  toolsMenu->Add( PCB_ACTIONS::repairBoard );
390 
391  toolsMenu->AppendSeparator();
392  toolsMenu->Add( PCB_ACTIONS::boardReannotate );
393  update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
394  update->Enable( !Kiface().IsSingle() );
395 
396 
397 #if defined(KICAD_SCRIPTING_WXPYTHON)
398  toolsMenu->AppendSeparator();
399  toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
400 #endif
401 
402 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
403  ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
404  submenuActionPlugins->SetTitle( _( "External Plugins" ) );
405  submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
406 
407  submenuActionPlugins->Add( _( "Refresh Plugins" ),
408  _( "Reload all python plugins and refresh plugin menus" ),
410  BITMAPS::reload );
411 #ifdef __APPLE__
412  submenuActionPlugins->Add( _( "Reveal Plugin Folder in Finder" ),
413  _( "Reveals the plugins folder in a Finder window" ),
416 #else
417  submenuActionPlugins->Add( _( "Open Plugin Directory" ),
418  _( "Opens the directory in the default system file manager" ),
421 #endif
422  // Populate the Action Plugin sub-menu: Must be done before Add
423  // Since the object is cloned by Add
424  submenuActionPlugins->AppendSeparator();
425  buildActionPluginMenus( submenuActionPlugins );
426 
427  toolsMenu->AppendSeparator();
428  toolsMenu->Add( submenuActionPlugins );
429 #endif
430 
431 
432  //-- Preferences menu ----------------------------------------------------
433  //
434  ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
435 
436  prefsMenu->Add( ACTIONS::configurePaths );
437  prefsMenu->Add( ACTIONS::showFootprintLibTable );
438 
439  prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
440  _( "Show preferences for all open tools" ),
441  wxID_PREFERENCES,
443 
444  prefsMenu->AppendSeparator();
445  AddMenuLanguageList( prefsMenu, selTool );
446 
447 
448  //--MenuBar -----------------------------------------------------------
449  //
450  menuBar->Append( fileMenu, _( "&File" ) );
451  menuBar->Append( editMenu, _( "&Edit" ) );
452  menuBar->Append( viewMenu, _( "&View" ) );
453  menuBar->Append( placeMenu, _( "&Place" ) );
454  menuBar->Append( routeMenu, _( "Ro&ute" ) );
455  menuBar->Append( inspectMenu, _( "&Inspect" ) );
456  menuBar->Append( toolsMenu, _( "&Tools" ) );
457  menuBar->Append( prefsMenu, _( "P&references" ) );
458  AddStandardHelpMenu( menuBar );
459 
460  SetMenuBar( menuBar );
461  delete oldMenuBar;
462 
463 }
void AddFilesToMenu() override
Add the files to all registered menus.
Definition: filehistory.h:98
static TOOL_ACTION drawLine
Definition: pcb_actions.h:146
static TOOL_ACTION show3DViewer
Definition: actions.h:161
static TOOL_ACTION drawCenterDimension
Definition: pcb_actions.h:153
static TOOL_ACTION placeImportedGraphics
Definition: pcb_actions.h:165
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
static TOOL_ACTION globalDeletions
Definition: pcb_actions.h:321
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:133
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:336
static TOOL_ACTION zoomInCenter
Definition: actions.h:96
static TOOL_ACTION pageSettings
Definition: actions.h:59
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:468
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:436
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:47
static TOOL_ACTION doDelete
Definition: actions.h:75
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:309
static TOOL_ACTION drawArc
Definition: pcb_actions.h:150
void SetIcon(BITMAPS aIcon)
Assign an icon for the entry.
Definition: action_menu.cpp:72
static TOOL_ACTION ratsnestLineMode
Definition: pcb_actions.h:245
static TOOL_ACTION cleanupGraphics
Definition: pcb_actions.h:323
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:469
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:292
static TOOL_ACTION zoomTool
Definition: actions.h:102
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:440
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:251
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:291
static TOOL_ACTION routerTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:194
static TOOL_ACTION drawAlignedDimension
Definition: pcb_actions.h:152
static TOOL_ACTION nextMarker
Definition: actions.h:89
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:250
static TOOL_ACTION drawOrthogonalDimension
Definition: pcb_actions.h:154
static TOOL_ACTION zoomFitScreen
Definition: actions.h:99
static TOOL_ACTION millimetersUnits
Definition: actions.h:149
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:147
virtual void RegisterUIUpdateHandler(int aID, const ACTION_CONDITIONS &aConditions) override
Register a UI update handler for the control with ID aID.
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:348
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:347
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:166
static constexpr bool NORMAL
Definition: action_menu.h:181
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:328
static TOOL_ACTION zoomFitObjects
Definition: actions.h:100
static TOOL_ACTION print
Definition: actions.h:60
static TOOL_ACTION excludeMarker
Definition: actions.h:90
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition: wx_menubar.h:45
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:42
static TOOL_ACTION find
Definition: actions.h:79
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:327
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:319
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:339
static TOOL_ACTION placeText
Definition: pcb_actions.h:151
static TOOL_ACTION zoomOutCenter
Definition: actions.h:97
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:340
static TOOL_ACTION saveCopyAs
Definition: actions.h:56
static TOOL_ACTION routerTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:197
static TOOL_ACTION inspectConstraints
Definition: pcb_actions.h:444
ACTION_CONDITIONS & Enable(const SELECTION_CONDITION &aCondition)
static TOOL_ACTION cleanupTracksAndVias
Definition: pcb_actions.h:322
static TOOL_ACTION measureTool
Definition: actions.h:157
static TOOL_ACTION copy
Definition: actions.h:70
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:438
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:202
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:167
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:177
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:331
static TOOL_ACTION toggleGrid
Definition: actions.h:143
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:164
static TOOL_ACTION inchesUnits
Definition: actions.h:147
static TOOL_ACTION boardReannotate
Definition: pcb_actions.h:441
static TOOL_ACTION save
Definition: actions.h:54
static TOOL_ACTION doNew
Definition: actions.h:47
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
void AddStandardHelpMenu(wxMenuBar *aMenuBar)
Adds the standard KiCad help menu to the menubar.
static TOOL_ACTION togglePolarCoords
Definition: actions.h:152
void ReCreateMenuBar() override
Recreates the menu bar.
static TOOL_ACTION cut
Definition: actions.h:69
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:244
static TOOL_ACTION drawRectangle
Definition: pcb_actions.h:148
static TOOL_ACTION plot
Definition: actions.h:61
static TOOL_ACTION drawVia
Definition: pcb_actions.h:157
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to Master...
static TOOL_ACTION showEeschema
Definition: pcb_actions.h:439
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:338
static TOOL_ACTION placeTarget
Definition: pcb_actions.h:162
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:311
static TOOL_ACTION milsUnits
Definition: actions.h:148
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:318
static TOOL_ACTION inspectClearance
Definition: pcb_actions.h:443
static TOOL_ACTION prevMarker
Definition: actions.h:88
static TOOL_ACTION updateFootprints
Definition: pcb_actions.h:325
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:247
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:333
static TOOL_ACTION placeCharacteristics
Definition: pcb_actions.h:161
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:149
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:248
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
Definition: pcb_actions.h:393
static TOOL_ACTION removeUnusedPads
Definition: pcb_actions.h:329
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:341
static TOOL_ACTION redo
Definition: actions.h:68
static constexpr bool CHECK
Definition: action_menu.h:182
static TOOL_ACTION placeFootprint
Definition: pcb_actions.h:164
static TOOL_ACTION drawLeader
Definition: pcb_actions.h:155
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:334
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:157
static TOOL_ACTION drawRuleArea
Definition: pcb_actions.h:158
void SetTitle(const wxString &aTitle) override
Set title for the menu.
Definition: action_menu.cpp:90
see class PGM_BASE
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
static SELECTION_CONDITION FileHistoryNotEmpty(const FILE_HISTORY &aHistory)
Create a SELECTION_CONDITION that can be used to enable a menu item when the file history has items i...
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:320
static TOOL_ACTION saveAs
Definition: actions.h:55
void AddQuitOrClose(KIFACE_I *aKiface, wxString aAppname="")
Add either a standard Quit or Close item to the menu.
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Definition: pcb_actions.h:185
#define _(s)
Definition: 3d_actions.cpp:33
static TOOL_ACTION zoomRedraw
Definition: actions.h:93
static TOOL_ACTION repairBoard
Definition: pcb_actions.h:442
static TOOL_ACTION listNets
Definition: pcb_actions.h:343
static TOOL_ACTION placeStackup
Definition: pcb_actions.h:163
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
wxMenuItem * Add(const wxString &aLabel, int aId, BITMAPS aIcon)
Add a wxWidgets-style entry to the menu.
The selection tool: currently supports:
static TOOL_ACTION runDRC
Definition: pcb_actions.h:344
static TOOL_ACTION gridProperties
Definition: actions.h:144
static TOOL_ACTION deleteTool
Definition: actions.h:76
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
static TOOL_ACTION undo
Definition: actions.h:67
static TOOL_ACTION toggleCursorStyle
Definition: actions.h:105
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:297
static TOOL_ACTION gridSetOrigin
Definition: actions.h:140
static TOOL_ACTION configurePaths
Definition: actions.h:175
static TOOL_ACTION highContrastMode
Definition: actions.h:106
static TOOL_ACTION selectAll
Definition: actions.h:73
static TOOL_ACTION showFootprintEditor
Definition: actions.h:165
static TOOL_ACTION paste
Definition: actions.h:71
static TOOL_ACTION drawZone
Definition: pcb_actions.h:156
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:246
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:337
static TOOL_ACTION textOutlines
Display texts as lines.
Definition: pcb_actions.h:396
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:249
static TOOL_ACTION routerTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:191
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:188