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, 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 <file_history.h>
30#include <kiface_base.h>
31#include <pcb_edit_frame.h>
32#include <pcbnew_id.h>
33#include <python_scripting.h>
34#include <tool/action_manager.h>
35#include <tool/actions.h>
36#include <tool/tool_manager.h>
37#include <tools/pcb_actions.h>
39#include <widgets/wx_menubar.h>
40
41
43{
45 // wxWidgets handles the Mac Application menu behind the scenes, but that means
46 // we always have to start from scratch with a new wxMenuBar.
47 wxMenuBar* oldMenuBar = GetMenuBar();
48 WX_MENUBAR* menuBar = new WX_MENUBAR();
49
50 // Recreate all menus:
51
52 //-- File menu -----------------------------------------------------------
53 //
54 ACTION_MENU* fileMenu = new ACTION_MENU( false, selTool );
55 static ACTION_MENU* openRecentMenu;
56
57 if( Kiface().IsSingle() ) // not when under a project mgr
58 {
59 FILE_HISTORY& fileHistory = GetFileHistory();
60
61 // Create the menu if it does not exist. Adding a file to/from the history
62 // will automatically refresh the menu.
63 if( !openRecentMenu )
64 {
65 openRecentMenu = new ACTION_MENU( false, selTool );
66 openRecentMenu->SetIcon( BITMAPS::recent );
67
68 fileHistory.UseMenu( openRecentMenu );
69 fileHistory.AddFilesToMenu();
70 }
71
72 // Ensure the title is up to date after changing language
73 openRecentMenu->SetTitle( _( "Open Recent" ) );
74 fileHistory.UpdateClearText( openRecentMenu, _( "Clear Recent Files" ) );
75
76 fileMenu->Add( ACTIONS::doNew );
77 fileMenu->Add( ACTIONS::open );
78
79 wxMenuItem* item = fileMenu->Add( openRecentMenu->Clone() );
80
81 // Add the file menu condition here since it needs the item ID for the submenu
83 cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
84 RegisterUIUpdateHandler( item->GetId(), cond );
85 }
86
87 fileMenu->Add( PCB_ACTIONS::appendBoard );
88 fileMenu->AppendSeparator();
89
90 fileMenu->Add( ACTIONS::save );
91
92 // Save as menu:
93 // under a project mgr we do not want to modify the board filename
94 // to keep consistency with the project mgr which expects files names same as prj name
95 // for main files
96 if( Kiface().IsSingle() )
97 fileMenu->Add( ACTIONS::saveAs );
98 else
99 fileMenu->Add( ACTIONS::saveCopy );
100
101 fileMenu->Add( ACTIONS::revert );
102
103 fileMenu->AppendSeparator();
104 fileMenu->Add( PCB_ACTIONS::rescueAutosave );
105
106 // Import submenu
107 ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
108 submenuImport->SetTitle( _( "Import" ) );
109 submenuImport->SetIcon( BITMAPS::import );
110
111 submenuImport->Add( PCB_ACTIONS::importNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
112 submenuImport->Add( PCB_ACTIONS::importSpecctraSession, ACTION_MENU::NORMAL, _( "Specctra Session..." ) );
113 submenuImport->Add( PCB_ACTIONS::placeImportedGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
114 submenuImport->Add( PCB_ACTIONS::openNonKicadBoard );
115
116 fileMenu->AppendSeparator();
117 fileMenu->Add( submenuImport );
118
119 // Export submenu
120 ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
121 submenuExport->SetTitle( _( "Export" ) );
122 submenuExport->SetIcon( BITMAPS::export_file );
123
124 submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN, ACTION_MENU::NORMAL, _( "Specctra DSN..." ) );
125 submenuExport->Add( PCB_ACTIONS::exportGenCAD, ACTION_MENU::NORMAL, _( "GenCAD..." ) );
126 submenuExport->Add( PCB_ACTIONS::exportVRML, ACTION_MENU::NORMAL, _( "VRML..." ) );
127 submenuExport->Add( PCB_ACTIONS::exportIDF, ACTION_MENU::NORMAL, _( "IDFv3..." ) );
128 submenuExport->Add( PCB_ACTIONS::exportSTEP, ACTION_MENU::NORMAL, _( "STEP/GLB/BREP/XAO/PLY/STL..." ) );
129 submenuExport->Add( PCB_ACTIONS::exportCmpFile, ACTION_MENU::NORMAL, _( "Footprint Association (.cmp) File..." ) );
130 submenuExport->Add( PCB_ACTIONS::exportHyperlynx, ACTION_MENU::NORMAL, _( "Hyperlynx..." ) );
131
132 if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
133 submenuExport->Add( *m_exportNetlistAction );
134
135 submenuExport->AppendSeparator();
136 submenuExport->Add( PCB_ACTIONS::exportFootprints, ACTION_MENU::NORMAL, _( "Footprints..." ) );
137
138 fileMenu->Add( submenuExport );
139
140 // Fabrication Outputs submenu
141 ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false, selTool );
142 submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
143 submenuFabOutputs->SetIcon( BITMAPS::fabrication );
144
145 submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
146 submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
147 submenuFabOutputs->Add( PCB_ACTIONS::generateIPC2581File );
148 submenuFabOutputs->Add( PCB_ACTIONS::generateODBPPFile );
149
150 submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
151 submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
152 submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
153 submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
154 fileMenu->Add( submenuFabOutputs );
155
156 fileMenu->AppendSeparator();
157 fileMenu->Add( PCB_ACTIONS::boardSetup );
158
159 fileMenu->AppendSeparator();
160 fileMenu->Add( ACTIONS::pageSettings );
161 fileMenu->Add( ACTIONS::print );
162 fileMenu->Add( ACTIONS::plot );
163
164 fileMenu->AppendSeparator();
165 fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
166
167 //-- Edit menu -----------------------------------------------------------
168 //
169 ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
170
171 editMenu->Add( ACTIONS::undo );
172 editMenu->Add( ACTIONS::redo );
173
174 editMenu->AppendSeparator();
175 editMenu->Add( ACTIONS::cut );
176 editMenu->Add( ACTIONS::copy );
177 editMenu->Add( ACTIONS::paste );
178 editMenu->Add( ACTIONS::pasteSpecial );
179 editMenu->Add( ACTIONS::doDelete );
180
181 editMenu->AppendSeparator();
182
183 // Select Submenu
184 ACTION_MENU* selectSubMenu = new ACTION_MENU( false, selTool );
185 selectSubMenu->SetTitle( _( "&Select" ) );
186
187 selectSubMenu->Add( ACTIONS::selectAll );
188 selectSubMenu->Add( ACTIONS::unselectAll );
189
190 editMenu->Add( selectSubMenu );
191
192 editMenu->AppendSeparator();
193 editMenu->Add( ACTIONS::find );
194
195 editMenu->AppendSeparator();
198 editMenu->Add( PCB_ACTIONS::editTeardrops );
200 editMenu->Add( PCB_ACTIONS::swapLayers );
201 editMenu->Add( ACTIONS::gridOrigin );
202
203 editMenu->AppendSeparator();
204 editMenu->Add( PCB_ACTIONS::zoneFillAll );
205 editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
207
208 editMenu->AppendSeparator();
209 editMenu->Add( ACTIONS::deleteTool );
211
212
213 //----- View menu -----------------------------------------------------------
214 //
215 ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
216
217 ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
218 showHidePanels->SetTitle( _( "Panels" ) );
223
224 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
225 showHidePanels->Add( PCB_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK, _( "Design Blocks" ) );
226
227 viewMenu->Add( showHidePanels );
228
229 viewMenu->AppendSeparator();
231 viewMenu->Add( ACTIONS::show3DViewer );
232
233 viewMenu->AppendSeparator();
234 viewMenu->Add( ACTIONS::zoomInCenter );
235 viewMenu->Add( ACTIONS::zoomOutCenter );
236 viewMenu->Add( ACTIONS::zoomFitScreen );
237 viewMenu->Add( ACTIONS::zoomFitObjects );
238 viewMenu->Add( ACTIONS::zoomFitSelection );
239 viewMenu->Add( ACTIONS::zoomTool );
240 viewMenu->Add( ACTIONS::zoomRedraw );
241
242 viewMenu->AppendSeparator();
243 // Drawing Mode Submenu
244 ACTION_MENU* drawingModeSubMenu = new ACTION_MENU( false, selTool );
245 drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
246 drawingModeSubMenu->SetIcon( BITMAPS::add_zone );
247
250
251 if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
252 {
255 }
256
257 drawingModeSubMenu->AppendSeparator();
258 drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
259 drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
261
262 drawingModeSubMenu->AppendSeparator();
264 drawingModeSubMenu->Add( PCB_ACTIONS::textOutlines, ACTION_MENU::CHECK );
265
266 viewMenu->Add( drawingModeSubMenu );
267
268 // Contrast Mode Submenu
269 ACTION_MENU* contrastModeSubMenu = new ACTION_MENU( false, selTool );
270 contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
271 contrastModeSubMenu->SetIcon( BITMAPS::contrast_mode );
272
273 contrastModeSubMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
274 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaDec );
275 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
276 viewMenu->Add( contrastModeSubMenu );
277
279
280#ifdef __APPLE__
281 viewMenu->AppendSeparator();
282#endif
283
284 //-- Place Menu ----------------------------------------------------------
285 //
286 ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
287
288 placeMenu->Add( PCB_ACTIONS::placeFootprint );
289 placeMenu->Add( PCB_ACTIONS::drawVia );
290 placeMenu->Add( PCB_ACTIONS::drawZone );
291 placeMenu->Add( PCB_ACTIONS::drawRuleArea );
292
293 ACTION_MENU* muwaveSubmenu = new ACTION_MENU( false, selTool );
294 muwaveSubmenu->SetTitle( _( "Draw Microwave Shapes" ) );
295 muwaveSubmenu->SetIcon( BITMAPS::mw_add_line );
296 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateLine );
297 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateGap );
298 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStub );
301 placeMenu->Add( muwaveSubmenu );
302
303 placeMenu->AppendSeparator();
304 placeMenu->Add( PCB_ACTIONS::drawLine );
305 placeMenu->Add( PCB_ACTIONS::drawArc );
306 placeMenu->Add( PCB_ACTIONS::drawRectangle );
307 placeMenu->Add( PCB_ACTIONS::drawCircle );
308 placeMenu->Add( PCB_ACTIONS::drawPolygon );
309 placeMenu->Add( PCB_ACTIONS::drawBezier );
311 placeMenu->Add( PCB_ACTIONS::placeText );
312 placeMenu->Add( PCB_ACTIONS::drawTextBox );
313 placeMenu->Add( PCB_ACTIONS::drawTable );
314
315 placeMenu->AppendSeparator();
316 ACTION_MENU* dimensionSubmenu = new ACTION_MENU( false, selTool );
317 dimensionSubmenu->SetTitle( _( "Draw Dimensions" ) );
318 dimensionSubmenu->SetIcon( BITMAPS::add_aligned_dimension );
319 dimensionSubmenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
320 dimensionSubmenu->Add( PCB_ACTIONS::drawAlignedDimension );
321 dimensionSubmenu->Add( PCB_ACTIONS::drawCenterDimension );
322 dimensionSubmenu->Add( PCB_ACTIONS::drawRadialDimension );
323 dimensionSubmenu->Add( PCB_ACTIONS::drawLeader );
324 placeMenu->Add( dimensionSubmenu );
325
326 placeMenu->AppendSeparator();
328 placeMenu->Add( PCB_ACTIONS::placeStackup );
329
330 placeMenu->AppendSeparator();
331 placeMenu->Add( PCB_ACTIONS::drillOrigin );
333 placeMenu->Add( ACTIONS::gridSetOrigin );
334 placeMenu->Add( ACTIONS::gridResetOrigin );
335
336 placeMenu->AppendSeparator();
337 ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
338 autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
339 autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
340
343
344 placeMenu->Add( autoplaceSubmenu );
345
346 //-- Route Menu ----------------------------------------------------------
347 //
348 ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
349
350 routeMenu->Add( PCB_ACTIONS::selectLayerPair );
351
352 routeMenu->AppendSeparator();
354 routeMenu->Add( PCB_ACTIONS::routeDiffPair );
355
356 routeMenu->AppendSeparator();
357 routeMenu->Add( PCB_ACTIONS::tuneSingleTrack );
358 routeMenu->Add( PCB_ACTIONS::tuneDiffPair );
359 routeMenu->Add( PCB_ACTIONS::tuneSkew );
360
361 routeMenu->AppendSeparator();
363
364
365 //-- Inspect Menu --------------------------------------------------------
366 //
367 ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
368
369 inspectMenu->Add( PCB_ACTIONS::boardStatistics );
370 inspectMenu->Add( ACTIONS::measureTool );
371
372 inspectMenu->AppendSeparator();
373 inspectMenu->Add( PCB_ACTIONS::runDRC );
374 inspectMenu->Add( ACTIONS::prevMarker );
375 inspectMenu->Add( ACTIONS::nextMarker );
376 inspectMenu->Add( ACTIONS::excludeMarker );
377
378 inspectMenu->AppendSeparator();
379 inspectMenu->Add( PCB_ACTIONS::inspectClearance );
380 inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
382 inspectMenu->Add( PCB_ACTIONS::diffFootprint );
383
384
385 //-- Tools menu ----------------------------------------------------------
386 //
387 ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
388
389 toolsMenu->Add( ACTIONS::updatePcbFromSchematic )->Enable( !Kiface().IsSingle() );
390 toolsMenu->Add( PCB_ACTIONS::showEeschema );
391
392 if( !Kiface().IsSingle() )
393 toolsMenu->Add( ACTIONS::showProjectManager );
394
395 toolsMenu->Add( ACTIONS::showCalculatorTools );
396
397 toolsMenu->AppendSeparator();
398 toolsMenu->Add( ACTIONS::showFootprintEditor );
400
401 //Zones management
402 toolsMenu->AppendSeparator();
403 toolsMenu->Add( PCB_ACTIONS::zonesManager );
404
405 if( ADVANCED_CFG::GetCfg().m_EnableGenerators )
406 {
407 toolsMenu->AppendSeparator();
409 toolsMenu->Add( PCB_ACTIONS::regenerateAll );
411 }
412
413 toolsMenu->AppendSeparator();
416 toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
417 toolsMenu->Add( PCB_ACTIONS::repairBoard );
418
419 toolsMenu->AppendSeparator();
420 toolsMenu->Add( PCB_ACTIONS::boardReannotate );
421 toolsMenu->Add( ACTIONS::updateSchematicFromPcb )->Enable( !Kiface().IsSingle() );
422
423 if( SCRIPTING::IsWxAvailable() )
424 {
425 toolsMenu->AppendSeparator();
427 }
428
429 ACTION_MENU* multichannelSubmenu = new ACTION_MENU( false, selTool );
430 multichannelSubmenu->SetTitle( _( "Multi-Channel" ) );
431 multichannelSubmenu->SetIcon( BITMAPS::mode_module );
432 multichannelSubmenu->Add( PCB_ACTIONS::generatePlacementRuleAreas );
433 multichannelSubmenu->Add( PCB_ACTIONS::repeatLayout );
434
435 toolsMenu->Add( multichannelSubmenu );
436
437 ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
438 submenuActionPlugins->SetTitle( _( "External Plugins" ) );
439 submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
440
441 submenuActionPlugins->Add( ACTIONS::pluginsReload );
442 submenuActionPlugins->Add( PCB_ACTIONS::pluginsShowFolder );
443
444 // Populate the Action Plugin sub-menu: Must be done before Add
445 // Since the object is cloned by Add
446 submenuActionPlugins->AppendSeparator();
447 buildActionPluginMenus( submenuActionPlugins );
448
449 toolsMenu->AppendSeparator();
450 toolsMenu->Add( submenuActionPlugins );
451
452 //-- Preferences menu ----------------------------------------------------
453 //
454 ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
455
456 prefsMenu->Add( ACTIONS::configurePaths );
458
459 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
461
462 prefsMenu->Add( ACTIONS::openPreferences );
463
464 prefsMenu->AppendSeparator();
465 AddMenuLanguageList( prefsMenu, selTool );
466
467
468 //--MenuBar -----------------------------------------------------------
469 //
470 menuBar->Append( fileMenu, _( "&File" ) );
471 menuBar->Append( editMenu, _( "&Edit" ) );
472 menuBar->Append( viewMenu, _( "&View" ) );
473 menuBar->Append( placeMenu, _( "&Place" ) );
474 menuBar->Append( routeMenu, _( "Ro&ute" ) );
475 menuBar->Append( inspectMenu, _( "&Inspect" ) );
476 menuBar->Append( toolsMenu, _( "&Tools" ) );
477 menuBar->Append( prefsMenu, _( "P&references" ) );
478 AddStandardHelpMenu( menuBar );
479
480 SetMenuBar( menuBar );
481 delete oldMenuBar;
482
483}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION showCalculatorTools
Definition: actions.h:260
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:261
static TOOL_ACTION paste
Definition: actions.h:80
static TOOL_ACTION excludeMarker
Definition: actions.h:128
static TOOL_ACTION nextMarker
Definition: actions.h:127
static TOOL_ACTION zoomRedraw
Definition: actions.h:131
static TOOL_ACTION unselectAll
Definition: actions.h:83
static TOOL_ACTION revert
Definition: actions.h:62
static TOOL_ACTION show3DViewer
Definition: actions.h:255
static TOOL_ACTION zoomOutCenter
Definition: actions.h:135
static TOOL_ACTION saveAs
Definition: actions.h:59
static TOOL_ACTION copy
Definition: actions.h:78
static TOOL_ACTION pluginsReload
Definition: actions.h:291
static TOOL_ACTION gridResetOrigin
Definition: actions.h:193
static TOOL_ACTION pasteSpecial
Definition: actions.h:81
static TOOL_ACTION zoomFitSelection
Definition: actions.h:143
static TOOL_ACTION openPreferences
Definition: actions.h:277
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:280
static TOOL_ACTION plot
Definition: actions.h:65
static TOOL_ACTION open
Definition: actions.h:57
static TOOL_ACTION pageSettings
Definition: actions.h:63
static TOOL_ACTION showSearch
Definition: actions.h:115
static TOOL_ACTION undo
Definition: actions.h:75
static TOOL_ACTION prevMarker
Definition: actions.h:126
static TOOL_ACTION highContrastMode
Definition: actions.h:152
static TOOL_ACTION gridOrigin
Definition: actions.h:198
static TOOL_ACTION measureTool
Definition: actions.h:249
static TOOL_ACTION doDelete
Definition: actions.h:85
static TOOL_ACTION save
Definition: actions.h:58
static TOOL_ACTION zoomFitScreen
Definition: actions.h:141
static TOOL_ACTION redo
Definition: actions.h:76
static TOOL_ACTION deleteTool
Definition: actions.h:86
static TOOL_ACTION zoomTool
Definition: actions.h:145
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:262
static TOOL_ACTION showDesignBlockLibTable
Definition: actions.h:281
static TOOL_ACTION showFootprintEditor
Definition: actions.h:259
static TOOL_ACTION print
Definition: actions.h:64
static TOOL_ACTION showProperties
Definition: actions.h:263
static TOOL_ACTION doNew
Definition: actions.h:54
static TOOL_ACTION zoomFitObjects
Definition: actions.h:142
static TOOL_ACTION zoomInCenter
Definition: actions.h:134
static TOOL_ACTION saveCopy
Definition: actions.h:60
static TOOL_ACTION cut
Definition: actions.h:77
static TOOL_ACTION gridSetOrigin
Definition: actions.h:192
static TOOL_ACTION configurePaths
Definition: actions.h:278
static TOOL_ACTION showProjectManager
Definition: actions.h:254
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:258
static TOOL_ACTION selectAll
Definition: actions.h:82
static TOOL_ACTION find
Definition: actions.h:116
Define the structure of a menu based on ACTIONs.
Definition: action_menu.h:49
void AddQuitOrClose(KIFACE_BASE *aKiface, wxString aAppname="")
Add either a standard Quit or Close item to the menu.
static constexpr bool CHECK
Definition: action_menu.h:201
ACTION_MENU * Clone() const
Create a deep, recursive copy of this ACTION_MENU.
void SetTitle(const wxString &aTitle) override
Set title for the menu.
Definition: action_menu.cpp:92
static constexpr bool NORMAL
Definition: action_menu.h:200
void SetIcon(BITMAPS aIcon)
Assign an icon for the entry.
Definition: action_menu.cpp:78
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.
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...
Definition: file_history.h:43
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.
Definition: file_history.h:98
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:433
static TOOL_ACTION drawRuleArea
Definition: pcb_actions.h:211
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:528
static TOOL_ACTION drawBezier
Definition: pcb_actions.h:194
static TOOL_ACTION placeText
Definition: pcb_actions.h:196
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:443
static TOOL_ACTION zonesManager
Definition: pcb_actions.h:454
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:423
static TOOL_ACTION drawOrthogonalDimension
Definition: pcb_actions.h:207
static TOOL_ACTION drawRectangle
Definition: pcb_actions.h:191
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:319
static TOOL_ACTION placeReferenceImage
Definition: pcb_actions.h:195
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:260
static TOOL_ACTION exportGenCAD
Definition: pcb_actions.h:425
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:392
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:451
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:417
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:192
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:245
static TOOL_ACTION exportVRML
Definition: pcb_actions.h:426
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:422
static TOOL_ACTION tuneDiffPair
Definition: pcb_actions.h:248
static TOOL_ACTION exportCmpFile
Definition: pcb_actions.h:429
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:414
static TOOL_ACTION generateIPC2581File
Definition: pcb_actions.h:420
static TOOL_ACTION drawTable
Definition: pcb_actions.h:198
static TOOL_ACTION drawTextBox
Definition: pcb_actions.h:197
static TOOL_ACTION generateODBPPFile
Definition: pcb_actions.h:421
static TOOL_ACTION repeatLayout
Definition: pcb_actions.h:600
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:365
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:190
static TOOL_ACTION openNonKicadBoard
Definition: pcb_actions.h:407
static TOOL_ACTION zoneDisplayFilled
Definition: pcb_actions.h:321
static TOOL_ACTION drawRadialDimension
Definition: pcb_actions.h:206
static TOOL_ACTION tuneSingleTrack
Definition: pcb_actions.h:247
static TOOL_ACTION cleanupTracksAndVias
Definition: pcb_actions.h:437
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:320
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:434
static TOOL_ACTION drawLeader
Definition: pcb_actions.h:208
static TOOL_ACTION drillResetOrigin
Definition: pcb_actions.h:551
static TOOL_ACTION placeCharacteristics
Definition: pcb_actions.h:214
static TOOL_ACTION pluginsShowFolder
Scripting Actions.
Definition: pcb_actions.h:402
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:585
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:364
static TOOL_ACTION inspectConstraints
Definition: pcb_actions.h:559
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:418
static TOOL_ACTION globalDeletions
Definition: pcb_actions.h:436
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:550
static TOOL_ACTION tuneSkew
Definition: pcb_actions.h:249
static TOOL_ACTION repairBoard
Definition: pcb_actions.h:556
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:318
static TOOL_ACTION exportSTEP
Definition: pcb_actions.h:428
static TOOL_ACTION showNetInspector
Definition: pcb_actions.h:452
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:180
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:532
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:416
static TOOL_ACTION inspectClearance
Definition: pcb_actions.h:558
static TOOL_ACTION generatorsShowManager
Definition: pcb_actions.h:283
static TOOL_ACTION zoneDisplayTriangulated
Definition: pcb_actions.h:324
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:419
static TOOL_ACTION updateFootprints
Definition: pcb_actions.h:440
static TOOL_ACTION exportHyperlynx
Definition: pcb_actions.h:430
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:586
static TOOL_ACTION placeImportedGraphics
Definition: pcb_actions.h:217
static TOOL_ACTION removeUnusedPads
Definition: pcb_actions.h:444
static TOOL_ACTION zoneDisplayFractured
Definition: pcb_actions.h:323
static TOOL_ACTION drawVia
Definition: pcb_actions.h:210
static TOOL_ACTION regenerateAll
Definition: pcb_actions.h:274
static TOOL_ACTION drawArc
Definition: pcb_actions.h:193
static TOOL_ACTION exportIDF
Definition: pcb_actions.h:427
static TOOL_ACTION runDRC
Definition: pcb_actions.h:446
static TOOL_ACTION regenerateAllTuning
Generator tool.
Definition: pcb_actions.h:273
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
Definition: pcb_actions.h:511
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:411
static TOOL_ACTION generatePlacementRuleAreas
Definition: pcb_actions.h:601
static TOOL_ACTION diffFootprint
Definition: pcb_actions.h:560
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:442
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:409
static TOOL_ACTION showEeschema
Definition: pcb_actions.h:553
static TOOL_ACTION showDesignBlockPanel
Definition: pcb_actions.h:460
static TOOL_ACTION drawCenterDimension
Definition: pcb_actions.h:205
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:395
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:405
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:530
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:536
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:374
static TOOL_ACTION zoneDisplayOutline
Definition: pcb_actions.h:322
static TOOL_ACTION showFootprintAssociations
Definition: pcb_actions.h:561
static TOOL_ACTION textOutlines
Display texts as lines.
Definition: pcb_actions.h:514
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:534
static TOOL_ACTION boardReannotate
Definition: pcb_actions.h:555
static TOOL_ACTION regenerateSelected
Definition: pcb_actions.h:275
static TOOL_ACTION exportFootprints
Definition: pcb_actions.h:408
static TOOL_ACTION placeFootprint
Definition: pcb_actions.h:216
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Definition: pcb_actions.h:242
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:554
static TOOL_ACTION editTeardrops
Definition: pcb_actions.h:435
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:453
static TOOL_ACTION drawLine
Definition: pcb_actions.h:189
static TOOL_ACTION placeStackup
Definition: pcb_actions.h:215
static TOOL_ACTION cleanupGraphics
Definition: pcb_actions.h:438
static TOOL_ACTION drawAlignedDimension
Definition: pcb_actions.h:204
static TOOL_ACTION drawZone
Definition: pcb_actions.h:209
static TOOL_ACTION rescueAutosave
Definition: pcb_actions.h:406
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:413
void doReCreateMenuBar() override
void buildActionPluginMenus(ACTION_MENU *aActionMenu)
Fill action menu with all registered action plugins.
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
The selection tool: currently supports:
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:171
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition: wx_menubar.h:47
#define _(s)
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)