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 
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 ACTION_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 ACTION_MENU( false );
74  openRecentMenu->SetTool( selTool );
75  openRecentMenu->SetTitle( _( "Open Recent" ) );
76  openRecentMenu->SetIcon( recent_xpm );
77 
78  fileHistory.UseMenu( openRecentMenu );
79  fileHistory.AddFilesToMenu();
80  }
81 
84  fileMenu->AddMenu( openRecentMenu, FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
85 
88  _( "Import Non-KiCad Board File..." ),
89  _( "Import board file from other applications" ),
91 
92  fileMenu->AddSeparator();
93  }
94 
95  fileMenu->AddItem( ACTIONS::save, modifiedDocumentCondition );
96 
97  // Save as menu:
98  // under a project mgr we do not want to modify the board filename
99  // to keep consistency with the project mgr which expects files names same as prj name
100  // for main files
101  if( Kiface().IsSingle() )
103  else
105 
106  fileMenu->AddSeparator();
108  _( "Resc&ue" ),
109  _( "Clear board and get last rescue file automatically saved by Pcbnew" ),
111 
113  _( "Revert to Last Backup" ),
114  _( "Clear board and get previous backup version of board" ),
116 
117  // Import submenu
118  ACTION_MENU* submenuImport = new ACTION_MENU( false );
119  submenuImport->SetTool( selTool );
120  submenuImport->SetTitle( _( "Import" ) );
121  submenuImport->SetIcon( import_xpm );
122 
123  submenuImport->Add( PCB_ACTIONS::importNetlist );
124  submenuImport->Add( PCB_ACTIONS::importSpecctraSession );
125  submenuImport->Add( _( "Graphics..." ), _( "Import 2D drawing file" ),
127 
128  fileMenu->AddSeparator();
129  fileMenu->AddMenu( submenuImport, SELECTION_CONDITIONS::ShowAlways );
130 
131  // Export submenu
132  ACTION_MENU* submenuExport = new ACTION_MENU( false );
133  submenuExport->SetTool( selTool );
134  submenuExport->SetTitle( _( "Export" ) );
135  submenuExport->SetIcon( export_xpm );
136 
137  submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN );
138  submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
140  submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
142  submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
144  submenuExport->Add( _( "STEP..." ), _( "Export STEP 3D board representation" ),
146  submenuExport->Add( _( "SVG..." ), _( "Export SVG board representation" ),
148  submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
149  _( "Export footprint association file (*.cmp) for schematic back annotation" ),
151  submenuExport->Add( _( "Hyperlynx..." ), "",
153 
154  fileMenu->AddMenu( submenuExport, SELECTION_CONDITIONS::ShowAlways );
155 
156  // Fabrication Outputs submenu
157  ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false );
158  submenuFabOutputs->SetTool( selTool );
159  submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
160  submenuFabOutputs->SetIcon( fabrication_xpm );
161 
162  submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
163  submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
164  submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
165  submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
166  submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
167  submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
168 
169  fileMenu->AddMenu( submenuFabOutputs, SELECTION_CONDITIONS::ShowAlways );
170 
171  auto enableBoardSetupCondition = [ this ] ( const SELECTION& sel ) {
172  if( DRC* tool = m_toolManager->GetTool<DRC>() )
173  return !tool->IsDRCDialogShown();
174 
175  return true;
176  };
177  fileMenu->AddSeparator();
178  fileMenu->AddItem( PCB_ACTIONS::boardSetup, enableBoardSetupCondition );
179 
180  fileMenu->AddSeparator();
184 
185  // Archive submenu
186  ACTION_MENU* submenuArchive = new ACTION_MENU( false );
187  submenuArchive->SetTool( selTool );
188  submenuArchive->SetTitle( _( "Archive Footprints" ) );
189  submenuArchive->SetIcon( library_archive_xpm );
190 
191  submenuArchive->Add( _( "&Archive Footprints in Existing Library..." ),
192  _( "Archive all footprints to existing library in footprint Lib table"
193  "(does not remove other footprints in this library)" ),
195 
196  submenuArchive->Add( _( "&Create New Library and Archive Footprints..." ),
197  _( "Archive all footprints to a new library\n"
198  "(if the library already exists it will be replaced)" ),
200 
201  fileMenu->AddSeparator();
202  fileMenu->AddMenu( submenuArchive, SELECTION_CONDITIONS::ShowAlways );
203 
204  fileMenu->AddSeparator();
205  fileMenu->AddQuitOrClose( &Kiface(), _( "Pcbnew" ) );
206 
207  fileMenu->Resolve();
208 
209  //-- Edit menu -----------------------------------------------------------
210  //
211  CONDITIONAL_MENU* editMenu = new CONDITIONAL_MENU( false, selTool );
212 
213  auto enableUndoCondition = [ this ] ( const SELECTION& sel ) {
214  return GetScreen() && GetScreen()->GetUndoCommandCount() > 0;
215  };
216  auto enableRedoCondition = [ this ] ( const SELECTION& sel ) {
217  return GetScreen() && GetScreen()->GetRedoCommandCount() > 0;
218  };
219  auto noActiveToolCondition = [ this ] ( const SELECTION& aSelection ) {
220  return ToolStackIsEmpty();
221  };
222 
223  editMenu->AddItem( ACTIONS::undo, enableUndoCondition );
224  editMenu->AddItem( ACTIONS::redo, enableRedoCondition );
225 
226  editMenu->AddSeparator();
229  editMenu->AddItem( ACTIONS::paste, noActiveToolCondition );
232 
233  editMenu->AddSeparator();
235 
236  editMenu->AddSeparator();
241 
242  editMenu->AddSeparator();
245 
246  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;
322  };
323  auto sketchGraphicsCondition = [ &disp_opt ]( const SELECTION &aSel )
324  {
325  return !disp_opt.m_DisplayDrawItemsFill;
326  };
327  auto sketchModuleEdgeOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
328  {
329  return !disp_opt.m_DisplayModEdgeFill;
330  };
331  auto sketchModuleTextOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
332  {
333  return !disp_opt.m_DisplayModTextFill;
334  };
335 
336  viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition );
337  viewMenu->AddCheckItem( PCB_ACTIONS::showMicrowaveToolbar, microwaveToolbarShownCondition );
340 
341  viewMenu->AddSeparator();
347 
348  viewMenu->AddSeparator();
349  viewMenu->AddCheckItem( ACTIONS::toggleGrid, gridShownCondition );
351  viewMenu->AddCheckItem( PCB_ACTIONS::togglePolarCoords, polarCoordsCondition );
352 
353  // Units submenu
354  CONDITIONAL_MENU* unitsSubMenu = new CONDITIONAL_MENU( false, selTool );
355  unitsSubMenu->SetTitle( _( "&Units" ) );
356  unitsSubMenu->SetIcon( unit_mm_xpm );
357  unitsSubMenu->AddCheckItem( ACTIONS::imperialUnits, imperialUnitsCondition );
358  unitsSubMenu->AddCheckItem( ACTIONS::metricUnits, metricUnitsCondition );
359  viewMenu->AddMenu( unitsSubMenu );
360 
361  viewMenu->AddCheckItem( ACTIONS::toggleCursorStyle, fullCrosshairCondition );
362 
363  viewMenu->AddSeparator();
364  viewMenu->AddCheckItem( PCB_ACTIONS::showRatsnest, ratsnestShownCondition );
365  viewMenu->AddCheckItem( PCB_ACTIONS::ratsnestLineMode, curvedRatsnestCondition );
366 
367  viewMenu->AddSeparator();
368  // Drawing Mode Submenu
369  CONDITIONAL_MENU* drawingModeSubMenu = new CONDITIONAL_MENU( false, selTool );
370  drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
371  drawingModeSubMenu->SetIcon( add_zone_xpm );
372 
373  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayEnable, zonesFilledCondition );
374  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayDisable, zonesWireframedCondition );
375  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::zoneDisplayOutlines, zonesOutlinedCondition );
376 
377  drawingModeSubMenu->AddSeparator();
378  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::padDisplayMode, sketchPadsCondition );
379  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::viaDisplayMode, sketchViasCondition );
380  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::trackDisplayMode, sketchTracksCondition );
381 
382  drawingModeSubMenu->AddSeparator();
383  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::graphicDisplayMode, sketchGraphicsCondition );
384  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleEdgeOutlines, sketchModuleEdgeOutlinesCondition );
385  drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleTextOutlines, sketchModuleTextOutlinesCondition );
386 
387  viewMenu->AddMenu( drawingModeSubMenu );
388 
389  // Contrast Mode Submenu
390  CONDITIONAL_MENU* contrastModeSubMenu = new CONDITIONAL_MENU( false, selTool );
391  contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
392  contrastModeSubMenu->SetIcon( contrast_mode_xpm );
393 
394  contrastModeSubMenu->AddCheckItem( ACTIONS::highContrastMode, contrastModeCondition );
397  viewMenu->AddMenu( contrastModeSubMenu );
398 
399  viewMenu->AddCheckItem( PCB_ACTIONS::flipBoard, boardFlippedCondition );
400 
401 #ifdef __APPLE__
402  viewMenu->AddSeparator();
403 #endif
404 
405  viewMenu->Resolve();
406 
407  //-- Place Menu ----------------------------------------------------------
408  //
409  CONDITIONAL_MENU* placeMenu = new CONDITIONAL_MENU( false, selTool );
410 
420 
421  placeMenu->AddSeparator();
423 
424  placeMenu->AddSeparator();
426 
427  placeMenu->AddSeparator();
430 
431  placeMenu->AddSeparator();
432 
433  ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false );
434  autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
435  autoplaceSubmenu->SetTool( selTool );
436  autoplaceSubmenu->SetIcon( mode_module_xpm );
437 
438  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceOffboardComponents );
439  autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceSelectedComponents );
440 
441  placeMenu->AddMenu( autoplaceSubmenu );
442 
443  placeMenu->Resolve();
444 
445  //-- Route Menu ----------------------------------------------------------
446  //
447  CONDITIONAL_MENU* routeMenu = new CONDITIONAL_MENU( false, selTool );
448 
450 
451  routeMenu->AddSeparator();
454 
455  routeMenu->AddSeparator();
459 
460  routeMenu->AddSeparator();
462 
463  routeMenu->Resolve();
464 
465  //-- Inspect Menu --------------------------------------------------------
466  //
467  CONDITIONAL_MENU* inspectMenu = new CONDITIONAL_MENU( false, selTool );
468 
472 
473  inspectMenu->AddSeparator();
475 
476  inspectMenu->Resolve();
477 
478  //-- Tools menu ----------------------------------------------------------
479  //
480  CONDITIONAL_MENU* toolsMenu = new CONDITIONAL_MENU( false, selTool );
481 
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:148
static TOOL_ACTION show3DViewer
Definition: actions.h:151
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:303
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:135
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:316
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:430
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:414
ACTION_MENU.
Definition: action_menu.h:43
static TOOL_ACTION doDelete
Definition: actions.h:74
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:291
static TOOL_ACTION drawArc
Definition: pcb_actions.h:151
static TOOL_ACTION ratsnestLineMode
Definition: pcb_actions.h:228
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:431
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:274
static TOOL_ACTION zoomTool
Definition: actions.h:95
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:417
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:235
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:273
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:234
static TOOL_ACTION zoomFitScreen
Definition: actions.h:93
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:149
static TOOL_ACTION standardGraphics
Definition: actions.h:159
void AddCheckItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddCheckItem()
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:329
const BITMAP_OPAQUE contrast_mode_xpm[1]
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:327
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:156
const BITMAP_OPAQUE import3d_xpm[1]
Definition: import3d.cpp:61
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:309
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:42
static TOOL_ACTION find
Definition: actions.h:78
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:308
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:139
static bool NotEmpty(const SELECTION &aSelection)
Function NotEmpty Tests if there are any items selected.
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:301
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:319
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:320
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:304
static TOOL_ACTION measureTool
Definition: actions.h:147
static TOOL_ACTION copy
Definition: actions.h:70
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:415
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:195
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:157
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:168
static TOOL_ACTION drawDimension
Definition: pcb_actions.h:153
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:311
bool IsContentModified() override
Get if the current board has been modified but not saved.
static TOOL_ACTION toggleGrid
Definition: actions.h:135
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:154
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: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:142
void ReCreateMenuBar() override
Recreates the menu bar.
static TOOL_ACTION cut
Definition: actions.h:69
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:227
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:318
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:293
const BITMAP_OPAQUE unit_mm_xpm[1]
Definition: unit_mm.cpp:28
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:300
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:371
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:306
void AddSeparator(int aOrder=ANY_ORDER)
Function AddSeparator()
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:230
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:313
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:231
static TOOL_ACTION moduleTextOutlines
Display module texts as lines.
Definition: pcb_actions.h:374
const BITMAP_OPAQUE rescue_xpm[1]
Definition: rescue.cpp:65
static TOOL_ACTION metricUnits
Definition: actions.h:140
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:321
static TOOL_ACTION redo
Definition: actions.h:68
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:314
static TOOL_ACTION showMicrowaveToolbar
Definition: pcb_actions.h:328
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...
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:302
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:33
static TOOL_ACTION zoomRedraw
Definition: actions.h:87
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:133
static TOOL_ACTION listNets
Definition: pcb_actions.h:323
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:125
static TOOL_ACTION acceleratedGraphics
Definition: actions.h:158
static TOOL_ACTION runDRC
Definition: pcb_actions.h:324
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:232
const BITMAP_OPAQUE undo_xpm[1]
Definition: undo.cpp:74
static TOOL_ACTION gridProperties
Definition: actions.h:136
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:279
static TOOL_ACTION gridSetOrigin
Definition: actions.h:132
const BITMAP_OPAQUE library_archive_xpm[1]
const BITMAP_OPAQUE preference_xpm[1]
Definition: preference.cpp:66
static TOOL_ACTION configurePaths
Definition: actions.h:166
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:229
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:317
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:233
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