KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 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( _( "Resc&ue" ),
105 _( "Clear board and get last rescue file automatically saved by PCB editor" ),
107 BITMAPS::rescue );
108
109 // Import submenu
110 ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
111 submenuImport->SetTitle( _( "Import" ) );
112 submenuImport->SetIcon( BITMAPS::import );
113
114 submenuImport->Add( PCB_ACTIONS::importNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
115 submenuImport->Add( PCB_ACTIONS::importSpecctraSession, ACTION_MENU::NORMAL, _( "Specctra Session..." ) );
116 submenuImport->Add( PCB_ACTIONS::placeImportedGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
117 submenuImport->Add( _( "Non-KiCad Board File..." ),
118 _( "Import board file from other applications" ),
119 ID_IMPORT_NON_KICAD_BOARD, BITMAPS::import_brd_file );
120
121 fileMenu->AppendSeparator();
122 fileMenu->Add( submenuImport );
123
124 // Export submenu
125 ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
126 submenuExport->SetTitle( _( "Export" ) );
127 submenuExport->SetIcon( BITMAPS::export_file );
128
129 submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN, ACTION_MENU::NORMAL, _( "Specctra DSN..." ) );
130 submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
131 ID_GEN_EXPORT_FILE_GENCADFORMAT, BITMAPS::post_gencad );
132 submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
133 ID_GEN_EXPORT_FILE_VRML, BITMAPS::export3d );
134 submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
135 ID_GEN_EXPORT_FILE_IDF3, BITMAPS::export_idf );
136 submenuExport->Add( _( "STEP / GLB / BREP / XAO / PLY / STL..." ),
137 _( "Export STEP / GLB / BREP / XAO / PLY / STL 3D board representation" ),
138 ID_GEN_EXPORT_FILE_STEP, BITMAPS::export_step );
139 submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
140 _( "Export footprint association file (*.cmp) for schematic back annotation" ),
141 ID_PCB_GEN_CMP_FILE, BITMAPS::export_cmp );
142 submenuExport->Add( _( "Hyperlynx..." ), wxEmptyString,
143 ID_GEN_EXPORT_FILE_HYPERLYNX, BITMAPS::export_step );
144
145 if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
146 submenuExport->Add( *m_exportNetlistAction );
147
148 submenuExport->AppendSeparator();
149 submenuExport->Add( _( "Footprints to Library..." ),
150 _( "Add footprints used on board to an existing footprint library\n"
151 "(does not remove other footprints from this library)" ),
152 ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY, BITMAPS::library_archive );
153
154 submenuExport->Add( _( "Footprints to New Library..." ),
155 _( "Create a new footprint library containing the footprints used on board\n"
156 "(if the library already exists it will be replaced)" ),
157 ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY, BITMAPS::library_archive_as );
158
159 fileMenu->Add( submenuExport );
160
161 // Fabrication Outputs submenu
162 ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false, selTool );
163 submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
164 submenuFabOutputs->SetIcon( BITMAPS::fabrication );
165
166 submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
167 submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
168 submenuFabOutputs->Add( PCB_ACTIONS::generateIPC2581File );
169 submenuFabOutputs->Add( PCB_ACTIONS::generateODBPPFile );
170
171 submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
172 submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
173 submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
174 submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
175 fileMenu->Add( submenuFabOutputs );
176
177 fileMenu->AppendSeparator();
178 fileMenu->Add( PCB_ACTIONS::boardSetup );
179
180 fileMenu->AppendSeparator();
181 fileMenu->Add( ACTIONS::pageSettings );
182 fileMenu->Add( ACTIONS::print );
183 fileMenu->Add( ACTIONS::plot );
184
185 fileMenu->AppendSeparator();
186 fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
187
188 //-- Edit menu -----------------------------------------------------------
189 //
190 ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
191
192 editMenu->Add( ACTIONS::undo );
193 editMenu->Add( ACTIONS::redo );
194
195 editMenu->AppendSeparator();
196 editMenu->Add( ACTIONS::cut );
197 editMenu->Add( ACTIONS::copy );
198 editMenu->Add( ACTIONS::paste );
199 editMenu->Add( ACTIONS::pasteSpecial );
200 editMenu->Add( ACTIONS::doDelete );
201
202 editMenu->AppendSeparator();
203 editMenu->Add( ACTIONS::selectAll );
204 editMenu->Add( ACTIONS::unselectAll );
205
206 editMenu->AppendSeparator();
207 editMenu->Add( ACTIONS::find );
208
209 editMenu->AppendSeparator();
212 editMenu->Add( PCB_ACTIONS::editTeardrops );
214 editMenu->Add( PCB_ACTIONS::swapLayers );
215 editMenu->Add( ACTIONS::gridOrigin );
216
217 editMenu->AppendSeparator();
218 editMenu->Add( PCB_ACTIONS::zoneFillAll );
219 editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
221
222 editMenu->AppendSeparator();
223 editMenu->Add( ACTIONS::deleteTool );
225
226
227 //----- View menu -----------------------------------------------------------
228 //
229 ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
230
231 ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
232 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::zoomTool );
253 viewMenu->Add( ACTIONS::zoomRedraw );
254
255 viewMenu->AppendSeparator();
256 // Drawing Mode Submenu
257 ACTION_MENU* drawingModeSubMenu = new ACTION_MENU( false, selTool );
258 drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
259 drawingModeSubMenu->SetIcon( BITMAPS::add_zone );
260
263
264 if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
265 {
268 }
269
270 drawingModeSubMenu->AppendSeparator();
271 drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
272 drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
274
275 drawingModeSubMenu->AppendSeparator();
277 drawingModeSubMenu->Add( PCB_ACTIONS::textOutlines, ACTION_MENU::CHECK );
278
279 viewMenu->Add( drawingModeSubMenu );
280
281 // Contrast Mode Submenu
282 ACTION_MENU* contrastModeSubMenu = new ACTION_MENU( false, selTool );
283 contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
284 contrastModeSubMenu->SetIcon( BITMAPS::contrast_mode );
285
286 contrastModeSubMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
287 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaDec );
288 contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
289 viewMenu->Add( contrastModeSubMenu );
290
292
293#ifdef __APPLE__
294 viewMenu->AppendSeparator();
295#endif
296
297 //-- Place Menu ----------------------------------------------------------
298 //
299 ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
300
301 placeMenu->Add( PCB_ACTIONS::placeFootprint );
302 placeMenu->Add( PCB_ACTIONS::drawVia );
303 placeMenu->Add( PCB_ACTIONS::drawZone );
304 placeMenu->Add( PCB_ACTIONS::drawRuleArea );
305
306 ACTION_MENU* muwaveSubmenu = new ACTION_MENU( false, selTool );
307 muwaveSubmenu->SetTitle( _( "Draw Microwave Shapes" ) );
308 muwaveSubmenu->SetIcon( BITMAPS::mw_add_line );
309 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateLine );
310 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateGap );
311 muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStub );
314 placeMenu->Add( muwaveSubmenu );
315
316 placeMenu->AppendSeparator();
317 placeMenu->Add( PCB_ACTIONS::drawLine );
318 placeMenu->Add( PCB_ACTIONS::drawArc );
319 placeMenu->Add( PCB_ACTIONS::drawRectangle );
320 placeMenu->Add( PCB_ACTIONS::drawCircle );
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
328 placeMenu->AppendSeparator();
329 ACTION_MENU* dimensionSubmenu = new ACTION_MENU( false, selTool );
330 dimensionSubmenu->SetTitle( _( "Draw Dimensions" ) );
331 dimensionSubmenu->SetIcon( BITMAPS::add_aligned_dimension );
332 dimensionSubmenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
333 dimensionSubmenu->Add( PCB_ACTIONS::drawAlignedDimension );
334 dimensionSubmenu->Add( PCB_ACTIONS::drawCenterDimension );
335 dimensionSubmenu->Add( PCB_ACTIONS::drawRadialDimension );
336 dimensionSubmenu->Add( PCB_ACTIONS::drawLeader );
337 placeMenu->Add( dimensionSubmenu );
338
339 placeMenu->AppendSeparator();
341 placeMenu->Add( PCB_ACTIONS::placeStackup );
342
343 placeMenu->AppendSeparator();
344 placeMenu->Add( PCB_ACTIONS::drillOrigin );
346 placeMenu->Add( ACTIONS::gridSetOrigin );
347 placeMenu->Add( ACTIONS::gridResetOrigin );
348
349 placeMenu->AppendSeparator();
350 ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
351 autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
352 autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
353
356
357 placeMenu->Add( autoplaceSubmenu );
358
359 //-- Route Menu ----------------------------------------------------------
360 //
361 ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
362
363 routeMenu->Add( PCB_ACTIONS::selectLayerPair );
364
365 routeMenu->AppendSeparator();
367 routeMenu->Add( PCB_ACTIONS::routeDiffPair );
368
369 routeMenu->AppendSeparator();
370 routeMenu->Add( PCB_ACTIONS::tuneSingleTrack );
371 routeMenu->Add( PCB_ACTIONS::tuneDiffPair );
372 routeMenu->Add( PCB_ACTIONS::tuneSkew );
373
374 routeMenu->AppendSeparator();
376
377
378 //-- Inspect Menu --------------------------------------------------------
379 //
380 ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
381
382 inspectMenu->Add( PCB_ACTIONS::boardStatistics );
383 inspectMenu->Add( ACTIONS::measureTool );
384
385 inspectMenu->AppendSeparator();
386 inspectMenu->Add( PCB_ACTIONS::runDRC );
387 inspectMenu->Add( ACTIONS::prevMarker );
388 inspectMenu->Add( ACTIONS::nextMarker );
389 inspectMenu->Add( ACTIONS::excludeMarker );
390
391 inspectMenu->AppendSeparator();
392 inspectMenu->Add( PCB_ACTIONS::inspectClearance );
393 inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
395 inspectMenu->Add( PCB_ACTIONS::diffFootprint );
396
397
398 //-- Tools menu ----------------------------------------------------------
399 //
400 ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
401
402 wxMenuItem* update = toolsMenu->Add( ACTIONS::updatePcbFromSchematic );
403 update->Enable( !Kiface().IsSingle() );
404
405 toolsMenu->Add( PCB_ACTIONS::showEeschema );
406
407 if( !Kiface().IsSingle() )
408 toolsMenu->Add( ACTIONS::showProjectManager );
409
410 toolsMenu->AppendSeparator();
411 toolsMenu->Add( ACTIONS::showFootprintEditor );
413
414 //Zones management
415 toolsMenu->AppendSeparator();
416 toolsMenu->Add( PCB_ACTIONS::zonesManager );
417
418 if( ADVANCED_CFG::GetCfg().m_EnableGenerators )
419 {
420 toolsMenu->AppendSeparator();
422 toolsMenu->Add( PCB_ACTIONS::regenerateAll );
424 }
425
426 toolsMenu->AppendSeparator();
429 toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
430 toolsMenu->Add( PCB_ACTIONS::repairBoard );
431
432 toolsMenu->AppendSeparator();
433 toolsMenu->Add( PCB_ACTIONS::boardReannotate );
434 update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
435 update->Enable( !Kiface().IsSingle() );
436
437 if( SCRIPTING::IsWxAvailable() )
438 {
439 toolsMenu->AppendSeparator();
441 }
442
443 ACTION_MENU* multichannelSubmenu = new ACTION_MENU( false, selTool );
444 multichannelSubmenu->SetTitle( _( "Multi-Channel" ) );
445 multichannelSubmenu->SetIcon( BITMAPS::mode_module );
446 multichannelSubmenu->Add( PCB_ACTIONS::generatePlacementRuleAreas );
447 multichannelSubmenu->Add( PCB_ACTIONS::repeatLayout );
448
449 toolsMenu->Add( multichannelSubmenu );
450
451 ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
452 submenuActionPlugins->SetTitle( _( "External Plugins" ) );
453 submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
454
455 submenuActionPlugins->Add( ACTIONS::pluginsReload );
456 submenuActionPlugins->Add( PCB_ACTIONS::pluginsShowFolder );
457
458 // Populate the Action Plugin sub-menu: Must be done before Add
459 // Since the object is cloned by Add
460 submenuActionPlugins->AppendSeparator();
461 buildActionPluginMenus( submenuActionPlugins );
462
463 toolsMenu->AppendSeparator();
464 toolsMenu->Add( submenuActionPlugins );
465
466 //-- Preferences menu ----------------------------------------------------
467 //
468 ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
469
470 prefsMenu->Add( ACTIONS::configurePaths );
472 if( ADVANCED_CFG::GetCfg().m_EnablePcbDesignBlocks )
474 prefsMenu->Add( ACTIONS::openPreferences );
475
476 prefsMenu->AppendSeparator();
477 AddMenuLanguageList( prefsMenu, selTool );
478
479
480 //--MenuBar -----------------------------------------------------------
481 //
482 menuBar->Append( fileMenu, _( "&File" ) );
483 menuBar->Append( editMenu, _( "&Edit" ) );
484 menuBar->Append( viewMenu, _( "&View" ) );
485 menuBar->Append( placeMenu, _( "&Place" ) );
486 menuBar->Append( routeMenu, _( "Ro&ute" ) );
487 menuBar->Append( inspectMenu, _( "&Inspect" ) );
488 menuBar->Append( toolsMenu, _( "&Tools" ) );
489 menuBar->Append( prefsMenu, _( "P&references" ) );
490 AddStandardHelpMenu( menuBar );
491
492 SetMenuBar( menuBar );
493 delete oldMenuBar;
494
495}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:218
static TOOL_ACTION paste
Definition: actions.h:73
static TOOL_ACTION excludeMarker
Definition: actions.h:121
static TOOL_ACTION nextMarker
Definition: actions.h:120
static TOOL_ACTION zoomRedraw
Definition: actions.h:124
static TOOL_ACTION unselectAll
Definition: actions.h:76
static TOOL_ACTION revert
Definition: actions.h:55
static TOOL_ACTION show3DViewer
Definition: actions.h:213
static TOOL_ACTION zoomOutCenter
Definition: actions.h:128
static TOOL_ACTION saveAs
Definition: actions.h:52
static TOOL_ACTION copy
Definition: actions.h:71
static TOOL_ACTION pluginsReload
Definition: actions.h:245
static TOOL_ACTION gridResetOrigin
Definition: actions.h:189
static TOOL_ACTION pasteSpecial
Definition: actions.h:74
static TOOL_ACTION openPreferences
Definition: actions.h:231
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:234
static TOOL_ACTION plot
Definition: actions.h:58
static TOOL_ACTION open
Definition: actions.h:50
static TOOL_ACTION pageSettings
Definition: actions.h:56
static TOOL_ACTION showSearch
Definition: actions.h:108
static TOOL_ACTION undo
Definition: actions.h:68
static TOOL_ACTION prevMarker
Definition: actions.h:119
static TOOL_ACTION highContrastMode
Definition: actions.h:145
static TOOL_ACTION gridOrigin
Definition: actions.h:194
static TOOL_ACTION measureTool
Definition: actions.h:207
static TOOL_ACTION doDelete
Definition: actions.h:78
static TOOL_ACTION save
Definition: actions.h:51
static TOOL_ACTION zoomFitScreen
Definition: actions.h:134
static TOOL_ACTION redo
Definition: actions.h:69
static TOOL_ACTION deleteTool
Definition: actions.h:79
static TOOL_ACTION zoomTool
Definition: actions.h:138
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:219
static TOOL_ACTION showDesignBlockLibTable
Definition: actions.h:235
static TOOL_ACTION showFootprintEditor
Definition: actions.h:217
static TOOL_ACTION print
Definition: actions.h:57
static TOOL_ACTION showProperties
Definition: actions.h:220
static TOOL_ACTION doNew
Definition: actions.h:47
static TOOL_ACTION zoomFitObjects
Definition: actions.h:135
static TOOL_ACTION zoomInCenter
Definition: actions.h:127
static TOOL_ACTION saveCopy
Definition: actions.h:53
static TOOL_ACTION cut
Definition: actions.h:70
static TOOL_ACTION gridSetOrigin
Definition: actions.h:188
static TOOL_ACTION configurePaths
Definition: actions.h:232
static TOOL_ACTION showProjectManager
Definition: actions.h:212
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:216
static TOOL_ACTION selectAll
Definition: actions.h:75
static TOOL_ACTION find
Definition: actions.h:109
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.
void SetMenuBar(wxMenuBar *menu_bar) override
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:426
static TOOL_ACTION drawRuleArea
Definition: pcb_actions.h:224
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:533
static TOOL_ACTION drawBezier
Definition: pcb_actions.h:207
static TOOL_ACTION placeText
Definition: pcb_actions.h:209
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:436
static TOOL_ACTION zonesManager
Definition: pcb_actions.h:461
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:451
static TOOL_ACTION drawOrthogonalDimension
Definition: pcb_actions.h:220
static TOOL_ACTION drawRectangle
Definition: pcb_actions.h:204
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:341
static TOOL_ACTION placeReferenceImage
Definition: pcb_actions.h:208
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:273
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:412
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:458
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:445
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:205
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:258
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:450
static TOOL_ACTION tuneDiffPair
Definition: pcb_actions.h:261
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:442
static TOOL_ACTION generateIPC2581File
Definition: pcb_actions.h:448
static TOOL_ACTION drawTable
Definition: pcb_actions.h:211
static TOOL_ACTION drawTextBox
Definition: pcb_actions.h:210
static TOOL_ACTION generateODBPPFile
Definition: pcb_actions.h:449
static TOOL_ACTION repeatLayout
Definition: pcb_actions.h:612
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:387
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:203
static TOOL_ACTION zoneDisplayFilled
Definition: pcb_actions.h:343
static TOOL_ACTION drawRadialDimension
Definition: pcb_actions.h:219
static TOOL_ACTION tuneSingleTrack
Definition: pcb_actions.h:260
static TOOL_ACTION cleanupTracksAndVias
Definition: pcb_actions.h:430
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:342
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:427
static TOOL_ACTION drawLeader
Definition: pcb_actions.h:221
static TOOL_ACTION drillResetOrigin
Definition: pcb_actions.h:563
static TOOL_ACTION placeCharacteristics
Definition: pcb_actions.h:227
static TOOL_ACTION pluginsShowFolder
Scripting Actions.
Definition: pcb_actions.h:422
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:597
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:386
static TOOL_ACTION inspectConstraints
Definition: pcb_actions.h:572
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:446
static TOOL_ACTION globalDeletions
Definition: pcb_actions.h:429
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:562
static TOOL_ACTION tuneSkew
Definition: pcb_actions.h:262
static TOOL_ACTION repairBoard
Definition: pcb_actions.h:569
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:340
static TOOL_ACTION showNetInspector
Definition: pcb_actions.h:459
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:193
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:537
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:444
static TOOL_ACTION inspectClearance
Definition: pcb_actions.h:571
static TOOL_ACTION generatorsShowManager
Definition: pcb_actions.h:296
static TOOL_ACTION zoneDisplayTriangulated
Definition: pcb_actions.h:346
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:447
static TOOL_ACTION updateFootprints
Definition: pcb_actions.h:433
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:598
static TOOL_ACTION placeImportedGraphics
Definition: pcb_actions.h:230
static TOOL_ACTION removeUnusedPads
Definition: pcb_actions.h:437
static TOOL_ACTION zoneDisplayFractured
Definition: pcb_actions.h:345
static TOOL_ACTION drawVia
Definition: pcb_actions.h:223
static TOOL_ACTION regenerateAll
Definition: pcb_actions.h:287
static TOOL_ACTION drawArc
Definition: pcb_actions.h:206
static TOOL_ACTION runDRC
Definition: pcb_actions.h:453
static TOOL_ACTION regenerateAllTuning
Generator tool.
Definition: pcb_actions.h:286
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
Definition: pcb_actions.h:516
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:439
static TOOL_ACTION generatePlacementRuleAreas
Definition: pcb_actions.h:613
static TOOL_ACTION diffFootprint
Definition: pcb_actions.h:573
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:435
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:425
static TOOL_ACTION showEeschema
Definition: pcb_actions.h:566
static TOOL_ACTION showDesignBlockPanel
Definition: pcb_actions.h:465
static TOOL_ACTION drawCenterDimension
Definition: pcb_actions.h:218
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:415
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:565
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:535
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:541
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:396
static TOOL_ACTION zoneDisplayOutline
Definition: pcb_actions.h:344
static TOOL_ACTION showFootprintAssociations
Definition: pcb_actions.h:574
static TOOL_ACTION textOutlines
Display texts as lines.
Definition: pcb_actions.h:519
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:539
static TOOL_ACTION boardReannotate
Definition: pcb_actions.h:568
static TOOL_ACTION regenerateSelected
Definition: pcb_actions.h:288
static TOOL_ACTION placeFootprint
Definition: pcb_actions.h:229
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Definition: pcb_actions.h:255
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:567
static TOOL_ACTION editTeardrops
Definition: pcb_actions.h:428
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:460
static TOOL_ACTION drawLine
Definition: pcb_actions.h:202
static TOOL_ACTION placeStackup
Definition: pcb_actions.h:228
static TOOL_ACTION cleanupGraphics
Definition: pcb_actions.h:431
static TOOL_ACTION drawAlignedDimension
Definition: pcb_actions.h:217
static TOOL_ACTION drawZone
Definition: pcb_actions.h:222
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:441
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)
@ ID_GEN_EXPORT_FILE_HYPERLYNX
Definition: pcbnew_id.h:87
@ ID_IMPORT_NON_KICAD_BOARD
Definition: pcbnew_id.h:19
@ ID_MENU_RECOVER_BOARD_AUTOSAVE
Definition: pcbnew_id.h:80
@ ID_PCB_GEN_CMP_FILE
Definition: pcbnew_id.h:92
@ ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY
Definition: pcbnew_id.h:82
@ ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY
Definition: pcbnew_id.h:81
@ ID_GEN_EXPORT_FILE_VRML
Definition: pcbnew_id.h:85
@ ID_GEN_EXPORT_FILE_STEP
Definition: pcbnew_id.h:86
@ ID_GEN_EXPORT_FILE_IDF3
Definition: pcbnew_id.h:84
@ ID_GEN_EXPORT_FILE_GENCADFORMAT
Definition: pcbnew_id.h:88
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)