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 {
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 fileMenu->Add( submenuFabOutputs );
164
165 fileMenu->AppendSeparator();
166 fileMenu->Add( PCB_ACTIONS::boardSetup );
167
168 fileMenu->AppendSeparator();
169 fileMenu->Add( ACTIONS::pageSettings );
170 fileMenu->Add( ACTIONS::print );
171 fileMenu->Add( ACTIONS::plot );
172
173 fileMenu->AppendSeparator();
174 fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
175
176 //-- Edit menu -----------------------------------------------------------
177 //
178 ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
179
180 editMenu->Add( ACTIONS::undo );
181 editMenu->Add( ACTIONS::redo );
182
183 editMenu->AppendSeparator();
184 editMenu->Add( ACTIONS::cut );
185 editMenu->Add( ACTIONS::copy );
186 editMenu->Add( ACTIONS::paste );
187 editMenu->Add( ACTIONS::pasteSpecial );
188 editMenu->Add( ACTIONS::doDelete );
189
190 editMenu->AppendSeparator();
191
192 // Select Submenu
193 ACTION_MENU* selectSubMenu = new ACTION_MENU( false, selTool );
194 selectSubMenu->SetTitle( _( "&Select" ) );
195
196 selectSubMenu->Add( ACTIONS::selectAll );
197 selectSubMenu->Add( ACTIONS::unselectAll );
198
199 editMenu->Add( selectSubMenu );
200
201 editMenu->AppendSeparator();
202 editMenu->Add( ACTIONS::find );
204
205 editMenu->AppendSeparator();
208 editMenu->Add( PCB_ACTIONS::editTeardrops );
210 editMenu->Add( PCB_ACTIONS::swapLayers );
211 editMenu->Add( ACTIONS::gridOrigin );
212
213 editMenu->AppendSeparator();
214 editMenu->Add( PCB_ACTIONS::zoneFillAll );
215 editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
217
218 editMenu->AppendSeparator();
219 editMenu->Add( ACTIONS::deleteTool );
221
222
223 //----- View menu -----------------------------------------------------------
224 //
225 ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
226
227 ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
228 showHidePanels->SetTitle( _( "Panels" ) );
233
234 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
235 showHidePanels->Add( PCB_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK, _( "Design Blocks" ) );
236
237 viewMenu->Add( showHidePanels );
238
239 viewMenu->AppendSeparator();
241 viewMenu->Add( ACTIONS::show3DViewer );
242
243 viewMenu->AppendSeparator();
244 viewMenu->Add( ACTIONS::zoomInCenter );
245 viewMenu->Add( ACTIONS::zoomOutCenter );
246 viewMenu->Add( ACTIONS::zoomFitScreen );
247 viewMenu->Add( ACTIONS::zoomFitObjects );
248 viewMenu->Add( ACTIONS::zoomFitSelection );
249 viewMenu->Add( ACTIONS::zoomTool );
250 viewMenu->Add( ACTIONS::zoomRedraw );
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( BITMAPS::add_zone );
257
260
261 if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
262 {
265 }
266
267 drawingModeSubMenu->AppendSeparator();
268 drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
269 drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
271
272 drawingModeSubMenu->AppendSeparator();
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 );
302 placeMenu->Add( PCB_ACTIONS::drawRuleArea );
303
304 ACTION_MENU* muwaveSubmenu = new ACTION_MENU( false, selTool );
305 muwaveSubmenu->SetTitle( _( "Draw Microwave Shapes" ) );
306 muwaveSubmenu->SetIcon( BITMAPS::mw_add_line );
307 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateLine );
308 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateGap );
309 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStub );
312 placeMenu->Add( muwaveSubmenu );
313
314 placeMenu->AppendSeparator();
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::drawEllipse );
320 placeMenu->Add( PCB_ACTIONS::drawEllipseArc );
321 placeMenu->Add( PCB_ACTIONS::drawPolygon );
322 placeMenu->Add( PCB_ACTIONS::drawBezier );
324 placeMenu->Add( PCB_ACTIONS::placeText );
325 placeMenu->Add( PCB_ACTIONS::drawTextBox );
326 placeMenu->Add( PCB_ACTIONS::drawTable );
327 placeMenu->Add( PCB_ACTIONS::placePoint );
328 placeMenu->Add( PCB_ACTIONS::placeBarcode );
329
330 placeMenu->AppendSeparator();
331 ACTION_MENU* dimensionSubmenu = new ACTION_MENU( false, selTool );
332 dimensionSubmenu->SetTitle( _( "Draw Dimensions" ) );
333 dimensionSubmenu->SetIcon( BITMAPS::add_aligned_dimension );
334 dimensionSubmenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
335 dimensionSubmenu->Add( PCB_ACTIONS::drawAlignedDimension );
336 dimensionSubmenu->Add( PCB_ACTIONS::drawCenterDimension );
337 dimensionSubmenu->Add( PCB_ACTIONS::drawRadialDimension );
338 dimensionSubmenu->Add( PCB_ACTIONS::drawLeader );
339 placeMenu->Add( dimensionSubmenu );
340
341 placeMenu->AppendSeparator();
343 placeMenu->Add( PCB_ACTIONS::placeStackup );
344
345 placeMenu->AppendSeparator();
346 placeMenu->Add( PCB_ACTIONS::drillOrigin );
348 placeMenu->Add( ACTIONS::gridSetOrigin );
349 placeMenu->Add( ACTIONS::gridResetOrigin );
350
351 placeMenu->AppendSeparator();
352 ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
353 autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
354 autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
355
358
359 placeMenu->Add( autoplaceSubmenu );
360
361 //-- Route Menu ----------------------------------------------------------
362 //
363 ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
364
365 routeMenu->Add( PCB_ACTIONS::selectLayerPair );
366
367 routeMenu->AppendSeparator();
369 routeMenu->Add( PCB_ACTIONS::routeDiffPair );
370
371 routeMenu->AppendSeparator();
372 routeMenu->Add( PCB_ACTIONS::tuneSingleTrack );
373 routeMenu->Add( PCB_ACTIONS::tuneDiffPair );
374 routeMenu->Add( PCB_ACTIONS::tuneSkew );
375
376 routeMenu->AppendSeparator();
378
379
380 //-- Inspect Menu --------------------------------------------------------
381 //
382 ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
383
384 inspectMenu->Add( PCB_ACTIONS::boardStatistics );
385 inspectMenu->Add( ACTIONS::measureTool );
386
387 inspectMenu->AppendSeparator();
388 inspectMenu->Add( PCB_ACTIONS::runDRC );
389 inspectMenu->Add( ACTIONS::prevMarker );
390 inspectMenu->Add( ACTIONS::nextMarker );
391 inspectMenu->Add( ACTIONS::excludeMarker );
392
393 inspectMenu->AppendSeparator();
394 inspectMenu->Add( PCB_ACTIONS::inspectClearance );
395 inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
397 inspectMenu->Add( PCB_ACTIONS::diffFootprint );
398
399
400 //-- Tools menu ----------------------------------------------------------
401 //
402 ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
403
404 toolsMenu->Add( ACTIONS::updatePcbFromSchematic )->Enable( !Kiface().IsSingle() );
405 toolsMenu->Add( PCB_ACTIONS::showEeschema );
406
407 if( !Kiface().IsSingle() )
408 toolsMenu->Add( ACTIONS::showProjectManager );
409
410 toolsMenu->Add( ACTIONS::showCalculatorTools );
411
412 toolsMenu->AppendSeparator();
413 toolsMenu->Add( PCB_ACTIONS::drcRuleEditor );
414
415 toolsMenu->AppendSeparator();
416 toolsMenu->Add( ACTIONS::showFootprintEditor );
418 toolsMenu->Add( PCB_ACTIONS::migrate3DModels );
419
420 //Zones management
421 toolsMenu->AppendSeparator();
422 toolsMenu->Add( PCB_ACTIONS::zonesManager );
423
424 if( ADVANCED_CFG::GetCfg().m_EnableGenerators )
425 {
426 toolsMenu->AppendSeparator();
428 toolsMenu->Add( PCB_ACTIONS::regenerateAll );
430 }
431
432 toolsMenu->AppendSeparator();
435 toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
436 toolsMenu->Add( PCB_ACTIONS::repairBoard );
437
438 toolsMenu->AppendSeparator();
439 toolsMenu->Add( PCB_ACTIONS::collect3DModels );
440
441 toolsMenu->AppendSeparator();
442 toolsMenu->Add( PCB_ACTIONS::boardReannotate );
443 toolsMenu->Add( ACTIONS::updateSchematicFromPcb )->Enable( !Kiface().IsSingle() );
444
445 ACTION_MENU* multichannelSubmenu = new ACTION_MENU( false, selTool );
446 multichannelSubmenu->SetTitle( _( "Multi-Channel" ) );
447 multichannelSubmenu->SetIcon( BITMAPS::mode_module );
448 multichannelSubmenu->Add( PCB_ACTIONS::generatePlacementRuleAreas );
449 multichannelSubmenu->Add( PCB_ACTIONS::repeatLayout );
450
451 toolsMenu->Add( multichannelSubmenu );
452
453 ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
454 submenuActionPlugins->SetTitle( _( "External Plugins" ) );
455 submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
456
457 submenuActionPlugins->Add( ACTIONS::pluginsReload );
458 submenuActionPlugins->Add( PCB_ACTIONS::pluginsShowFolder );
459
460 toolsMenu->AppendSeparator();
461 toolsMenu->Add( submenuActionPlugins );
462
463 //-- Preferences menu ----------------------------------------------------
464 //
465 ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
466
467 prefsMenu->Add( ACTIONS::configurePaths );
469
470 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
472
473 prefsMenu->Add( ACTIONS::openPreferences );
474
475 prefsMenu->AppendSeparator();
476 AddMenuLanguageList( prefsMenu, selTool );
477
478
479 //--MenuBar -----------------------------------------------------------
480 //
481 menuBar->Append( fileMenu, _( "&File" ) );
482 menuBar->Append( editMenu, _( "&Edit" ) );
483 menuBar->Append( viewMenu, _( "&View" ) );
484 menuBar->Append( placeMenu, _( "&Place" ) );
485 menuBar->Append( routeMenu, _( "Ro&ute" ) );
486 menuBar->Append( inspectMenu, _( "&Inspect" ) );
487 menuBar->Append( toolsMenu, _( "&Tools" ) );
488 menuBar->Append( prefsMenu, _( "P&references" ) );
489 AddStandardHelpMenu( menuBar );
490
491 SetMenuBar( menuBar );
492 delete oldMenuBar;
493
494}
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:290
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:276
static TOOL_ACTION showFootprintLibTable
Definition actions.h:279
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:280
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:277
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.
AUTO_BACKUP m_Backup
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 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 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 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 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 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 zoneUnfillAll
static TOOL_ACTION appendBoard
static TOOL_ACTION microwaveCreateStub
static TOOL_ACTION microwaveCreateLine
static TOOL_ACTION flipBoard
static TOOL_ACTION zoneDisplayOutline
static TOOL_ACTION showFootprintAssociations
static TOOL_ACTION textOutlines
Display texts as lines.
static TOOL_ACTION microwaveCreateFunctionShape
static TOOL_ACTION placeBarcode
static TOOL_ACTION placePoint
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 cleanupGraphics
static TOOL_ACTION drawAlignedDimension
static TOOL_ACTION drawZone
static TOOL_ACTION rescueAutosave
static TOOL_ACTION importSpecctraSession
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:528
TOOL_MANAGER * m_toolManager
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition wx_menubar.h:43
@ INCREMENTAL
Git-based local history (default)
#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)
BACKUP_FORMAT format
Backup format (incremental git history vs zip archives)
bool enabled
Automatically back up the project when files are saved.