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 
28 #include <advanced_config.h>
29 #include <drc/drc.h>
30 #include <filehistory.h>
31 #include <kiface_i.h>
32 #include <menus_helpers.h>
33 #include <pcb_edit_frame.h>
34 #include <pcbnew.h>
35 #include <pcbnew_id.h>
36 #include <pgm_base.h>
37 #include <tool/actions.h>
38 #include <tool/conditional_menu.h>
40 #include <tool/tool_manager.h>
41 #include <tools/pcb_actions.h>
42 #include <tools/selection_tool.h>
43 #include <widgets/wx_menubar.h>
44 
45 
47 {
49  // wxWidgets handles the Mac Application menu behind the scenes, but that means
50  // we always have to start from scratch with a new wxMenuBar.
51  wxMenuBar* oldMenuBar = GetMenuBar();
52  WX_MENUBAR* menuBar = new WX_MENUBAR();
53 
54  auto modifiedDocumentCondition = [ this ] ( const SELECTION& sel ) {
55  return IsContentModified();
56  };
57 
58  // Recreate all menus:
59 
60  //-- File menu -----------------------------------------------------------
61  //
62  CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, selTool );
63  static ACTION_MENU* openRecentMenu;
64  auto& disp_opt = GetDisplayOptions();
65 
66  if( Kiface().IsSingle() ) // not when under a project mgr
67  {
68  FILE_HISTORY& fileHistory = GetFileHistory();
69 
70  // Create the menu if it does not exist. Adding a file to/from the history
71  // will automatically refresh the menu.
72  if( !openRecentMenu )
73  {
74  openRecentMenu = new ACTION_MENU( false );
75  openRecentMenu->SetTool( selTool );
76  openRecentMenu->SetTitle( _( "Open Recent" ) );
77  openRecentMenu->SetIcon( recent_xpm );
78 
79  fileHistory.UseMenu( openRecentMenu );
80  fileHistory.AddFilesToMenu();
81  }
82 
85  fileMenu->AddMenu( openRecentMenu, FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
86 
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 
109  // Import submenu
110  ACTION_MENU* submenuImport = new ACTION_MENU( false );
111  submenuImport->SetTool( selTool );
112  submenuImport->SetTitle( _( "Import" ) );
113  submenuImport->SetIcon( import_xpm );
114 
115  submenuImport->Add( PCB_ACTIONS::importNetlist );
116  submenuImport->Add( PCB_ACTIONS::importSpecctraSession );
117  submenuImport->Add( _( "Graphics..." ), _( "Import 2D drawing file" ),
119 
120  if( Kiface().IsSingle() )
121  {
122  submenuImport->Add( _( "Non-KiCad Board File..." ),
123  _( "Import board file from other applications" ),
125  }
126 
127  fileMenu->AddSeparator();
128  fileMenu->AddMenu( submenuImport, SELECTION_CONDITIONS::ShowAlways );
129 
130  // Export submenu
131  ACTION_MENU* submenuExport = new ACTION_MENU( false );
132  submenuExport->SetTool( selTool );
133  submenuExport->SetTitle( _( "Export" ) );
134  submenuExport->SetIcon( export_xpm );
135 
136  submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN );
137  submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
139  submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
141  submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
143  submenuExport->Add( _( "STEP..." ), _( "Export STEP 3D board representation" ),
145  submenuExport->Add( _( "SVG..." ), _( "Export SVG board representation" ),
147  submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
148  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
150  submenuExport->Add( _( "Hyperlynx..." ), "",
152 
153  fileMenu->AddMenu( submenuExport, SELECTION_CONDITIONS::ShowAlways );
154 
155  // Fabrication Outputs submenu
156  ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false );
157  submenuFabOutputs->SetTool( selTool );
158  submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
159  submenuFabOutputs->SetIcon( fabrication_xpm );
160 
161  submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
162  submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
163  submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
164  submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
165  submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
166  submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
167 
168  fileMenu->AddMenu( submenuFabOutputs, SELECTION_CONDITIONS::ShowAlways );
169 
170  auto enableBoardSetupCondition = [ this ] ( const SELECTION& sel ) {
171  if( DRC* tool = m_toolManager->GetTool<DRC>() )
172  return !tool->IsDRCDialogShown();
173 
174  return true;
175  };
176  fileMenu->AddSeparator();
177  fileMenu->AddItem( PCB_ACTIONS::boardSetup, enableBoardSetupCondition );
178 
179  fileMenu->AddSeparator();
183 
184  // Archive submenu
185  ACTION_MENU* submenuArchive = new ACTION_MENU( false );
186  submenuArchive->SetTool( selTool );
187  submenuArchive->SetTitle( _( "Archive Footprints" ) );
188  submenuArchive->SetIcon( library_archive_xpm );
189 
190  submenuArchive->Add( _( "&Archive Footprints in Existing Library..." ),
191  _( "Archive all footprints to existing library in footprint Lib table"
192  "(does not remove other footprints in this library)" ),
194 
195  submenuArchive->Add( _( "&Create New Library and Archive Footprints..." ),
196  _( "Archive all footprints to a new library\n"
197  "(if the library already exists it will be replaced)" ),
199 
200  fileMenu->AddSeparator();
201  fileMenu->AddMenu( submenuArchive, SELECTION_CONDITIONS::ShowAlways );
202 
203  fileMenu->AddSeparator();
204  fileMenu->AddQuitOrClose( &Kiface(), _( "Pcbnew" ) );
205 
206  fileMenu->Resolve();
207 
208  //-- Edit menu -----------------------------------------------------------
209  //
210  CONDITIONAL_MENU* editMenu = new CONDITIONAL_MENU( false, selTool );
211 
212  auto enableUndoCondition = [ this ] ( const SELECTION& sel ) {
213  return GetUndoCommandCount() > 0;
214  };
215  auto enableRedoCondition = [ this ] ( const SELECTION& sel ) {
216  return GetRedoCommandCount() > 0;
217  };
218  auto noActiveToolCondition = [ this ] ( const SELECTION& aSelection ) {
219  return ToolStackIsEmpty();
220  };
221 
222  editMenu->AddItem( ACTIONS::undo, enableUndoCondition );
223  editMenu->AddItem( ACTIONS::redo, enableRedoCondition );
224 
225  editMenu->AddSeparator();
228  editMenu->AddItem( ACTIONS::paste, noActiveToolCondition );
231 
232  editMenu->AddSeparator();
234 
235  editMenu->AddSeparator();
240 
241  editMenu->AddSeparator();
244 
245  editMenu->AddSeparator();
250 
251  editMenu->Resolve();
252 
253  //----- View menu -----------------------------------------------------------
254  //
255  CONDITIONAL_MENU* viewMenu = new CONDITIONAL_MENU( false, selTool );
256 
257  auto layersPaletteShownCondition = [ this ]( const SELECTION &aSel )
258  {
259  return LayerManagerShown();
260  };
261  auto microwaveToolbarShownCondition = [ this ]( const SELECTION &aSel )
262  {
263  return MicrowaveToolbarShown();
264  };
265  auto gridShownCondition = [ this ]( const SELECTION &aSel )
266  {
267  return IsGridVisible();
268  };
269  auto polarCoordsCondition = [ this ]( const SELECTION &aSel )
270  {
271  return GetShowPolarCoords();
272  };
273  auto imperialUnitsCondition = [this]( const SELECTION& aSel ) {
274  return GetUserUnits() == EDA_UNITS::INCHES;
275  };
276  auto metricUnitsCondition = [this]( const SELECTION& aSel ) {
278  };
279  auto fullCrosshairCondition = [ this ]( const SELECTION &aSel )
280  {
282  };
283  auto ratsnestShownCondition = [ &disp_opt ]( const SELECTION &aSel )
284  {
285  return disp_opt.m_ShowGlobalRatsnest;
286  };
287  auto curvedRatsnestCondition = [ &disp_opt ]( const SELECTION &aSel )
288  {
289  return disp_opt.m_DisplayRatsnestLinesCurved;
290  };
291  auto boardFlippedCondition = [ this ]( const SELECTION &aSel )
292  {
293  return GetCanvas()->GetView()->IsMirroredX();
294  };
295  auto zonesFilledCondition = [ &disp_opt ]( const SELECTION &aSel )
296  {
297  return disp_opt.m_DisplayZonesMode == 0;
298  };
299  auto zonesWireframedCondition = [ &disp_opt ]( const SELECTION &aSel )
300  {
301  return disp_opt.m_DisplayZonesMode == 1;
302  };
303  auto zonesOutlinedCondition = [ &disp_opt ]( const SELECTION &aSel )
304  {
305  return disp_opt.m_DisplayZonesMode == 2;
306  };
307  auto sketchTracksCondition = [ &disp_opt ]( const SELECTION &aSel )
308  {
309  return !disp_opt.m_DisplayPcbTrackFill;
310  };
311  auto sketchViasCondition = [ &disp_opt ]( const SELECTION &aSel )
312  {
313  return !disp_opt.m_DisplayViaFill;
314  };
315  auto sketchPadsCondition = [ disp_opt ]( const SELECTION &aSel )
316  {
317  return !disp_opt.m_DisplayPadFill;
318  };
319  auto contrastModeCondition = [ &disp_opt ]( const SELECTION &aSel )
320  {
321  return disp_opt.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL;
322  };
323  auto sketchGraphicsCondition = [ &disp_opt ]( const SELECTION &aSel )
324  {
325  return !disp_opt.m_DisplayGraphicsFill;
326  };
327  auto sketchTextOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
328  {
329  return !disp_opt.m_DisplayTextFill;
330  };
331 
332  viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition );
333  viewMenu->AddCheckItem( PCB_ACTIONS::showMicrowaveToolbar, microwaveToolbarShownCondition );
336 
337  viewMenu->AddSeparator();
343 
344  viewMenu->AddSeparator();
345  viewMenu->AddCheckItem( ACTIONS::toggleGrid, gridShownCondition );
347  viewMenu->AddCheckItem( PCB_ACTIONS::togglePolarCoords, polarCoordsCondition );
348 
349  // Units submenu
350  CONDITIONAL_MENU* unitsSubMenu = new CONDITIONAL_MENU( false, selTool );
351  unitsSubMenu->SetTitle( _( "&Units" ) );
352  unitsSubMenu->SetIcon( unit_mm_xpm );
353  unitsSubMenu->AddCheckItem( ACTIONS::imperialUnits, imperialUnitsCondition );
354  unitsSubMenu->AddCheckItem( ACTIONS::metricUnits, metricUnitsCondition );
355  viewMenu->AddMenu( unitsSubMenu );
356 
357  viewMenu->AddCheckItem( ACTIONS::toggleCursorStyle, fullCrosshairCondition );
358 
359  viewMenu->AddSeparator();
360  viewMenu->AddCheckItem( PCB_ACTIONS::showRatsnest, ratsnestShownCondition );
361  viewMenu->AddCheckItem( PCB_ACTIONS::ratsnestLineMode, curvedRatsnestCondition );
362 
363  viewMenu->AddSeparator();
364  // Drawing Mode Submenu
365  CONDITIONAL_MENU* drawingModeSubMenu = new CONDITIONAL_MENU( false, selTool );
366  drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
367  drawingModeSubMenu->SetIcon( add_zone_xpm );
368 
369  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayEnable, zonesFilledCondition );
370  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayDisable, zonesWireframedCondition );
371  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayOutlines, zonesOutlinedCondition );
372 
373  drawingModeSubMenu->AddSeparator();
374  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::padDisplayMode, sketchPadsCondition );
375  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::viaDisplayMode, sketchViasCondition );
376  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::trackDisplayMode, sketchTracksCondition );
377 
378  drawingModeSubMenu->AddSeparator();
379  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::graphicsOutlines, sketchGraphicsCondition );
380  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::textOutlines, sketchTextOutlinesCondition );
381 
382  viewMenu->AddMenu( drawingModeSubMenu );
383 
384  // Contrast Mode Submenu
385  CONDITIONAL_MENU* contrastModeSubMenu = new CONDITIONAL_MENU( false, selTool );
386  contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
387  contrastModeSubMenu->SetIcon( contrast_mode_xpm );
388 
389  contrastModeSubMenu->AddCheckItem( ACTIONS::highContrastMode, contrastModeCondition );
392  viewMenu->AddMenu( contrastModeSubMenu );
393 
394  viewMenu->AddCheckItem( PCB_ACTIONS::flipBoard, boardFlippedCondition );
395 
396 #ifdef __APPLE__
397  viewMenu->AddSeparator();
398 #endif
399 
400  viewMenu->Resolve();
401 
402  //-- Place Menu ----------------------------------------------------------
403  //
404  CONDITIONAL_MENU* placeMenu = new CONDITIONAL_MENU( false, selTool );
405 
416 
417  placeMenu->AddSeparator();
419 
420  placeMenu->AddSeparator();
422 
423  placeMenu->AddSeparator();
426 
427  placeMenu->AddSeparator();
428 
429  ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false );
430  autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
431  autoplaceSubmenu->SetTool( selTool );
432  autoplaceSubmenu->SetIcon( mode_module_xpm );
433 
434  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceOffboardComponents );
435  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceSelectedComponents );
436 
437  placeMenu->AddMenu( autoplaceSubmenu );
438 
439  placeMenu->Resolve();
440 
441  //-- Route Menu ----------------------------------------------------------
442  //
443  CONDITIONAL_MENU* routeMenu = new CONDITIONAL_MENU( false, selTool );
444 
446 
447  routeMenu->AddSeparator();
450 
451  routeMenu->AddSeparator();
455 
456  routeMenu->AddSeparator();
458 
459  routeMenu->Resolve();
460 
461  //-- Inspect Menu --------------------------------------------------------
462  //
463  CONDITIONAL_MENU* inspectMenu = new CONDITIONAL_MENU( false, selTool );
464 
468 
469  inspectMenu->AddSeparator();
471 
472  inspectMenu->Resolve();
473 
474  //-- Tools menu ----------------------------------------------------------
475  //
476  CONDITIONAL_MENU* toolsMenu = new CONDITIONAL_MENU( false, selTool );
477 
481 
482  toolsMenu->AddSeparator();
485 
486 #if defined(KICAD_SCRIPTING_WXPYTHON)
487  auto pythonConsoleShownCondition = [] ( const SELECTION& aSel ) {
488  wxMiniFrame* pythonConsole = (wxMiniFrame *) PCB_EDIT_FRAME::findPythonConsole();
489  return pythonConsole && pythonConsole->IsShown();
490  };
491 
492  toolsMenu->AddSeparator();
493  toolsMenu->AddCheckItem( PCB_ACTIONS::showPythonConsole, pythonConsoleShownCondition );
494 #endif
495 
496 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
497  ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false );
498  submenuActionPlugins->SetTool( selTool );
499  submenuActionPlugins->SetTitle( _( "External Plugins" ) );
500  submenuActionPlugins->SetIcon( hammer_xpm );
501 
502  submenuActionPlugins->Add( _( "Refresh Plugins" ),
503  _( "Reload all python plugins and refresh plugin menus" ),
505  submenuActionPlugins->AppendSeparator();
506 
507  toolsMenu->AddSeparator();
508  toolsMenu->AddMenu( submenuActionPlugins, SELECTION_CONDITIONS::ShowAlways );
509 #endif
510 
511  toolsMenu->Resolve();
512 
513  //-- Preferences menu ----------------------------------------------------
514  //
515  CONDITIONAL_MENU* prefsMenu = new CONDITIONAL_MENU( false, selTool );
516 
517  auto acceleratedGraphicsCondition = [ this ] ( const SELECTION& aSel ) {
519  };
520  auto standardGraphicsCondition = [ this ] ( const SELECTION& aSel ) {
522  };
523 
526 
527 #ifdef BUILD_GITHUB_PLUGIN
528  prefsMenu->AddItem( ID_PCB_3DSHAPELIB_WIZARD,
529  _( "Add &3D Shapes Libraries Wizard..." ),
530  _( "Download 3D shape libraries from GitHub" ),
532 #endif
533  prefsMenu->AddItem( wxID_PREFERENCES,
534  _( "Preferences...\tCTRL+," ),
535  _( "Show preferences for all open tools" ),
537 
538  prefsMenu->AddSeparator();
539  AddMenuLanguageList( prefsMenu, selTool );
540 
541  prefsMenu->AddSeparator();
542  prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
543  prefsMenu->AddCheckItem( ACTIONS::standardGraphics, standardGraphicsCondition );
544 
545  prefsMenu->Resolve();
546 
547  //--MenuBar -----------------------------------------------------------
548  //
549  menuBar->Append( fileMenu, _( "&File" ) );
550  menuBar->Append( editMenu, _( "&Edit" ) );
551  menuBar->Append( viewMenu, _( "&View" ) );
552  menuBar->Append( placeMenu, _( "&Place" ) );
553  menuBar->Append( routeMenu, _( "Ro&ute" ) );
554  menuBar->Append( inspectMenu, _( "&Inspect" ) );
555  menuBar->Append( toolsMenu, _( "&Tools" ) );
556  menuBar->Append( prefsMenu, _( "P&references" ) );
557  AddStandardHelpMenu( menuBar );
558 
559  SetMenuBar( menuBar );
560  delete oldMenuBar;
561 
562 #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
563  // Populate the Action Plugin sub-menu
564  buildActionPluginMenus( submenuActionPlugins );
565 #endif
566 }
void AddFilesToMenu() override
Add the files to all registered menus.
Definition: filehistory.h:98
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:137
static TOOL_ACTION show3DViewer
Definition: actions.h:152
static TOOL_ACTION placeModule
Definition: pcb_actions.h:150
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:298
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:124
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:312
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
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:431
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:404
ACTION_MENU.
Definition: action_menu.h:44
static TOOL_ACTION doDelete
Definition: actions.h:74
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:286
static TOOL_ACTION drawArc
Definition: pcb_actions.h:141
int GetUndoCommandCount() const
static TOOL_ACTION ratsnestLineMode
Definition: pcb_actions.h:222
static TOOL_ACTION cleanupGraphics
Definition: pcb_actions.h:300
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:432
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:269
static TOOL_ACTION zoomTool
Definition: actions.h:95
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:408
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:228
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.
static TOOL_ACTION drawZoneKeepout
Definition: pcb_actions.h:146
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:268
static TOOL_ACTION routerTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:177
int GetRedoCommandCount() const
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:227
static TOOL_ACTION zoomFitScreen
Definition: actions.h:93
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:138
static TOOL_ACTION standardGraphics
Definition: actions.h:160
void AddCheckItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddCheckItem()
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:325
const BITMAP_OPAQUE contrast_mode_xpm[1]
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:323
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:157
const BITMAP_OPAQUE import3d_xpm[1]
Definition: import3d.cpp:61
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:305
const BITMAP_OPAQUE fabrication_xpm[1]
Definition: fabrication.cpp:36
static TOOL_ACTION print
Definition: actions.h:60
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition: wx_menubar.h:45
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:42
static TOOL_ACTION find
Definition: actions.h:78
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:304
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Function GetDisplayOptions Display options control the way tracks, vias, outlines and other things ar...
static wxWindow * findPythonConsole()
static TOOL_ACTION imperialUnits
Definition: actions.h:140
static bool NotEmpty(const SELECTION &aSelection)
Function NotEmpty Tests if there are any items selected.
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:296
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:315
static TOOL_ACTION placeText
Definition: pcb_actions.h:142
static TOOL_ACTION zoomOutCenter
Definition: actions.h:91
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:316
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:180
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:299
static TOOL_ACTION measureTool
Definition: actions.h:148
static TOOL_ACTION copy
Definition: actions.h:70
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:406
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:185
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:158
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:169
static TOOL_ACTION drawDimension
Definition: pcb_actions.h:143
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:307
bool IsContentModified() override
Get if the current board has been modified but not saved.
bool IsGridVisible() const
static TOOL_ACTION toggleGrid
Definition: actions.h:136
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:155
static TOOL_ACTION save
Definition: actions.h:54
static TOOL_ACTION doNew
Definition: actions.h:47
void SetIcon(const BITMAP_OPAQUE *aIcon)
Function SetIcon() Assigns an icon for the entry.
Definition: action_menu.cpp:70
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:143
void ReCreateMenuBar() override
Recreates the menu bar.
static TOOL_ACTION cut
Definition: actions.h:69
bool ToolStackIsEmpty()
Definition: tools_holder.h:84
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:221
static TOOL_ACTION drawRectangle
Definition: pcb_actions.h:139
static TOOL_ACTION plot
Definition: actions.h:61
static TOOL_ACTION drawVia
Definition: pcb_actions.h:145
const BITMAP_OPAQUE hammer_xpm[1]
Definition: hammer.cpp:74
static TOOL_ACTION showEeschema
Definition: pcb_actions.h:407
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:314
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:149
void Resolve()
Function Resolve()
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:288
const BITMAP_OPAQUE unit_mm_xpm[1]
Definition: unit_mm.cpp:28
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:295
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:302
void AddSeparator(int aOrder=ANY_ORDER)
Function AddSeparator()
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:224
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:309
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:140
void AddQuitOrClose(KIFACE_I *aKiface, wxString aAppname="")
Functions AddQuitOrClose()
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:225
static TOOL_ACTION graphicsOutlines
Display module edges as outlines.
Definition: pcb_actions.h:367
const BITMAP_OPAQUE rescue_xpm[1]
Definition: rescue.cpp:65
static TOOL_ACTION metricUnits
Definition: actions.h:141
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:317
static TOOL_ACTION redo
Definition: actions.h:68
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:310
static TOOL_ACTION showMicrowaveToolbar
Definition: pcb_actions.h:324
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:48
void SetTitle(const wxString &aTitle) override
Function SetTitle() Sets title for the menu.
Definition: action_menu.cpp:88
see class PGM_BASE
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
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...
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:297
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:168
#define _(s)
Definition: 3d_actions.cpp:33
static TOOL_ACTION zoomRedraw
Definition: actions.h:87
Design Rule Checker object that performs all the DRC tests.
static TOOL_ACTION listNets
Definition: pcb_actions.h:319
static TOOL_ACTION acceleratedGraphics
Definition: actions.h:159
static TOOL_ACTION runDRC
Definition: pcb_actions.h:320
const BITMAP_OPAQUE import_brd_file_xpm[1]
const BITMAP_OPAQUE library_archive_as_xpm[1]
static TOOL_ACTION gridProperties
Definition: actions.h:137
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
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:274
static TOOL_ACTION gridSetOrigin
Definition: actions.h:133
const BITMAP_OPAQUE library_archive_xpm[1]
const BITMAP_OPAQUE preference_xpm[1]
Definition: preference.cpp:66
static TOOL_ACTION configurePaths
Definition: actions.h:167
static TOOL_ACTION highContrastMode
Definition: actions.h:99
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddItem()
static TOOL_ACTION showFootprintEditor
Definition: actions.h:156
bool m_fullscreenCursor
Fullscreen crosshair or small cross
static TOOL_ACTION paste
Definition: actions.h:71
static TOOL_ACTION drawZone
Definition: pcb_actions.h:144
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:223
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:313
static TOOL_ACTION textOutlines
Display texts as lines.
Definition: pcb_actions.h:370
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:226
static TOOL_ACTION routerTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:174
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:171