KiCad PCB EDA Suite
menubar_pcb_editor.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
7  * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
27 #include <pcb_edit_frame.h>
28 
29 #include <advanced_config.h>
30 #include <filehistory.h>
31 #include <kiface_i.h>
32 #include <menus_helpers.h>
33 #include <pgm_base.h>
34 #include <tool/tool_manager.h>
35 #include <tool/conditional_menu.h>
36 #include <tool/actions.h>
38 #include <tools/selection_tool.h>
39 #include <tools/pcb_actions.h>
40 #include "help_common_strings.h"
41 #include "pcbnew.h"
42 #include "pcbnew_id.h"
43 
44 
46 {
48  // wxWidgets handles the Mac Application menu behind the scenes, but that means
49  // we always have to start from scratch with a new wxMenuBar.
50  wxMenuBar* oldMenuBar = GetMenuBar();
51  wxMenuBar* menuBar = new wxMenuBar();
52 
53  auto modifiedDocumentCondition = [ this ] ( const SELECTION& sel ) {
54  return IsContentModified();
55  };
56 
57  // Recreate all menus:
58 
59  //-- File menu -----------------------------------------------------------
60  //
61  CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, selTool );
62  static FILE_HISTORY_MENU* openRecentMenu;
63  auto& disp_opt = GetDisplayOptions();
64 
65  if( Kiface().IsSingle() ) // not when under a project mgr
66  {
67  FILE_HISTORY& fileHistory = Kiface().GetFileHistory();
68 
69  // Create the menu if it does not exist. Adding a file to/from the history
70  // will automatically refresh the menu.
71  if( !openRecentMenu )
72  {
73  openRecentMenu = new FILE_HISTORY_MENU( fileHistory );
74  openRecentMenu->SetTool( selTool );
75  openRecentMenu->SetTitle( _( "Open Recent" ) );
76  openRecentMenu->SetIcon( recent_xpm );
77  }
78 
81  fileMenu->AddMenu( openRecentMenu, FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
82 
85  _( "Import Non-KiCad Board File..." ),
86  _( "Import board file from other applications" ),
88 
89  fileMenu->AddSeparator();
90  }
91 
92  fileMenu->AddItem( ACTIONS::save, modifiedDocumentCondition );
93 
94  // Save as menu:
95  // under a project mgr we do not want to modify the board filename
96  // to keep consistency with the project mgr which expects files names same as prj name
97  // for main files
98  if( Kiface().IsSingle() )
100  else
102 
103  fileMenu->AddSeparator();
105  _( "Resc&ue" ),
106  _( "Clear board and get last rescue file automatically saved by Pcbnew" ),
108 
110  _( "Revert to Last Backup" ),
111  _( "Clear board and get previous backup version of board" ),
113 
114  // Import submenu
115  ACTION_MENU* submenuImport = new ACTION_MENU( false );
116  submenuImport->SetTool( selTool );
117  submenuImport->SetTitle( _( "Import" ) );
118  submenuImport->SetIcon( import_xpm );
119 
120  submenuImport->Add( PCB_ACTIONS::importNetlist );
121  submenuImport->Add( PCB_ACTIONS::importSpecctraSession );
122  submenuImport->Add( _( "Graphics..." ), _( "Import 2D drawing file" ),
124 
125  fileMenu->AddSeparator();
126  fileMenu->AddMenu( submenuImport, SELECTION_CONDITIONS::ShowAlways );
127 
128  // Export submenu
129  ACTION_MENU* submenuExport = new ACTION_MENU( false );
130  submenuExport->SetTool( selTool );
131  submenuExport->SetTitle( _( "Export" ) );
132  submenuExport->SetIcon( export_xpm );
133 
134  submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN );
135  submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
137  submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
139  submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
141  submenuExport->Add( _( "STEP..." ), _( "Export STEP 3D board representation" ),
143  submenuExport->Add( _( "SVG..." ), _( "Export SVG board representation" ),
145  submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
146  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
148  submenuExport->Add( _( "Hyperlynx..." ), "",
150 
151  fileMenu->AddMenu( submenuExport, SELECTION_CONDITIONS::ShowAlways );
152 
153  // Fabrication Outputs submenu
154  ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false );
155  submenuFabOutputs->SetTool( selTool );
156  submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
157  submenuFabOutputs->SetIcon( fabrication_xpm );
158 
159  submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
160  submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
161  submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
162  submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
163  submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
164  submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
165 
166  fileMenu->AddMenu( submenuFabOutputs, SELECTION_CONDITIONS::ShowAlways );
167 
168  fileMenu->AddSeparator();
170 
171  fileMenu->AddSeparator();
175 
176  // Archive submenu
177  ACTION_MENU* submenuArchive = new ACTION_MENU( false );
178  submenuArchive->SetTool( selTool );
179  submenuArchive->SetTitle( _( "Archive Footprints" ) );
180  submenuArchive->SetIcon( library_archive_xpm );
181 
182  submenuArchive->Add( _( "&Archive Footprints in Existing Library..." ),
183  _( "Archive all footprints to existing library in footprint Lib table"
184  "(does not remove other footprints in this library)" ),
186 
187  submenuArchive->Add( _( "&Create New Library and Archive Footprints..." ),
188  _( "Archive all footprints to a new library\n"
189  "(if the library already exists it will be replaced)" ),
191 
192  fileMenu->AddSeparator();
193  fileMenu->AddMenu( submenuArchive, SELECTION_CONDITIONS::ShowAlways );
194 
195  fileMenu->AddSeparator();
196  fileMenu->AddQuitOrClose( &Kiface(), _( "Pcbnew" ) );
197 
198  fileMenu->Resolve();
199 
200  //-- Edit menu -----------------------------------------------------------
201  //
202  CONDITIONAL_MENU* editMenu = new CONDITIONAL_MENU( false, selTool );
203 
204  auto enableUndoCondition = [ this ] ( const SELECTION& sel ) {
205  return GetScreen() && GetScreen()->GetUndoCommandCount() > 0;
206  };
207  auto enableRedoCondition = [ this ] ( const SELECTION& sel ) {
208  return GetScreen() && GetScreen()->GetRedoCommandCount() > 0;
209  };
210  auto noActiveToolCondition = [ this ] ( const SELECTION& aSelection ) {
211  return ToolStackIsEmpty();
212  };
213 
214  editMenu->AddItem( ACTIONS::undo, enableUndoCondition );
215  editMenu->AddItem( ACTIONS::redo, enableRedoCondition );
216 
217  editMenu->AddSeparator();
220  editMenu->AddItem( ACTIONS::paste, noActiveToolCondition );
223 
224  editMenu->AddSeparator();
226 
227  editMenu->AddSeparator();
232 
233  editMenu->AddSeparator();
236 
237  editMenu->AddSeparator();
241 
242  editMenu->Resolve();
243 
244  //----- View menu -----------------------------------------------------------
245  //
246  CONDITIONAL_MENU* viewMenu = new CONDITIONAL_MENU( false, selTool );
247 
248  auto layersPaletteShownCondition = [ this ]( const SELECTION &aSel )
249  {
250  return LayerManagerShown();
251  };
252  auto microwaveToolbarShownCondition = [ this ]( const SELECTION &aSel )
253  {
254  return MicrowaveToolbarShown();
255  };
256  auto gridShownCondition = [ this ]( const SELECTION &aSel )
257  {
258  return IsGridVisible();
259  };
260  auto polarCoordsCondition = [ this ]( const SELECTION &aSel )
261  {
262  return GetShowPolarCoords();
263  };
264  auto imperialUnitsCondition = [this]( const SELECTION& aSel ) {
265  return GetUserUnits() == EDA_UNITS::INCHES;
266  };
267  auto metricUnitsCondition = [this]( const SELECTION& aSel ) {
269  };
270  auto fullCrosshairCondition = [ this ]( const SELECTION &aSel )
271  {
273  };
274  auto ratsnestShownCondition = [ &disp_opt ]( const SELECTION &aSel )
275  {
276  return disp_opt.m_ShowGlobalRatsnest;
277  };
278  auto curvedRatsnestCondition = [ &disp_opt ]( const SELECTION &aSel )
279  {
280  return disp_opt.m_DisplayRatsnestLinesCurved;
281  };
282  auto boardFlippedCondition = [ this ]( const SELECTION &aSel )
283  {
284  return GetCanvas()->GetView()->IsMirroredX();
285  };
286  auto zonesFilledCondition = [ &disp_opt ]( const SELECTION &aSel )
287  {
288  return disp_opt.m_DisplayZonesMode == 0;
289  };
290  auto zonesWireframedCondition = [ &disp_opt ]( const SELECTION &aSel )
291  {
292  return disp_opt.m_DisplayZonesMode == 1;
293  };
294  auto zonesOutlinedCondition = [ &disp_opt ]( const SELECTION &aSel )
295  {
296  return disp_opt.m_DisplayZonesMode == 2;
297  };
298  auto sketchTracksCondition = [ &disp_opt ]( const SELECTION &aSel )
299  {
300  return !disp_opt.m_DisplayPcbTrackFill;
301  };
302  auto sketchViasCondition = [ &disp_opt ]( const SELECTION &aSel )
303  {
304  return !disp_opt.m_DisplayViaFill;
305  };
306  auto sketchPadsCondition = [ disp_opt ]( const SELECTION &aSel )
307  {
308  return !disp_opt.m_DisplayPadFill;
309  };
310  auto contrastModeCondition = [ &disp_opt ]( const SELECTION &aSel )
311  {
312  return !disp_opt.m_ContrastModeDisplay;
313  };
314  auto sketchGraphicsCondition = [ &disp_opt ]( const SELECTION &aSel )
315  {
316  return !disp_opt.m_DisplayDrawItemsFill;
317  };
318  auto sketchModuleEdgeOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
319  {
320  return !disp_opt.m_DisplayModEdgeFill;
321  };
322  auto sketchModuleTextOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
323  {
324  return !disp_opt.m_DisplayModTextFill;
325  };
326 
327  viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition );
328  viewMenu->AddCheckItem( PCB_ACTIONS::showMicrowaveToolbar, microwaveToolbarShownCondition );
331 
332  viewMenu->AddSeparator();
338 
339  viewMenu->AddSeparator();
340  viewMenu->AddCheckItem( ACTIONS::toggleGrid, gridShownCondition );
342  viewMenu->AddCheckItem( PCB_ACTIONS::togglePolarCoords, polarCoordsCondition );
343 
344  // Units submenu
345  CONDITIONAL_MENU* unitsSubMenu = new CONDITIONAL_MENU( false, selTool );
346  unitsSubMenu->SetTitle( _( "&Units" ) );
347  unitsSubMenu->SetIcon( unit_mm_xpm );
348  unitsSubMenu->AddCheckItem( ACTIONS::imperialUnits, imperialUnitsCondition );
349  unitsSubMenu->AddCheckItem( ACTIONS::metricUnits, metricUnitsCondition );
350  viewMenu->AddMenu( unitsSubMenu );
351 
352  viewMenu->AddCheckItem( ACTIONS::toggleCursorStyle, fullCrosshairCondition );
353 
354  viewMenu->AddSeparator();
355  viewMenu->AddCheckItem( PCB_ACTIONS::showRatsnest, ratsnestShownCondition );
356  viewMenu->AddCheckItem( PCB_ACTIONS::ratsnestLineMode, curvedRatsnestCondition );
357 
358  viewMenu->AddSeparator();
359  // Drawing Mode Submenu
360  CONDITIONAL_MENU* drawingModeSubMenu = new CONDITIONAL_MENU( false, selTool );
361  drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
362  drawingModeSubMenu->SetIcon( add_zone_xpm );
363 
364  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayEnable, zonesFilledCondition );
365  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayDisable, zonesWireframedCondition );
366  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayOutlines, zonesOutlinedCondition );
367 
368  drawingModeSubMenu->AddSeparator();
369  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::padDisplayMode, sketchPadsCondition );
370  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::viaDisplayMode, sketchViasCondition );
371  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::trackDisplayMode, sketchTracksCondition );
372 
373  drawingModeSubMenu->AddSeparator();
374  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::graphicDisplayMode, sketchGraphicsCondition );
375  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleEdgeOutlines, sketchModuleEdgeOutlinesCondition );
376  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleTextOutlines, sketchModuleTextOutlinesCondition );
377 
378  viewMenu->AddMenu( drawingModeSubMenu );
379 
380  // Contrast Mode Submenu
381  CONDITIONAL_MENU* contrastModeSubMenu = new CONDITIONAL_MENU( false, selTool );
382  contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
383  contrastModeSubMenu->SetIcon( contrast_mode_xpm );
384 
385  contrastModeSubMenu->AddCheckItem( ACTIONS::highContrastMode, contrastModeCondition );
388  viewMenu->AddMenu( contrastModeSubMenu );
389 
390  viewMenu->AddCheckItem( PCB_ACTIONS::flipBoard, boardFlippedCondition );
391 
392 #ifdef __APPLE__
393  viewMenu->AddSeparator();
394 #endif
395 
396  viewMenu->Resolve();
397 
398  //-- Place Menu ----------------------------------------------------------
399  //
400  CONDITIONAL_MENU* placeMenu = new CONDITIONAL_MENU( false, selTool );
401 
411 
412  placeMenu->AddSeparator();
414 
415  placeMenu->AddSeparator();
417 
418  placeMenu->AddSeparator();
421 
422  placeMenu->AddSeparator();
423 
424  ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false );
425  autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
426  autoplaceSubmenu->SetTool( selTool );
427  autoplaceSubmenu->SetIcon( mode_module_xpm );
428 
429  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceOffboardComponents );
430  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceSelectedComponents );
431 
432  placeMenu->AddMenu( autoplaceSubmenu );
433 
434  placeMenu->Resolve();
435 
436  //-- Route Menu ----------------------------------------------------------
437  //
438  CONDITIONAL_MENU* routeMenu = new CONDITIONAL_MENU( false, selTool );
439 
441 
442  routeMenu->AddSeparator();
445 
446  routeMenu->AddSeparator();
450 
451  routeMenu->AddSeparator();
453 
454  routeMenu->Resolve();
455 
456  //-- Inspect Menu --------------------------------------------------------
457  //
458  CONDITIONAL_MENU* inspectMenu = new CONDITIONAL_MENU( false, selTool );
459 
463 
464  inspectMenu->AddSeparator();
466 
467  inspectMenu->Resolve();
468 
469  //-- Tools menu ----------------------------------------------------------
470  //
471  CONDITIONAL_MENU* toolsMenu = new CONDITIONAL_MENU( false, selTool );
472 
475 
476 #if defined(KICAD_SCRIPTING_WXPYTHON)
477  auto pythonConsoleShownCondition = [] ( const SELECTION& aSel ) {
478  wxMiniFrame* pythonConsole = (wxMiniFrame *) PCB_EDIT_FRAME::findPythonConsole();
479  return pythonConsole && pythonConsole->IsShown();
480  };
481 
482  toolsMenu->AddSeparator();
483  toolsMenu->AddCheckItem( PCB_ACTIONS::showPythonConsole, pythonConsoleShownCondition );
484 #endif
485 
486 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
487  ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false );
488  submenuActionPlugins->SetTool( selTool );
489  submenuActionPlugins->SetTitle( _( "External Plugins" ) );
490  submenuActionPlugins->SetIcon( hammer_xpm );
491 
492  submenuActionPlugins->Add( _( "Refresh Plugins" ),
493  _( "Reload all python plugins and refresh plugin menus" ),
495  submenuActionPlugins->AppendSeparator();
496 
497  toolsMenu->AddSeparator();
498  toolsMenu->AddMenu( submenuActionPlugins, SELECTION_CONDITIONS::ShowAlways );
499 #endif
500 
501  toolsMenu->Resolve();
502 
503  //-- Preferences menu ----------------------------------------------------
504  //
505  CONDITIONAL_MENU* prefsMenu = new CONDITIONAL_MENU( false, selTool );
506 
507  auto acceleratedGraphicsCondition = [ this ] ( const SELECTION& aSel ) {
509  };
510  auto standardGraphicsCondition = [ this ] ( const SELECTION& aSel ) {
512  };
513 
516 
517 #ifdef BUILD_GITHUB_PLUGIN
518  prefsMenu->AddItem( ID_PCB_3DSHAPELIB_WIZARD,
519  _( "Add &3D Shapes Libraries Wizard..." ),
520  _( "Download 3D shape libraries from GitHub" ),
522 #endif
523  prefsMenu->AddItem( wxID_PREFERENCES,
524  _( "Preferences...\tCTRL+," ),
525  _( "Show preferences for all open tools" ),
527 
528  prefsMenu->AddSeparator();
529  AddMenuLanguageList( prefsMenu, selTool );
530 
531  prefsMenu->AddSeparator();
532  prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
533  prefsMenu->AddCheckItem( ACTIONS::standardGraphics, standardGraphicsCondition );
534 
535  prefsMenu->Resolve();
536 
537  //--MenuBar -----------------------------------------------------------
538  //
539  menuBar->Append( fileMenu, _( "&File" ) );
540  menuBar->Append( editMenu, _( "&Edit" ) );
541  menuBar->Append( viewMenu, _( "&View" ) );
542  menuBar->Append( placeMenu, _( "&Place" ) );
543  menuBar->Append( routeMenu, _( "Ro&ute" ) );
544  menuBar->Append( inspectMenu, _( "&Inspect" ) );
545  menuBar->Append( toolsMenu, _( "&Tools" ) );
546  menuBar->Append( prefsMenu, _( "P&references" ) );
547  AddStandardHelpMenu( menuBar );
548 
549  SetMenuBar( menuBar );
550  delete oldMenuBar;
551 
552 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
553  // Populate the Action Plugin sub-menu
554  buildActionPluginMenus( submenuActionPlugins );
555 #endif
556 }
static bool ShowAlways(const SELECTION &aSelection)
Function ShowAlways The default condition function (always returns true).
void AddMenu(ACTION_MENU *aMenu, const SELECTION_CONDITION &aCondition=SELECTION_CONDITIONS::ShowAlways, int aOrder=ANY_ORDER)
Function AddMenu()
static TOOL_ACTION drawLine
Definition: pcb_actions.h:148
static TOOL_ACTION show3DViewer
Definition: actions.h:148
static TOOL_ACTION placeModule
Definition: pcb_actions.h:160
wxMenuItem * Add(const wxString &aLabel, int aId, const BITMAP_OPAQUE *aIcon)
Function Add() Adds a wxWidgets-style entry to the menu.
static TOOL_ACTION globalDeletions
Definition: pcb_actions.h:301
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:135
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:314
const BITMAP_OPAQUE export3d_xpm[1]
Definition: export3d.cpp:66
static TOOL_ACTION zoomInCenter
Definition: actions.h:90
const BITMAP_OPAQUE create_cmp_file_xpm[1]
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
static TOOL_ACTION pageSettings
Definition: actions.h:59
const BITMAP_OPAQUE export_step_xpm[1]
Definition: export_step.cpp:62
virtual bool IsGridVisible() const override
Function IsGridVisible()
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:428
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:412
ACTION_MENU.
Definition: action_menu.h:43
static TOOL_ACTION doDelete
Definition: actions.h:74
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:289
static TOOL_ACTION drawArc
Definition: pcb_actions.h:151
static TOOL_ACTION ratsnestLineMode
Definition: pcb_actions.h:226
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:429
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:272
static TOOL_ACTION zoomTool
Definition: actions.h:95
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:415
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:233
SELECTION_TOOL.
const BITMAP_OPAQUE plot_svg_xpm[1]
Definition: plot_svg.cpp:61
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
int GetUndoCommandCount() const
Definition: base_screen.h:201
static TOOL_ACTION drawZoneKeepout
Definition: pcb_actions.h:156
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:271
static TOOL_ACTION routerTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:187
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:232
static TOOL_ACTION zoomFitScreen
Definition: actions.h:93
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:149
static TOOL_ACTION standardGraphics
Definition: actions.h:155
void AddCheckItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddCheckItem()
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:327
const BITMAP_OPAQUE contrast_mode_xpm[1]
This class implements a menu container for a file history.
Definition: filehistory.h:86
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:325
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:153
const BITMAP_OPAQUE import3d_xpm[1]
Definition: import3d.cpp:61
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:307
const BITMAP_OPAQUE fabrication_xpm[1]
Definition: fabrication.cpp:36
static TOOL_ACTION print
Definition: actions.h:60
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:40
static TOOL_ACTION find
Definition: actions.h:78
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:306
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Function GetDisplayOptions returns the display options current in use Display options are relative to...
static wxWindow * findPythonConsole()
static TOOL_ACTION imperialUnits
Definition: actions.h:136
static bool NotEmpty(const SELECTION &aSelection)
Function NotEmpty Tests if there are any items selected.
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:299
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:317
static TOOL_ACTION placeText
Definition: pcb_actions.h:152
static TOOL_ACTION zoomOutCenter
Definition: actions.h:91
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:318
const BITMAP_OPAQUE recent_xpm[1]
Definition: recent.cpp:68
static TOOL_ACTION saveCopyAs
Definition: actions.h:56
static TOOL_ACTION routerTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:190
void SetTool(TOOL_INTERACTIVE *aTool)
Function SetTool() Sets a tool that is the creator of the menu.
const BITMAP_OPAQUE reload_xpm[1]
Definition: reload.cpp:71
static TOOL_ACTION cleanupTracksAndVias
Definition: pcb_actions.h:302
static TOOL_ACTION measureTool
Definition: actions.h:144
static TOOL_ACTION copy
Definition: actions.h:70
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:413
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:193
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:164
static TOOL_ACTION drawDimension
Definition: pcb_actions.h:153
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:309
bool IsContentModified() override
Get if the current board has been modified but not saved.
static TOOL_ACTION toggleGrid
Definition: actions.h:132
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:151
static TOOL_ACTION save
Definition: actions.h:54
static TOOL_ACTION doNew
Definition: actions.h:47
strings common to toolbars and menubar
void SetIcon(const BITMAP_OPAQUE *aIcon)
Function SetIcon() Assigns an icon for the entry.
Definition: action_menu.cpp:68
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
void AddStandardHelpMenu(wxMenuBar *aMenuBar)
Adds the standard KiCad help menu to the menubar.
const BITMAP_OPAQUE export_xpm[1]
Definition: export.cpp:75
const BITMAP_OPAQUE import_xpm[1]
Definition: import.cpp:68
static TOOL_ACTION togglePolarCoords
Definition: actions.h:139
void ReCreateMenuBar() override
Recreates the menu bar.
static TOOL_ACTION cut
Definition: actions.h:69
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:225
static TOOL_ACTION plot
Definition: actions.h:61
static TOOL_ACTION drawVia
Definition: pcb_actions.h:155
const BITMAP_OPAQUE hammer_xpm[1]
Definition: hammer.cpp:74
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:316
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
static TOOL_ACTION placeTarget
Definition: pcb_actions.h:159
void Resolve()
Function Resolve()
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:291
const BITMAP_OPAQUE unit_mm_xpm[1]
Definition: unit_mm.cpp:28
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:298
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:369
const BITMAP_OPAQUE mode_module_xpm[1]
Definition: mode_module.cpp:82
bool IsMirroredX() const
Function IsMirroredX() Returns true if view is flipped across the X axis.
Definition: view.h:230
static TOOL_ACTION updateFootprints
Definition: pcb_actions.h:304
void AddSeparator(int aOrder=ANY_ORDER)
Function AddSeparator()
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:228
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:311
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:150
void AddQuitOrClose(KIFACE_I *aKiface, wxString aAppname="")
Functions AddQuitOrClose()
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:229
static TOOL_ACTION moduleTextOutlines
Display module texts as lines.
Definition: pcb_actions.h:372
const BITMAP_OPAQUE rescue_xpm[1]
Definition: rescue.cpp:65
static TOOL_ACTION metricUnits
Definition: actions.h:137
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:319
static TOOL_ACTION redo
Definition: actions.h:68
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:312
static TOOL_ACTION showMicrowaveToolbar
Definition: pcb_actions.h:326
void SetTitle(const wxString &aTitle) override
Function SetTitle() Sets title for the menu.
Definition: action_menu.cpp:86
see class PGM_BASE
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
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...
Definition: filehistory.cpp:73
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:300
bool ToolStackIsEmpty()
const BITMAP_OPAQUE export_idf_xpm[1]
void AddMenuLanguageList(CONDITIONAL_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to Master...
static TOOL_ACTION saveAs
Definition: actions.h:55
const BITMAP_OPAQUE import_vector_xpm[1]
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Definition: pcb_actions.h:178
#define _(s)
Definition: 3d_actions.cpp:31
static TOOL_ACTION zoomRedraw
Definition: actions.h:87
static TOOL_ACTION listNets
Definition: pcb_actions.h:321
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123
static TOOL_ACTION acceleratedGraphics
Definition: actions.h:154
static TOOL_ACTION runDRC
Definition: pcb_actions.h:322
const BITMAP_OPAQUE import_brd_file_xpm[1]
const BITMAP_OPAQUE library_archive_as_xpm[1]
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
static TOOL_ACTION graphicDisplayMode
Definition: pcb_actions.h:230
const BITMAP_OPAQUE undo_xpm[1]
Definition: undo.cpp:74
static TOOL_ACTION gridProperties
Definition: actions.h:133
const BITMAP_OPAQUE add_zone_xpm[1]
Definition: add_zone.cpp:74
static TOOL_ACTION deleteTool
Definition: actions.h:75
static TOOL_ACTION undo
Definition: actions.h:67
GAL_TYPE GetBackend() const
Function GetBackend Returns the type of backend currently used by GAL canvas.
static TOOL_ACTION toggleCursorStyle
Definition: actions.h:98
TOOL_MANAGER * m_toolManager
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:277
static TOOL_ACTION gridSetOrigin
Definition: actions.h:129
const BITMAP_OPAQUE library_archive_xpm[1]
const BITMAP_OPAQUE preference_xpm[1]
Definition: preference.cpp:66
static TOOL_ACTION configurePaths
Definition: actions.h:162
static TOOL_ACTION highContrastMode
Definition: actions.h:99
int GetRedoCommandCount() const
Definition: base_screen.h:206
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddItem()
bool m_fullscreenCursor
Fullscreen crosshair or small cross
static TOOL_ACTION paste
Definition: actions.h:71
static TOOL_ACTION drawZone
Definition: pcb_actions.h:154
static TOOL_ACTION duplicate
Definition: actions.h:73
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:227
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:315
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:231
static TOOL_ACTION routerTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:184
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:181