You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

485 lines
19 KiB

16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
  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-2022 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. #include <advanced_config.h>
  27. #include <bitmaps.h>
  28. #include <file_history.h>
  29. #include <kiface_base.h>
  30. #include <menus_helpers.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>
  38. #include <tools/pcb_selection_tool.h>
  39. #include <widgets/wx_menubar.h>
  40. void PCB_EDIT_FRAME::doReCreateMenuBar()
  41. {
  42. PCB_SELECTION_TOOL* selTool = m_toolManager->GetTool<PCB_SELECTION_TOOL>();
  43. // wxWidgets handles the Mac Application menu behind the scenes, but that means
  44. // we always have to start from scratch with a new wxMenuBar.
  45. wxMenuBar* oldMenuBar = GetMenuBar();
  46. WX_MENUBAR* menuBar = new WX_MENUBAR();
  47. // Recreate all menus:
  48. //-- File menu -----------------------------------------------------------
  49. //
  50. ACTION_MENU* fileMenu = new ACTION_MENU( false, selTool );
  51. static ACTION_MENU* openRecentMenu;
  52. if( Kiface().IsSingle() ) // not when under a project mgr
  53. {
  54. FILE_HISTORY& fileHistory = GetFileHistory();
  55. // Create the menu if it does not exist. Adding a file to/from the history
  56. // will automatically refresh the menu.
  57. if( !openRecentMenu )
  58. {
  59. openRecentMenu = new ACTION_MENU( false, selTool );
  60. openRecentMenu->SetIcon( BITMAPS::recent );
  61. fileHistory.UseMenu( openRecentMenu );
  62. fileHistory.AddFilesToMenu();
  63. }
  64. // Ensure the title is up to date after changing language
  65. openRecentMenu->SetTitle( _( "Open Recent" ) );
  66. fileHistory.UpdateClearText( openRecentMenu, _( "Clear Recent Files" ) );
  67. fileMenu->Add( ACTIONS::doNew );
  68. fileMenu->Add( ACTIONS::open );
  69. wxMenuItem* item = fileMenu->Add( openRecentMenu->Clone() );
  70. // Add the file menu condition here since it needs the item ID for the submenu
  71. ACTION_CONDITIONS cond;
  72. cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
  73. RegisterUIUpdateHandler( item->GetId(), cond );
  74. }
  75. fileMenu->Add( PCB_ACTIONS::appendBoard );
  76. fileMenu->AppendSeparator();
  77. fileMenu->Add( ACTIONS::save );
  78. // Save as menu:
  79. // under a project mgr we do not want to modify the board filename
  80. // to keep consistency with the project mgr which expects files names same as prj name
  81. // for main files
  82. if( Kiface().IsSingle() )
  83. fileMenu->Add( ACTIONS::saveAs );
  84. else
  85. fileMenu->Add( ACTIONS::saveCopy );
  86. fileMenu->Add( ACTIONS::revert );
  87. fileMenu->AppendSeparator();
  88. fileMenu->Add( _( "Resc&ue" ),
  89. _( "Clear board and get last rescue file automatically saved by PCB editor" ),
  90. ID_MENU_RECOVER_BOARD_AUTOSAVE,
  91. BITMAPS::rescue );
  92. // Import submenu
  93. ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
  94. submenuImport->SetTitle( _( "Import" ) );
  95. submenuImport->SetIcon( BITMAPS::import );
  96. submenuImport->Add( PCB_ACTIONS::importNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
  97. submenuImport->Add( PCB_ACTIONS::importSpecctraSession, ACTION_MENU::NORMAL, _( "Specctra Session..." ) );
  98. submenuImport->Add( PCB_ACTIONS::placeImportedGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
  99. submenuImport->Add( _( "Non-KiCad Board File..." ),
  100. _( "Import board file from other applications" ),
  101. ID_IMPORT_NON_KICAD_BOARD, BITMAPS::import_brd_file );
  102. fileMenu->AppendSeparator();
  103. fileMenu->Add( submenuImport );
  104. // Export submenu
  105. ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
  106. submenuExport->SetTitle( _( "Export" ) );
  107. submenuExport->SetIcon( BITMAPS::export_file );
  108. submenuExport->Add( PCB_ACTIONS::exportSpecctraDSN, ACTION_MENU::NORMAL, _( "Specctra DSN..." ) );
  109. submenuExport->Add( _( "GenCAD..." ), _( "Export GenCAD board representation" ),
  110. ID_GEN_EXPORT_FILE_GENCADFORMAT, BITMAPS::post_gencad );
  111. submenuExport->Add( _( "VRML..." ), _( "Export VRML 3D board representation" ),
  112. ID_GEN_EXPORT_FILE_VRML, BITMAPS::export3d );
  113. submenuExport->Add( _( "IDFv3..." ), _( "Export IDF 3D board representation" ),
  114. ID_GEN_EXPORT_FILE_IDF3, BITMAPS::export_idf );
  115. submenuExport->Add( _( "STEP..." ), _( "Export STEP 3D board representation" ),
  116. ID_GEN_EXPORT_FILE_STEP, BITMAPS::export_step );
  117. submenuExport->Add( _( "SVG..." ), _( "Export SVG board representation" ),
  118. ID_GEN_PLOT_SVG, BITMAPS::export_svg );
  119. submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
  120. _( "Export footprint association file (*.cmp) for schematic back annotation" ),
  121. ID_PCB_GEN_CMP_FILE, BITMAPS::export_cmp );
  122. submenuExport->Add( _( "Hyperlynx..." ), wxEmptyString,
  123. ID_GEN_EXPORT_FILE_HYPERLYNX, BITMAPS::export_step );
  124. if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
  125. submenuExport->Add( *m_exportNetlistAction );
  126. submenuExport->AppendSeparator();
  127. submenuExport->Add( _( "Footprints to Library..." ),
  128. _( "Add footprints used on board to an existing footprint library\n"
  129. "(does not remove other footprints from this library)" ),
  130. ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY, BITMAPS::library_archive );
  131. submenuExport->Add( _( "Footprints to New Library..." ),
  132. _( "Create a new footprint library containing the footprints used on board\n"
  133. "(if the library already exists it will be replaced)" ),
  134. ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY, BITMAPS::library_archive_as );
  135. fileMenu->Add( submenuExport );
  136. // Fabrication Outputs submenu
  137. ACTION_MENU* submenuFabOutputs = new ACTION_MENU( false, selTool );
  138. submenuFabOutputs->SetTitle( _( "Fabrication Outputs" ) );
  139. submenuFabOutputs->SetIcon( BITMAPS::fabrication );
  140. submenuFabOutputs->Add( PCB_ACTIONS::generateGerbers );
  141. submenuFabOutputs->Add( PCB_ACTIONS::generateDrillFiles );
  142. submenuFabOutputs->Add( PCB_ACTIONS::generatePosFile );
  143. submenuFabOutputs->Add( PCB_ACTIONS::generateReportFile );
  144. submenuFabOutputs->Add( PCB_ACTIONS::generateD356File );
  145. submenuFabOutputs->Add( PCB_ACTIONS::generateBOM );
  146. fileMenu->Add( submenuFabOutputs );
  147. fileMenu->AppendSeparator();
  148. fileMenu->Add( PCB_ACTIONS::boardSetup );
  149. fileMenu->AppendSeparator();
  150. fileMenu->Add( ACTIONS::pageSettings );
  151. fileMenu->Add( ACTIONS::print );
  152. fileMenu->Add( ACTIONS::plot );
  153. fileMenu->AppendSeparator();
  154. fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
  155. //-- Edit menu -----------------------------------------------------------
  156. //
  157. ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
  158. editMenu->Add( ACTIONS::undo );
  159. editMenu->Add( ACTIONS::redo );
  160. editMenu->AppendSeparator();
  161. editMenu->Add( ACTIONS::cut );
  162. editMenu->Add( ACTIONS::copy );
  163. editMenu->Add( ACTIONS::paste );
  164. editMenu->Add( ACTIONS::pasteSpecial );
  165. editMenu->Add( ACTIONS::doDelete );
  166. editMenu->AppendSeparator();
  167. editMenu->Add( ACTIONS::selectAll );
  168. editMenu->AppendSeparator();
  169. editMenu->Add( ACTIONS::find );
  170. editMenu->AppendSeparator();
  171. editMenu->Add( PCB_ACTIONS::editTracksAndVias );
  172. editMenu->Add( PCB_ACTIONS::editTextAndGraphics );
  173. editMenu->Add( PCB_ACTIONS::changeFootprints );
  174. editMenu->Add( PCB_ACTIONS::swapLayers );
  175. editMenu->AppendSeparator();
  176. editMenu->Add( PCB_ACTIONS::zoneFillAll );
  177. editMenu->Add( PCB_ACTIONS::zoneUnfillAll );
  178. editMenu->AppendSeparator();
  179. editMenu->Add( ACTIONS::deleteTool );
  180. editMenu->Add( PCB_ACTIONS::globalDeletions );
  181. //----- View menu -----------------------------------------------------------
  182. //
  183. ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
  184. viewMenu->Add( ACTIONS::showFootprintBrowser );
  185. viewMenu->Add( PCB_ACTIONS::showProperties, ACTION_MENU::CHECK );
  186. viewMenu->Add( PCB_ACTIONS::showSearch, ACTION_MENU::CHECK );
  187. viewMenu->Add( ACTIONS::show3DViewer );
  188. viewMenu->AppendSeparator();
  189. viewMenu->Add( ACTIONS::zoomInCenter );
  190. viewMenu->Add( ACTIONS::zoomOutCenter );
  191. viewMenu->Add( ACTIONS::zoomFitScreen );
  192. viewMenu->Add( ACTIONS::zoomFitObjects );
  193. viewMenu->Add( ACTIONS::zoomTool );
  194. viewMenu->Add( ACTIONS::zoomRedraw );
  195. viewMenu->AppendSeparator();
  196. viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK );
  197. viewMenu->Add( ACTIONS::gridProperties );
  198. viewMenu->Add( PCB_ACTIONS::togglePolarCoords, ACTION_MENU::CHECK );
  199. // Units submenu
  200. ACTION_MENU* unitsSubMenu = new ACTION_MENU( false, selTool );
  201. unitsSubMenu->SetTitle( _( "&Units" ) );
  202. unitsSubMenu->SetIcon( BITMAPS::unit_mm );
  203. unitsSubMenu->Add( ACTIONS::inchesUnits, ACTION_MENU::CHECK );
  204. unitsSubMenu->Add( ACTIONS::milsUnits, ACTION_MENU::CHECK );
  205. unitsSubMenu->Add( ACTIONS::millimetersUnits, ACTION_MENU::CHECK );
  206. viewMenu->Add( unitsSubMenu );
  207. viewMenu->Add( ACTIONS::toggleCursorStyle, ACTION_MENU::CHECK );
  208. viewMenu->AppendSeparator();
  209. viewMenu->Add( PCB_ACTIONS::showRatsnest, ACTION_MENU::CHECK );
  210. viewMenu->Add( PCB_ACTIONS::ratsnestLineMode, ACTION_MENU::CHECK );
  211. viewMenu->AppendSeparator();
  212. // Drawing Mode Submenu
  213. ACTION_MENU* drawingModeSubMenu = new ACTION_MENU( false, selTool );
  214. drawingModeSubMenu->SetTitle( _( "&Drawing Mode" ) );
  215. drawingModeSubMenu->SetIcon( BITMAPS::add_zone );
  216. drawingModeSubMenu->Add( PCB_ACTIONS::zoneDisplayFilled, ACTION_MENU::CHECK );
  217. drawingModeSubMenu->Add( PCB_ACTIONS::zoneDisplayOutline, ACTION_MENU::CHECK );
  218. if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
  219. {
  220. drawingModeSubMenu->Add( PCB_ACTIONS::zoneDisplayFractured, ACTION_MENU::CHECK );
  221. drawingModeSubMenu->Add( PCB_ACTIONS::zoneDisplayTriangulated, ACTION_MENU::CHECK );
  222. }
  223. drawingModeSubMenu->AppendSeparator();
  224. drawingModeSubMenu->Add( PCB_ACTIONS::padDisplayMode, ACTION_MENU::CHECK );
  225. drawingModeSubMenu->Add( PCB_ACTIONS::viaDisplayMode, ACTION_MENU::CHECK );
  226. drawingModeSubMenu->Add( PCB_ACTIONS::trackDisplayMode, ACTION_MENU::CHECK );
  227. drawingModeSubMenu->AppendSeparator();
  228. drawingModeSubMenu->Add( PCB_ACTIONS::graphicsOutlines, ACTION_MENU::CHECK );
  229. drawingModeSubMenu->Add( PCB_ACTIONS::textOutlines, ACTION_MENU::CHECK );
  230. viewMenu->Add( drawingModeSubMenu );
  231. // Contrast Mode Submenu
  232. ACTION_MENU* contrastModeSubMenu = new ACTION_MENU( false, selTool );
  233. contrastModeSubMenu->SetTitle( _( "&Contrast Mode" ) );
  234. contrastModeSubMenu->SetIcon( BITMAPS::contrast_mode );
  235. contrastModeSubMenu->Add( ACTIONS::highContrastMode, ACTION_MENU::CHECK );
  236. contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaDec );
  237. contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
  238. viewMenu->Add( contrastModeSubMenu );
  239. viewMenu->Add( PCB_ACTIONS::flipBoard, ACTION_MENU::CHECK );
  240. viewMenu->AppendSeparator();
  241. viewMenu->Add( PCB_ACTIONS::showLayersManager, ACTION_MENU::CHECK );
  242. #ifdef __APPLE__
  243. viewMenu->AppendSeparator();
  244. #endif
  245. //-- Place Menu ----------------------------------------------------------
  246. //
  247. ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
  248. placeMenu->Add( PCB_ACTIONS::placeFootprint );
  249. placeMenu->Add( PCB_ACTIONS::drawVia );
  250. placeMenu->Add( PCB_ACTIONS::drawZone );
  251. placeMenu->Add( PCB_ACTIONS::drawRuleArea );
  252. ACTION_MENU* muwaveSubmenu = new ACTION_MENU( false, selTool );
  253. muwaveSubmenu->SetTitle( _( "Add Microwave Shape" ) );
  254. muwaveSubmenu->SetIcon( BITMAPS::mw_add_line );
  255. muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateLine );
  256. muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateGap );
  257. muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStub );
  258. muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateStubArc );
  259. muwaveSubmenu->Add( PCB_ACTIONS::microwaveCreateFunctionShape );
  260. placeMenu->Add( muwaveSubmenu );
  261. placeMenu->AppendSeparator();
  262. placeMenu->Add( PCB_ACTIONS::drawLine );
  263. placeMenu->Add( PCB_ACTIONS::drawArc );
  264. placeMenu->Add( PCB_ACTIONS::drawRectangle );
  265. placeMenu->Add( PCB_ACTIONS::drawCircle );
  266. placeMenu->Add( PCB_ACTIONS::drawPolygon );
  267. placeMenu->Add( PCB_ACTIONS::placeImage );
  268. placeMenu->Add( PCB_ACTIONS::placeText );
  269. placeMenu->Add( PCB_ACTIONS::drawTextBox );
  270. placeMenu->AppendSeparator();
  271. placeMenu->Add( PCB_ACTIONS::drawAlignedDimension );
  272. placeMenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
  273. placeMenu->Add( PCB_ACTIONS::drawCenterDimension );
  274. placeMenu->Add( PCB_ACTIONS::drawRadialDimension );
  275. placeMenu->Add( PCB_ACTIONS::drawLeader );
  276. placeMenu->AppendSeparator();
  277. placeMenu->Add( PCB_ACTIONS::placeCharacteristics );
  278. placeMenu->Add( PCB_ACTIONS::placeStackup );
  279. placeMenu->AppendSeparator();
  280. placeMenu->Add( PCB_ACTIONS::drillOrigin );
  281. placeMenu->Add( ACTIONS::gridSetOrigin );
  282. placeMenu->AppendSeparator();
  283. placeMenu->Add( ACTIONS::gridResetOrigin );
  284. placeMenu->AppendSeparator();
  285. ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
  286. autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
  287. autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
  288. autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceOffboardComponents );
  289. autoplaceSubmenu->Add( PCB_ACTIONS::autoplaceSelectedComponents );
  290. placeMenu->Add( autoplaceSubmenu );
  291. //-- Route Menu ----------------------------------------------------------
  292. //
  293. ACTION_MENU* routeMenu = new ACTION_MENU( false, selTool );
  294. routeMenu->Add( PCB_ACTIONS::selectLayerPair );
  295. routeMenu->AppendSeparator();
  296. routeMenu->Add( PCB_ACTIONS::routeSingleTrack );
  297. routeMenu->Add( PCB_ACTIONS::routeDiffPair );
  298. routeMenu->AppendSeparator();
  299. routeMenu->Add( PCB_ACTIONS::routerTuneSingleTrace );
  300. routeMenu->Add( PCB_ACTIONS::routerTuneDiffPair );
  301. routeMenu->Add( PCB_ACTIONS::routerTuneDiffPairSkew );
  302. routeMenu->AppendSeparator();
  303. routeMenu->Add( PCB_ACTIONS::routerSettingsDialog );
  304. //-- Inspect Menu --------------------------------------------------------
  305. //
  306. ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
  307. inspectMenu->Add( PCB_ACTIONS::listNets );
  308. inspectMenu->Add( PCB_ACTIONS::boardStatistics );
  309. inspectMenu->Add( ACTIONS::measureTool );
  310. inspectMenu->AppendSeparator();
  311. inspectMenu->Add( PCB_ACTIONS::runDRC );
  312. inspectMenu->Add( ACTIONS::prevMarker );
  313. inspectMenu->Add( ACTIONS::nextMarker );
  314. inspectMenu->Add( ACTIONS::excludeMarker );
  315. inspectMenu->AppendSeparator();
  316. inspectMenu->Add( PCB_ACTIONS::inspectClearance );
  317. inspectMenu->Add( PCB_ACTIONS::inspectConstraints );
  318. //-- Tools menu ----------------------------------------------------------
  319. //
  320. ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
  321. wxMenuItem* update = toolsMenu->Add( ACTIONS::updatePcbFromSchematic );
  322. update->Enable( !Kiface().IsSingle() );
  323. toolsMenu->Add( PCB_ACTIONS::showEeschema );
  324. toolsMenu->AppendSeparator();
  325. toolsMenu->Add( ACTIONS::showFootprintEditor );
  326. toolsMenu->Add( PCB_ACTIONS::updateFootprints );
  327. // Add/remove teardrops menuitems:
  328. toolsMenu->AppendSeparator();
  329. toolsMenu->Add( _( "Add Teardrops..." ), "", ID_RUN_TEARDROP_TOOL, BITMAPS::via );
  330. toolsMenu->Add( _( "Remove Teardrops" ), "", ID_REMOVE_TEARDROP_TOOL, BITMAPS::via );
  331. toolsMenu->AppendSeparator();
  332. toolsMenu->Add( PCB_ACTIONS::cleanupTracksAndVias );
  333. toolsMenu->Add( PCB_ACTIONS::removeUnusedPads );
  334. toolsMenu->Add( PCB_ACTIONS::cleanupGraphics );
  335. toolsMenu->Add( PCB_ACTIONS::repairBoard );
  336. toolsMenu->AppendSeparator();
  337. toolsMenu->Add( PCB_ACTIONS::boardReannotate );
  338. update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
  339. update->Enable( !Kiface().IsSingle() );
  340. if( SCRIPTING::IsWxAvailable() )
  341. {
  342. toolsMenu->AppendSeparator();
  343. toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
  344. }
  345. ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
  346. submenuActionPlugins->SetTitle( _( "External Plugins" ) );
  347. submenuActionPlugins->SetIcon( BITMAPS::puzzle_piece );
  348. submenuActionPlugins->Add( PCB_ACTIONS::pluginsReload );
  349. submenuActionPlugins->Add( PCB_ACTIONS::pluginsShowFolder );
  350. // Populate the Action Plugin sub-menu: Must be done before Add
  351. // Since the object is cloned by Add
  352. submenuActionPlugins->AppendSeparator();
  353. buildActionPluginMenus( submenuActionPlugins );
  354. toolsMenu->AppendSeparator();
  355. toolsMenu->Add( submenuActionPlugins );
  356. //-- Preferences menu ----------------------------------------------------
  357. //
  358. ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
  359. prefsMenu->Add( ACTIONS::configurePaths );
  360. prefsMenu->Add( ACTIONS::showFootprintLibTable );
  361. // We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
  362. // Mac, and it needs the wxID_PREFERENCES id to find it.
  363. prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
  364. _( "Show preferences for all open tools" ),
  365. wxID_PREFERENCES,
  366. BITMAPS::preference );
  367. prefsMenu->AppendSeparator();
  368. AddMenuLanguageList( prefsMenu, selTool );
  369. //--MenuBar -----------------------------------------------------------
  370. //
  371. menuBar->Append( fileMenu, _( "&File" ) );
  372. menuBar->Append( editMenu, _( "&Edit" ) );
  373. menuBar->Append( viewMenu, _( "&View" ) );
  374. menuBar->Append( placeMenu, _( "&Place" ) );
  375. menuBar->Append( routeMenu, _( "Ro&ute" ) );
  376. menuBar->Append( inspectMenu, _( "&Inspect" ) );
  377. menuBar->Append( toolsMenu, _( "&Tools" ) );
  378. menuBar->Append( prefsMenu, _( "P&references" ) );
  379. AddStandardHelpMenu( menuBar );
  380. SetMenuBar( menuBar );
  381. delete oldMenuBar;
  382. }