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