KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 <[email protected]>
6 * Copyright (C) 2012 Wayne Stambaugh <[email protected]>
7 * Copyright The 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, see <https://www.gnu.org/licenses/>.
21 */
22
23#include <advanced_config.h>
24#include <bitmaps.h>
25#include <file_history.h>
26#include <kiface_base.h>
27#include <pcb_edit_frame.h>
28#include <pcbnew_id.h>
29#include <pgm_base.h>
31#include <tool/action_manager.h>
32#include <tool/actions.h>
33#include <tool/tool_manager.h>
34#include <tools/pcb_actions.h>
36#include <widgets/wx_menubar.h>
37
38
40{
42 // wxWidgets handles the Mac Application menu behind the scenes, but that means
43 // we always have to start from scratch with a new wxMenuBar.
44 wxMenuBar* oldMenuBar = GetMenuBar();
45 WX_MENUBAR* menuBar = new WX_MENUBAR();
46
47 // Recreate all menus:
48
49 //-- File menu -----------------------------------------------------------
50 //
51 ACTION_MENU* fileMenu = new ACTION_MENU( false, selTool );
52 static ACTION_MENU* openRecentMenu;
53
54 if( Kiface().IsSingle() ) // not when under a project mgr
55 {
56 FILE_HISTORY& fileHistory = GetFileHistory();
57
58 // Create the menu if it does not exist. Adding a file to/from the history
59 // will automatically refresh the menu.
60 if( !openRecentMenu )
61 {
62 openRecentMenu = new ACTION_MENU( false, selTool );
63 openRecentMenu->SetIcon( BITMAPS::recent );
64
65 fileHistory.UseMenu( openRecentMenu );
66 fileHistory.AddFilesToMenu();
67 }
68
69 // Ensure the title is up to date after changing language
70 openRecentMenu->SetTitle( _( "Open Recent" ) );
71 fileHistory.UpdateClearText( openRecentMenu, _( "Clear Recent Files" ) );
72
73 fileMenu->Add( ACTIONS::doNew );
74 fileMenu->Add( ACTIONS::open );
75
76 wxMenuItem* item = fileMenu->Add( openRecentMenu->Clone() );
77
78 // Add the file menu condition here since it needs the item ID for the submenu
80 cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
81 RegisterUIUpdateHandler( item->GetId(), cond );
82 }
83
84 fileMenu->Add( PCB_ACTIONS::appendBoard );
86
87 wxMenuItem* historyItem = fileMenu->Add( PCB_ACTIONS::compareBoardWithHistory );
88 ACTION_CONDITIONS historyCond;
89 historyCond.Enable(
90 []( const SELECTION& )
91 {
93 return cs && cs->AutosaveUsesLocalHistory();
94 } );
95 RegisterUIUpdateHandler( historyItem->GetId(), historyCond );
96
97 fileMenu->AppendSeparator();
98
99 fileMenu->Add( ACTIONS::save );
100
101 // Save as menu:
102 // under a project mgr we do not want to modify the board filename
103 // to keep consistency with the project mgr which expects files names same as prj name
104 // for main files
105 if( Kiface().IsSingle() )
106 fileMenu->Add( ACTIONS::saveAs );
107 else
108 fileMenu->Add( ACTIONS::saveCopy );
109
110 fileMenu->Add( ACTIONS::revert );
111
112 fileMenu->AppendSeparator();
113 fileMenu->Add( PCB_ACTIONS::rescueAutosave );
114
115 // Import submenu
116 ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
117 submenuImport->SetTitle( _( "Import" ) );
118 submenuImport->SetIcon( BITMAPS::import );
119
120 submenuImport->Add( PCB_ACTIONS::importNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
121 submenuImport->Add( PCB_ACTIONS::importSpecctraSession, ACTION_MENU::NORMAL, _( "Specctra Session..." ) );
122 submenuImport->Add( PCB_ACTIONS::placeImportedGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
123 submenuImport->Add( PCB_ACTIONS::openNonKicadBoard );
124
125 fileMenu->AppendSeparator();
126 fileMenu->Add( submenuImport );
127
128 // Export submenu
129 ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
130 submenuExport->SetTitle( _( "Export" ) );
131 submenuExport->SetIcon( BITMAPS::export_file );
132
133 submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN, ACTION_MENU::NORMAL, _( "Specctra DSN..." ) );
134 submenuExport->Add( PCB_ACTIONS::exportGenCAD, ACTION_MENU::NORMAL, _( "GenCAD..." ) );
135 submenuExport->Add( PCB_ACTIONS::exportVRML, ACTION_MENU::NORMAL, _( "VRML..." ) );
136 submenuExport->Add( PCB_ACTIONS::exportIDF, ACTION_MENU::NORMAL, _( "IDFv3..." ) );
137 submenuExport->Add( PCB_ACTIONS::exportSTEP, ACTION_MENU::NORMAL, _( "STEP/GLB/BREP/XAO/PLY/STL..." ) );
138 submenuExport->Add( PCB_ACTIONS::exportCmpFile, ACTION_MENU::NORMAL, _( "Footprint Association (.cmp) File..." ) );
139 submenuExport->Add( PCB_ACTIONS::exportHyperlynx, ACTION_MENU::NORMAL, _( "Hyperlynx..." ) );
140
141 if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
142 submenuExport->Add( *m_exportNetlistAction );
143
144 submenuExport->AppendSeparator();
145 submenuExport->Add( PCB_ACTIONS::exportFootprints, ACTION_MENU::NORMAL, _( "Footprints..." ) );
146
147 fileMenu->Add( submenuExport );
148
149 // Fabrication Outputs submenu
150 ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false, selTool );
151 submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
152 submenuFabOutputs->SetIcon( BITMAPS::fabrication );
153
154 submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
155 submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
156 submenuFabOutputs->Add( PCB_ACTIONS::generateIPC2581File );
157 submenuFabOutputs->Add( PCB_ACTIONS::generateODBPPFile );
158
159 submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
160 submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
161 submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
162 submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
163 submenuFabOutputs->Add( PCB_ACTIONS::generateBOMLegacy );
164 fileMenu->Add( submenuFabOutputs );
165
166 fileMenu->AppendSeparator();
167 fileMenu->Add( PCB_ACTIONS::boardSetup );
168
169 fileMenu->AppendSeparator();
170 fileMenu->Add( ACTIONS::pageSettings );
171 fileMenu->Add( ACTIONS::print );
172 fileMenu->Add( ACTIONS::plot );
173
174 fileMenu->AppendSeparator();
175 fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
176
177 //-- Edit menu -----------------------------------------------------------
178 //
179 ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
180
181 editMenu->Add( ACTIONS::undo );
182 editMenu->Add( ACTIONS::redo );
183
184 editMenu->AppendSeparator();
185 editMenu->Add( ACTIONS::cut );
186 editMenu->Add( ACTIONS::copy );
187 editMenu->Add( ACTIONS::paste );
188 editMenu->Add( ACTIONS::pasteSpecial );
189 editMenu->Add( ACTIONS::doDelete );
190
191 editMenu->AppendSeparator();
192
193 // Select Submenu
194 ACTION_MENU* selectSubMenu = new ACTION_MENU( false, selTool );
195 selectSubMenu->SetTitle( _( "&Select" ) );
196
197 selectSubMenu->Add( ACTIONS::selectAll );
198 selectSubMenu->Add( ACTIONS::unselectAll );
199
200 editMenu->Add( selectSubMenu );
201
202 editMenu->AppendSeparator();
203 editMenu->Add( ACTIONS::find );
205
206 editMenu->AppendSeparator();
207 editMenu->Add( PCB_ACTIONS::extendGraphic );
208 editMenu->Add( PCB_ACTIONS::trimGraphic );
211 editMenu->Add( PCB_ACTIONS::editTeardrops );
213 editMenu->Add( PCB_ACTIONS::swapLayers );
214 editMenu->Add( ACTIONS::gridOrigin );
215
216 editMenu->AppendSeparator();
217 editMenu->Add( PCB_ACTIONS::zoneFillAll );
218 editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
220
221 editMenu->AppendSeparator();
222 editMenu->Add( ACTIONS::deleteTool );
224
225
226 //----- View menu -----------------------------------------------------------
227 //
228 ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
229
230 ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
231 showHidePanels->SetTitle( _( "Panels" ) );
237
238 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
239 showHidePanels->Add( PCB_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK, _( "Design Blocks" ) );
240
241 viewMenu->Add( showHidePanels );
242
243 viewMenu->AppendSeparator();
245 viewMenu->Add( ACTIONS::show3DViewer );
246
247 viewMenu->AppendSeparator();
248 viewMenu->Add( ACTIONS::zoomInCenter );
249 viewMenu->Add( ACTIONS::zoomOutCenter );
250 viewMenu->Add( ACTIONS::zoomFitScreen );
251 viewMenu->Add( ACTIONS::zoomFitObjects );
252 viewMenu->Add( ACTIONS::zoomFitSelection );
253 viewMenu->Add( ACTIONS::zoomTool );
254 viewMenu->Add( ACTIONS::zoomRedraw );
255
256 viewMenu->AppendSeparator();
257 // Drawing Mode Submenu
258 ACTION_MENU* drawingModeSubMenu = new ACTION_MENU( false, selTool );
259 drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
260 drawingModeSubMenu->SetIcon( BITMAPS::add_zone );
261
264
265 if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
266 {
269 }
270
271 drawingModeSubMenu->AppendSeparator();
272 drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
273 drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
275
276 drawingModeSubMenu->AppendSeparator();
278 drawingModeSubMenu->Add( PCB_ACTIONS::textOutlines, ACTION_MENU::CHECK );
279
280 viewMenu->Add( drawingModeSubMenu );
281
282 // Contrast Mode Submenu
283 ACTION_MENU* contrastModeSubMenu = new ACTION_MENU( false, selTool );
284 contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
285 contrastModeSubMenu->SetIcon( BITMAPS::contrast_mode );
286
287 contrastModeSubMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
288 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaDec );
289 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
290 viewMenu->Add( contrastModeSubMenu );
291
293
294#ifdef __APPLE__
295 viewMenu->AppendSeparator();
296#endif
297
298 //-- Place Menu ----------------------------------------------------------
299 //
300 ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
301
302 placeMenu->Add( PCB_ACTIONS::placeFootprint );
303 placeMenu->Add( PCB_ACTIONS::drawVia );
304 placeMenu->Add( PCB_ACTIONS::placeViaStack );
305 placeMenu->Add( PCB_ACTIONS::makeViaStack );
306 placeMenu->Add( PCB_ACTIONS::drawZone );
308 placeMenu->Add( PCB_ACTIONS::drawRuleArea );
309
310 ACTION_MENU* muwaveSubmenu = new ACTION_MENU( false, selTool );
311 muwaveSubmenu->SetTitle( _( "Draw Microwave Shapes" ) );
312 muwaveSubmenu->SetIcon( BITMAPS::mw_add_line );
313 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateLine );
314 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateGap );
315 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStub );
318 placeMenu->Add( muwaveSubmenu );
319
320 placeMenu->AppendSeparator();
321 placeMenu->Add( PCB_ACTIONS::drawLine );
322 placeMenu->Add( PCB_ACTIONS::drawArc );
323 placeMenu->Add( PCB_ACTIONS::drawRectangle );
324 placeMenu->Add( PCB_ACTIONS::drawCircle );
325 placeMenu->Add( PCB_ACTIONS::drawEllipse );
326 placeMenu->Add( PCB_ACTIONS::drawEllipseArc );
327 placeMenu->Add( PCB_ACTIONS::drawPolygon );
328 placeMenu->Add( PCB_ACTIONS::drawBezier );
330 placeMenu->Add( PCB_ACTIONS::placeText );
331 placeMenu->Add( PCB_ACTIONS::drawTextBox );
332 placeMenu->Add( PCB_ACTIONS::drawTable );
333 placeMenu->Add( PCB_ACTIONS::placePoint );
334 placeMenu->Add( PCB_ACTIONS::placeBarcode );
335
336 placeMenu->AppendSeparator();
337 ACTION_MENU* dimensionSubmenu = new ACTION_MENU( false, selTool );
338 dimensionSubmenu->SetTitle( _( "Draw Dimensions" ) );
339 dimensionSubmenu->SetIcon( BITMAPS::add_aligned_dimension );
340 dimensionSubmenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
341 dimensionSubmenu->Add( PCB_ACTIONS::drawAlignedDimension );
342 dimensionSubmenu->Add( PCB_ACTIONS::drawCenterDimension );
343 dimensionSubmenu->Add( PCB_ACTIONS::drawRadialDimension );
344 dimensionSubmenu->Add( PCB_ACTIONS::drawLeader );
345 placeMenu->Add( dimensionSubmenu );
346
347 // Mirrors the selection tool's Constraints context submenu so the feature is reachable without
348 // right-clicking; an unsuitable selection is reported by the tool via the info bar. The action
349 // list is shared (PCB_ACTIONS::ConstraintAddActions) so this menu cannot drift from the context
350 // one. The pane itself is reached from View > Panels, so no toggle is repeated here.
351 ACTION_MENU* constraintsSubmenu = new ACTION_MENU( false, selTool );
352 constraintsSubmenu->SetTitle( _( "Geometric Constraints" ) );
353 constraintsSubmenu->SetIcon( BITMAPS::measurement );
354
355 for( const TOOL_ACTION* action : PCB_ACTIONS::ConstraintAddActions() )
356 constraintsSubmenu->Add( *action );
357
358 constraintsSubmenu->AppendSeparator();
359 constraintsSubmenu->Add( PCB_ACTIONS::removeConstraints );
360 placeMenu->Add( constraintsSubmenu );
361
362 placeMenu->AppendSeparator();
364 placeMenu->Add( PCB_ACTIONS::placeStackup );
365 placeMenu->Add( PCB_ACTIONS::placeDrillChart );
366 placeMenu->Add( PCB_ACTIONS::placeDrillMap );
367
368 placeMenu->AppendSeparator();
369 placeMenu->Add( PCB_ACTIONS::drillOrigin );
371 placeMenu->Add( ACTIONS::gridSetOrigin );
372 placeMenu->Add( ACTIONS::gridResetOrigin );
373 placeMenu->AppendSeparator();
374 placeMenu->Add( PCB_ACTIONS::placeGridItem );
375 placeMenu->AppendSeparator();
376 ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
377 autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
378 autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
379
382
383 placeMenu->Add( autoplaceSubmenu );
384
385 //-- Route Menu ----------------------------------------------------------
386 //
387 ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
388
389 routeMenu->Add( PCB_ACTIONS::selectLayerPair );
390
391 routeMenu->AppendSeparator();
393 routeMenu->Add( PCB_ACTIONS::routeDiffPair );
394
395 routeMenu->AppendSeparator();
396 routeMenu->Add( PCB_ACTIONS::tuneSingleTrack );
397 routeMenu->Add( PCB_ACTIONS::tuneDiffPair );
398 routeMenu->Add( PCB_ACTIONS::tuneSkew );
399
400 routeMenu->AppendSeparator();
402
403
404 //-- Inspect Menu --------------------------------------------------------
405 //
406 ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
407
408 inspectMenu->Add( PCB_ACTIONS::boardStatistics );
409 inspectMenu->Add( ACTIONS::measureTool );
410
411 inspectMenu->AppendSeparator();
412 inspectMenu->Add( PCB_ACTIONS::runDRC );
413 inspectMenu->Add( ACTIONS::prevMarker );
414 inspectMenu->Add( ACTIONS::nextMarker );
415 inspectMenu->Add( ACTIONS::excludeMarker );
416
417 inspectMenu->AppendSeparator();
418 inspectMenu->Add( PCB_ACTIONS::inspectClearance );
419 inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
421 inspectMenu->Add( PCB_ACTIONS::diffFootprint );
422
423
424 //-- Tools menu ----------------------------------------------------------
425 //
426 ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
427
428 toolsMenu->Add( ACTIONS::updatePcbFromSchematic )->Enable( !Kiface().IsSingle() );
429 toolsMenu->Add( PCB_ACTIONS::showEeschema );
430
431 if( !Kiface().IsSingle() )
432 toolsMenu->Add( ACTIONS::showProjectManager );
433
434 toolsMenu->Add( ACTIONS::showCalculatorTools );
435
436 toolsMenu->AppendSeparator();
437 toolsMenu->Add( PCB_ACTIONS::drcRuleEditor );
438 toolsMenu->Add( PCB_ACTIONS::showDrillGroups );
439
440 toolsMenu->AppendSeparator();
441 toolsMenu->Add( ACTIONS::showFootprintEditor );
443 toolsMenu->Add( PCB_ACTIONS::migrate3DModels );
445
446 //Zones management
447 toolsMenu->AppendSeparator();
448 toolsMenu->Add( PCB_ACTIONS::zonesManager );
449
450 if( ADVANCED_CFG::GetCfg().m_EnableGenerators )
451 {
452 toolsMenu->AppendSeparator();
454 toolsMenu->Add( PCB_ACTIONS::regenerateAll );
456 }
457
458 toolsMenu->AppendSeparator();
461 toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
462 toolsMenu->Add( PCB_ACTIONS::repairBoard );
463
464 toolsMenu->AppendSeparator();
465 toolsMenu->Add( PCB_ACTIONS::collect3DModels );
466
467 toolsMenu->AppendSeparator();
468 toolsMenu->Add( PCB_ACTIONS::boardReannotate );
469 toolsMenu->Add( ACTIONS::updateSchematicFromPcb )->Enable( !Kiface().IsSingle() );
470
471 ACTION_MENU* multichannelSubmenu = new ACTION_MENU( false, selTool );
472 multichannelSubmenu->SetTitle( _( "Multi-Channel" ) );
473 multichannelSubmenu->SetIcon( BITMAPS::mode_module );
474 multichannelSubmenu->Add( PCB_ACTIONS::generatePlacementRuleAreas );
475 multichannelSubmenu->Add( PCB_ACTIONS::repeatLayout );
476
477 toolsMenu->Add( multichannelSubmenu );
478
479 ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
480 submenuActionPlugins->SetTitle( _( "External Plugins" ) );
481 submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
482
483 submenuActionPlugins->Add( ACTIONS::pluginsReload );
484 submenuActionPlugins->Add( PCB_ACTIONS::pluginsShowFolder );
485
486 toolsMenu->AppendSeparator();
487 toolsMenu->Add( submenuActionPlugins );
488
489 //-- Preferences menu ----------------------------------------------------
490 //
491 ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
492
493 prefsMenu->Add( ACTIONS::configurePaths );
495
496 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
498
499 prefsMenu->Add( ACTIONS::openPreferences );
500
501 prefsMenu->AppendSeparator();
502 AddMenuLanguageList( prefsMenu, selTool );
503
504
505 //--MenuBar -----------------------------------------------------------
506 //
507 menuBar->Append( fileMenu, _( "&File" ) );
508 menuBar->Append( editMenu, _( "&Edit" ) );
509 menuBar->Append( viewMenu, _( "&View" ) );
510 menuBar->Append( placeMenu, _( "&Place" ) );
511 menuBar->Append( routeMenu, _( "Ro&ute" ) );
512 menuBar->Append( inspectMenu, _( "&Inspect" ) );
513 menuBar->Append( toolsMenu, _( "&Tools" ) );
514 menuBar->Append( prefsMenu, _( "P&references" ) );
515 AddStandardHelpMenu( menuBar );
516
517 SetMenuBar( menuBar );
518 delete oldMenuBar;
519
520}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
@ add_aligned_dimension
static TOOL_ACTION showCalculatorTools
Definition actions.h:259
static TOOL_ACTION updatePcbFromSchematic
Definition actions.h:260
static TOOL_ACTION paste
Definition actions.h:76
static TOOL_ACTION excludeMarker
Definition actions.h:125
static TOOL_ACTION nextMarker
Definition actions.h:124
static TOOL_ACTION zoomRedraw
Definition actions.h:128
static TOOL_ACTION unselectAll
Definition actions.h:79
static TOOL_ACTION revert
Definition actions.h:58
static TOOL_ACTION show3DViewer
Definition actions.h:254
static TOOL_ACTION zoomOutCenter
Definition actions.h:132
static TOOL_ACTION saveAs
Definition actions.h:55
static TOOL_ACTION copy
Definition actions.h:74
static TOOL_ACTION pluginsReload
Definition actions.h:292
static TOOL_ACTION gridResetOrigin
Definition actions.h:192
static TOOL_ACTION pasteSpecial
Definition actions.h:77
static TOOL_ACTION zoomFitSelection
Definition actions.h:140
static TOOL_ACTION openPreferences
Definition actions.h:278
static TOOL_ACTION showFootprintLibTable
Definition actions.h:281
static TOOL_ACTION plot
Definition actions.h:61
static TOOL_ACTION open
Definition actions.h:53
static TOOL_ACTION pageSettings
Definition actions.h:59
static TOOL_ACTION showSearch
Definition actions.h:112
static TOOL_ACTION undo
Definition actions.h:71
static TOOL_ACTION prevMarker
Definition actions.h:123
static TOOL_ACTION highContrastMode
Definition actions.h:151
static TOOL_ACTION gridOrigin
Definition actions.h:197
static TOOL_ACTION measureTool
Definition actions.h:248
static TOOL_ACTION doDelete
Definition actions.h:81
static TOOL_ACTION save
Definition actions.h:54
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION redo
Definition actions.h:72
static TOOL_ACTION deleteTool
Definition actions.h:82
static TOOL_ACTION zoomTool
Definition actions.h:142
static TOOL_ACTION updateSchematicFromPcb
Definition actions.h:261
static TOOL_ACTION showDesignBlockLibTable
Definition actions.h:282
static TOOL_ACTION showFootprintEditor
Definition actions.h:258
static TOOL_ACTION print
Definition actions.h:60
static TOOL_ACTION showProperties
Definition actions.h:262
static TOOL_ACTION doNew
Definition actions.h:50
static TOOL_ACTION zoomFitObjects
Definition actions.h:139
static TOOL_ACTION zoomInCenter
Definition actions.h:131
static TOOL_ACTION saveCopy
Definition actions.h:56
static TOOL_ACTION cut
Definition actions.h:73
static TOOL_ACTION gridSetOrigin
Definition actions.h:191
static TOOL_ACTION configurePaths
Definition actions.h:279
static TOOL_ACTION showProjectManager
Definition actions.h:253
static TOOL_ACTION showFootprintBrowser
Definition actions.h:257
static TOOL_ACTION selectAll
Definition actions.h:78
static TOOL_ACTION find
Definition actions.h:113
Define the structure of a menu based on ACTIONs.
Definition action_menu.h:43
void AddQuitOrClose(KIFACE_BASE *aKiface, wxString aAppname="")
Add either a standard Quit or Close item to the menu.
static constexpr bool CHECK
ACTION_MENU * Clone() const
Create a deep, recursive copy of this ACTION_MENU.
void SetTitle(const wxString &aTitle) override
Set title for the menu.
static constexpr bool NORMAL
void SetIcon(BITMAPS aIcon)
Assign an icon for the entry.
wxMenuItem * Add(const wxString &aLabel, int aId, BITMAPS aIcon)
Add a wxWidgets-style entry to the menu.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
bool AutosaveUsesLocalHistory() const
The backup format is the single switch that selects the autosave mechanism: the incremental format re...
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Create a menu list for language choice, and add it as submenu to MasterMenu.
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
virtual void RegisterUIUpdateHandler(int aID, const ACTION_CONDITIONS &aConditions) override
Register a UI update handler for the control with ID aID.
void AddStandardHelpMenu(wxMenuBar *aMenuBar)
Add the standard KiCad help menu to the menubar.
This class implements a file history object to store a list of files, that can then be added to a men...
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...
void UpdateClearText(wxMenu *aMenu, wxString aClearText)
Update the text displayed on the menu item that clears the entire menu.
void AddFilesToMenu() override
Add the files to all registered menus.
static TOOL_ACTION editTracksAndVias
static TOOL_ACTION showConstraintsPanel
Toggle the docked constraints pane (board editor).
static TOOL_ACTION drawRuleArea
static TOOL_ACTION microwaveCreateGap
static TOOL_ACTION drawBezier
static TOOL_ACTION placeText
static TOOL_ACTION swapLayers
static TOOL_ACTION zonesManager
static TOOL_ACTION generateBOM
static TOOL_ACTION drawOrthogonalDimension
static TOOL_ACTION drcRuleEditor
static TOOL_ACTION drawRectangle
static TOOL_ACTION padDisplayMode
static TOOL_ACTION placeReferenceImage
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
static TOOL_ACTION exportGenCAD
static TOOL_ACTION zoneFillAll
static TOOL_ACTION showLayersManager
static TOOL_ACTION generateDrillFiles
static TOOL_ACTION drawCircle
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
static TOOL_ACTION exportVRML
static TOOL_ACTION generateD356File
static TOOL_ACTION collect3DModels
static TOOL_ACTION tuneDiffPair
static TOOL_ACTION exportCmpFile
static TOOL_ACTION exportSpecctraDSN
static TOOL_ACTION placeDrillMap
static TOOL_ACTION drawEllipseArc
static TOOL_ACTION generateIPC2581File
static TOOL_ACTION drawTable
static TOOL_ACTION drawTextBox
static TOOL_ACTION generateODBPPFile
static TOOL_ACTION repeatLayout
static TOOL_ACTION layerAlphaDec
static TOOL_ACTION migrate3DModels
static TOOL_ACTION drawPolygon
static TOOL_ACTION openNonKicadBoard
static TOOL_ACTION zoneDisplayFilled
static TOOL_ACTION drawRadialDimension
static TOOL_ACTION tuneSingleTrack
static TOOL_ACTION cleanupTracksAndVias
static TOOL_ACTION viaDisplayMode
static TOOL_ACTION editTextAndGraphics
static TOOL_ACTION drawLeader
static TOOL_ACTION drillResetOrigin
static TOOL_ACTION compareBoardWithHistory
static TOOL_ACTION placeCharacteristics
static TOOL_ACTION pluginsShowFolder
Scripting Actions.
static TOOL_ACTION autoplaceOffboardComponents
static TOOL_ACTION generateBOMLegacy
static TOOL_ACTION layerAlphaInc
static TOOL_ACTION drawCopperThievingZone
static TOOL_ACTION inspectConstraints
static TOOL_ACTION generatePosFile
static TOOL_ACTION globalDeletions
static TOOL_ACTION drillOrigin
static TOOL_ACTION tuneSkew
static TOOL_ACTION repairBoard
static TOOL_ACTION trackDisplayMode
static TOOL_ACTION exportSTEP
static TOOL_ACTION showNetInspector
static TOOL_ACTION selectLayerPair
static TOOL_ACTION microwaveCreateStubArc
static TOOL_ACTION extendGraphic
Extend one graphical line or arc to the nearest boundary.
static TOOL_ACTION drawEllipse
static TOOL_ACTION findByProperties
Find items by property criteria or expression.
static TOOL_ACTION generateGerbers
static TOOL_ACTION inspectClearance
static TOOL_ACTION generatorsShowManager
static const std::vector< const TOOL_ACTION * > & ConstraintAddActions()
Canonical ordered list of the geometric-constraint "add" actions, shared by the context submenu (gate...
static TOOL_ACTION zoneDisplayTriangulated
static TOOL_ACTION generateReportFile
static TOOL_ACTION updateFootprints
static TOOL_ACTION exportHyperlynx
static TOOL_ACTION autoplaceSelectedComponents
static TOOL_ACTION placeImportedGraphics
static TOOL_ACTION removeUnusedPads
static TOOL_ACTION zoneDisplayFractured
static TOOL_ACTION drawVia
static TOOL_ACTION regenerateAll
static TOOL_ACTION drawArc
static TOOL_ACTION exportIDF
static TOOL_ACTION runDRC
static TOOL_ACTION regenerateAllTuning
Generator tool.
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION importNetlist
static TOOL_ACTION generatePlacementRuleAreas
static TOOL_ACTION compareBoardWithFile
static TOOL_ACTION diffFootprint
static TOOL_ACTION changeFootprints
static TOOL_ACTION boardSetup
static TOOL_ACTION showEeschema
static TOOL_ACTION showDesignBlockPanel
static TOOL_ACTION drawCenterDimension
static TOOL_ACTION makeViaStack
static TOOL_ACTION zoneUnfillAll
static TOOL_ACTION appendBoard
static TOOL_ACTION microwaveCreateStub
static TOOL_ACTION editFootprintFields
static TOOL_ACTION microwaveCreateLine
static TOOL_ACTION flipBoard
static TOOL_ACTION placeGridItem
Grid Item.
static TOOL_ACTION zoneDisplayOutline
static TOOL_ACTION showFootprintAssociations
static TOOL_ACTION showDrillGroups
static TOOL_ACTION textOutlines
Display texts as lines.
static TOOL_ACTION microwaveCreateFunctionShape
static TOOL_ACTION placeBarcode
static TOOL_ACTION placePoint
static TOOL_ACTION placeDrillChart
static TOOL_ACTION boardReannotate
static TOOL_ACTION regenerateSelected
static TOOL_ACTION exportFootprints
static TOOL_ACTION placeFootprint
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
static TOOL_ACTION boardStatistics
static TOOL_ACTION editTeardrops
static TOOL_ACTION drawLine
static TOOL_ACTION placeStackup
static TOOL_ACTION placeViaStack
static TOOL_ACTION cleanupGraphics
static TOOL_ACTION drawAlignedDimension
static TOOL_ACTION removeConstraints
static TOOL_ACTION drawZone
static TOOL_ACTION rescueAutosave
static TOOL_ACTION importSpecctraSession
static TOOL_ACTION trimGraphic
Trim a section from one graphical line or arc.
void doReCreateMenuBar() override
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
The selection tool: currently supports:
virtual COMMON_SETTINGS * GetCommonSettings() const
Definition pgm_base.cpp:546
TOOL_MANAGER * m_toolManager
Represent a single user action.
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition wx_menubar.h:43
#define _(s)
PGM_BASE & Pgm()
The global program "get" accessor.
see class PGM_BASE
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
ACTION_CONDITIONS & Enable(const SELECTION_CONDITION &aCondition)