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