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.

1002 lines
41 KiB

3 years ago
3 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2019-2023 CERN
  5. * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. #include <bitmaps.h>
  25. #include <core/typeinfo.h>
  26. #include <layer_ids.h>
  27. #include <sch_line_wire_bus_tool.h>
  28. #include <tools/ee_actions.h>
  29. #include <tool/tool_action.h>
  30. // Actions, being statically-defined, require specialized I18N handling. We continue to
  31. // use the _() macro so that string harvesting by the I18N framework doesn't have to be
  32. // specialized, but we don't translate on initialization and instead do it in the getters.
  33. #undef _
  34. #define _(s) s
  35. // EE_INSPECTION_TOOL
  36. //
  37. TOOL_ACTION EE_ACTIONS::runERC( "eeschema.InspectionTool.runERC",
  38. AS_GLOBAL, 0, "",
  39. _( "Electrical Rules Checker" ), _( "Perform electrical rules check" ),
  40. BITMAPS::erc );
  41. TOOL_ACTION EE_ACTIONS::checkSymbol( "eeschema.InspectionTool.checkSymbol",
  42. AS_GLOBAL, 0, "",
  43. _( "Symbol Checker" ), _( "Show the symbol checker window" ),
  44. BITMAPS::erc );
  45. TOOL_ACTION EE_ACTIONS::showSimulator( "eeschema.EditorControl.showSimulator",
  46. AS_GLOBAL, 0, "",
  47. _( "Simulator..." ), _( "Simulate circuit in SPICE" ),
  48. BITMAPS::simulator );
  49. TOOL_ACTION EE_ACTIONS::showDatasheet( "eeschema.InspectionTool.showDatasheet",
  50. AS_GLOBAL,
  51. 'D', LEGACY_HK_NAME( "Show Datasheet" ),
  52. _( "Show Datasheet" ), _( "Opens the datasheet in a browser" ),
  53. BITMAPS::datasheet );
  54. // EE_POINT_EDITOR
  55. //
  56. TOOL_ACTION EE_ACTIONS::pointEditorAddCorner( "eeschema.PointEditor.addCorner",
  57. AS_GLOBAL, 0, "",
  58. _( "Create Corner" ), _( "Create a corner" ),
  59. BITMAPS::add_corner );
  60. TOOL_ACTION EE_ACTIONS::pointEditorRemoveCorner( "eeschema.PointEditor.removeCorner",
  61. AS_GLOBAL, 0, "",
  62. _( "Remove Corner" ), _( "Remove corner" ),
  63. BITMAPS::delete_cursor );
  64. // EE_SELECTION_TOOL
  65. //
  66. TOOL_ACTION EE_ACTIONS::selectionActivate( "eeschema.InteractiveSelection",
  67. AS_GLOBAL, 0, "", "", "", // No description, not shown anywhere
  68. BITMAPS::INVALID_BITMAP, AF_ACTIVATE );
  69. TOOL_ACTION EE_ACTIONS::selectNode( "eeschema.InteractiveSelection.SelectNode",
  70. AS_GLOBAL,
  71. MD_ALT + '3', LEGACY_HK_NAME( "Select Node" ),
  72. _( "Select Node" ), _( "Select a connection item under the cursor" ) );
  73. TOOL_ACTION EE_ACTIONS::selectConnection( "eeschema.InteractiveSelection.SelectConnection",
  74. AS_GLOBAL,
  75. MD_ALT + '4', LEGACY_HK_NAME( "Select Connection" ),
  76. _( "Select Connection" ), _( "Select a complete connection" ),
  77. BITMAPS::net_highlight_schematic);
  78. TOOL_ACTION EE_ACTIONS::selectionMenu( "eeschema.InteractiveSelection.SelectionMenu",
  79. AS_GLOBAL );
  80. TOOL_ACTION EE_ACTIONS::addItemToSel( "eeschema.InteractiveSelection.AddItemToSel",
  81. AS_GLOBAL );
  82. TOOL_ACTION EE_ACTIONS::addItemsToSel( "eeschema.InteractiveSelection.AddItemsToSel",
  83. AS_GLOBAL );
  84. TOOL_ACTION EE_ACTIONS::removeItemFromSel( "eeschema.InteractiveSelection.RemoveItemFromSel",
  85. AS_GLOBAL );
  86. TOOL_ACTION EE_ACTIONS::removeItemsFromSel( "eeschema.InteractiveSelection.RemoveItemsFromSel",
  87. AS_GLOBAL );
  88. TOOL_ACTION EE_ACTIONS::clearSelection( "eeschema.InteractiveSelection.ClearSelection",
  89. AS_GLOBAL );
  90. TOOL_ACTION EE_ACTIONS::syncSelection( "eeschema.InteractiveSelection.SyncSelection",
  91. AS_GLOBAL );
  92. // SYMBOL_EDITOR_CONTROL
  93. //
  94. TOOL_ACTION EE_ACTIONS::saveLibraryAs( "eeschema.SymbolLibraryControl.saveLibraryAs",
  95. AS_GLOBAL,
  96. MD_SHIFT + MD_CTRL + 'S', LEGACY_HK_NAME( "Save As" ),
  97. _( "Save Library As..." ), _( "Save the current library to a new file." ) );
  98. TOOL_ACTION EE_ACTIONS::newSymbol( "eeschema.SymbolLibraryControl.newSymbol",
  99. AS_GLOBAL,
  100. 'N', "",
  101. _( "New Symbol..." ), _( "Create a new symbol" ),
  102. BITMAPS::new_component );
  103. TOOL_ACTION EE_ACTIONS::deriveFromExistingSymbol( "eeschema.SymbolLibraryControl.deriveFromExistingSymbol",
  104. AS_GLOBAL, 0, "",
  105. _( "Derive from existing symbol" ), _( "Create a new symbol, derived from an existing symbol" ),
  106. BITMAPS::new_component );
  107. TOOL_ACTION EE_ACTIONS::editSymbol( "eeschema.SymbolLibraryControl.editSymbol",
  108. AS_GLOBAL, 0, "",
  109. _( "Edit Symbol" ), _( "Show selected symbol on editor canvas" ),
  110. BITMAPS::edit );
  111. TOOL_ACTION EE_ACTIONS::duplicateSymbol( "eeschema.SymbolLibraryControl.duplicateSymbol",
  112. AS_GLOBAL, 0, "",
  113. _( "Duplicate Symbol" ), _( "Make a copy of the selected symbol" ),
  114. BITMAPS::duplicate );
  115. TOOL_ACTION EE_ACTIONS::renameSymbol( "eeschema.SymbolLibraryControl.renameFootprint",
  116. AS_GLOBAL, 0, "",
  117. _( "Rename Symbol..." ), _( "Rename the selected symbol" ),
  118. BITMAPS::edit );
  119. TOOL_ACTION EE_ACTIONS::saveSymbolAs( "eeschema.SymbolLibraryControl.saveSymbolAs",
  120. AS_GLOBAL, 0, "",
  121. _( "Save As..." ), _( "Save the current symbol to a different library." ),
  122. BITMAPS::save_as );
  123. TOOL_ACTION EE_ACTIONS::deleteSymbol( "eeschema.SymbolLibraryControl.deleteSymbol",
  124. AS_GLOBAL, 0, "",
  125. _( "Delete Symbol" ), _( "Remove the selected symbol from its library" ),
  126. BITMAPS::trash );
  127. TOOL_ACTION EE_ACTIONS::cutSymbol( "eeschema.SymbolLibraryControl.cutSymbol",
  128. AS_GLOBAL, 0, "",
  129. _( "Cut" ), "",
  130. BITMAPS::cut );
  131. TOOL_ACTION EE_ACTIONS::copySymbol( "eeschema.SymbolLibraryControl.copySymbol",
  132. AS_GLOBAL, 0, "",
  133. _( "Copy" ), "",
  134. BITMAPS::copy );
  135. TOOL_ACTION EE_ACTIONS::pasteSymbol( "eeschema.SymbolLibraryControl.pasteSymbol",
  136. AS_GLOBAL, 0, "",
  137. _( "Paste Symbol" ), "",
  138. BITMAPS::paste );
  139. TOOL_ACTION EE_ACTIONS::importSymbol( "eeschema.SymbolLibraryControl.importSymbol",
  140. AS_GLOBAL, 0, "",
  141. _( "Import Symbol..." ), _( "Import a symbol to the current library" ),
  142. BITMAPS::import_part );
  143. TOOL_ACTION EE_ACTIONS::exportSymbol( "eeschema.SymbolLibraryControl.exportSymbol",
  144. AS_GLOBAL, 0, "",
  145. _( "Export..." ), _( "Export a symbol to a new library file" ),
  146. BITMAPS::export_part );
  147. TOOL_ACTION EE_ACTIONS::updateSymbolFields( "eeschema.SymbolLibraryControl.updateSymbolFields",
  148. AS_GLOBAL, 0, "",
  149. _( "Update Symbol Fields..." ), _( "Update symbol to match changes made in parent symbol" ),
  150. BITMAPS::refresh );
  151. TOOL_ACTION EE_ACTIONS::setUnitDisplayName( "eeschema.SymbolLibraryControl.setUnitDisplayName",
  152. AS_GLOBAL, 0, "", _( "Set Unit Display Name..." ),
  153. _( "Set the display name for a unit" ) );
  154. TOOL_ACTION EE_ACTIONS::addSymbolToSchematic( "eeschema.SymbolLibraryControl.addSymbolToSchematic",
  155. AS_GLOBAL, 0, "",
  156. _( "Add Symbol to Schematic" ), _( "Add Symbol to Schematic" ),
  157. BITMAPS::add_symbol_to_schematic );
  158. TOOL_ACTION EE_ACTIONS::showElectricalTypes( "eeschema.SymbolLibraryControl.showElectricalTypes",
  159. AS_GLOBAL, 0, "",
  160. _( "Show Pin Electrical Types" ), _( "Annotate pins with their electrical types" ),
  161. BITMAPS::pin_show_etype );
  162. TOOL_ACTION EE_ACTIONS::showPinNumbers( "eeschema.SymbolLibraryControl.showPinNumbers",
  163. AS_GLOBAL, 0, "",
  164. _( "Show Pin Numbers" ), _( "Annotate pins with their numbers" ),
  165. BITMAPS::pin );
  166. TOOL_ACTION EE_ACTIONS::showSymbolTree( "eeschema.SymbolLibraryControl.showSymbolTree",
  167. AS_GLOBAL, 0, "",
  168. _( "Show Symbol Tree" ), "",
  169. BITMAPS::search_tree );
  170. TOOL_ACTION EE_ACTIONS::hideSymbolTree( "eeschema.SymbolLibraryControl.hideSymbolTree",
  171. AS_GLOBAL, 0, "",
  172. _( "Hide Symbol Tree" ), "",
  173. BITMAPS::search_tree );
  174. TOOL_ACTION EE_ACTIONS::exportSymbolView( "eeschema.SymbolLibraryControl.exportSymbolView",
  175. AS_GLOBAL, 0, "",
  176. _( "Export View as PNG..." ), _( "Create PNG file from the current view" ),
  177. BITMAPS::export_png );
  178. TOOL_ACTION EE_ACTIONS::exportSymbolAsSVG( "eeschema.SymbolLibraryControl.exportSymbolAsSVG",
  179. AS_GLOBAL, 0, "",
  180. _( "Export Symbol as SVG..." ), _( "Create SVG file from the current symbol" ),
  181. BITMAPS::export_svg );
  182. TOOL_ACTION EE_ACTIONS::toggleSyncedPinsMode( "eeschema.SymbolLibraryControl.toggleSyncedPinsMode",
  183. AS_GLOBAL, 0, "",
  184. _( "Synchronized Pins Mode" ),
  185. _( "Synchronized Pins Mode\n"
  186. "When enabled propagates all changes (except pin numbers) to other units.\n"
  187. "Enabled by default for multiunit parts with interchangeable units." ),
  188. BITMAPS::pin2pin );
  189. // SYMBOL_EDITOR_DRAWING_TOOLS
  190. //
  191. TOOL_ACTION EE_ACTIONS::placeSymbolPin( "eeschema.SymbolDrawing.placeSymbolPin",
  192. AS_GLOBAL,
  193. 'P', LEGACY_HK_NAME( "Create Pin" ),
  194. _( "Add Pin" ), _( "Add a pin" ),
  195. BITMAPS::pin, AF_ACTIVATE, (void*) LIB_PIN_T );
  196. TOOL_ACTION EE_ACTIONS::placeSymbolText( "eeschema.SymbolDrawing.placeSymbolText",
  197. AS_GLOBAL, 0, "",
  198. _( "Add Text" ), _( "Add a text item" ),
  199. BITMAPS::text, AF_ACTIVATE, (void*) LIB_TEXT_T );
  200. TOOL_ACTION EE_ACTIONS::drawSymbolTextBox( "eeschema.SymbolDrawing.drawSymbolTextBox",
  201. AS_GLOBAL, 0, "",
  202. _( "Add Text Box" ), _( "Add a text box item" ),
  203. BITMAPS::add_textbox, AF_ACTIVATE, (void*) LIB_TEXTBOX_T );
  204. TOOL_ACTION EE_ACTIONS::drawSymbolLines( "eeschema.SymbolDrawing.drawSymbolLines",
  205. AS_GLOBAL, 0, "",
  206. _( "Add Lines" ), _( "Add connected graphic lines" ),
  207. BITMAPS::add_graphical_segments, AF_ACTIVATE, (void*) SHAPE_T::POLY );
  208. TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( "eeschema.SymbolDrawing.placeSymbolAnchor",
  209. AS_GLOBAL, 0, "",
  210. _( "Move Symbol Anchor" ), _( "Specify a new location for the symbol anchor" ),
  211. BITMAPS::anchor, AF_ACTIVATE );
  212. TOOL_ACTION EE_ACTIONS::finishDrawing( "eeschema.SymbolDrawing.finishDrawing",
  213. AS_GLOBAL, 0, "",
  214. _( "Finish Drawing" ), _( "Finish drawing shape" ),
  215. BITMAPS::checked_ok, AF_NONE );
  216. // SYMBOL_EDITOR_PIN_TOOL
  217. //
  218. TOOL_ACTION EE_ACTIONS::pushPinLength( "eeschema.PinEditing.pushPinLength",
  219. AS_GLOBAL, 0, "",
  220. _( "Push Pin Length" ), _( "Copy pin length to other pins in symbol" ),
  221. BITMAPS::pin_size_to );
  222. TOOL_ACTION EE_ACTIONS::pushPinNameSize( "eeschema.PinEditing.pushPinNameSize",
  223. AS_GLOBAL, 0, "",
  224. _( "Push Pin Name Size" ), _( "Copy pin name size to other pins in symbol" ),
  225. BITMAPS::pin_size_to );
  226. TOOL_ACTION EE_ACTIONS::pushPinNumSize( "eeschema.PinEditing.pushPinNumSize",
  227. AS_GLOBAL, 0, "",
  228. _( "Push Pin Number Size" ), _( "Copy pin number size to other pins in symbol" ),
  229. BITMAPS::pin_size_to );
  230. // SCH_DRAWING_TOOLS
  231. //
  232. TOOL_ACTION EE_ACTIONS::placeSymbol( "eeschema.InteractiveDrawing.placeSymbol",
  233. AS_GLOBAL,
  234. 'A', LEGACY_HK_NAME( "Add Symbol" ),
  235. _( "Add Symbol" ), _( "Add a symbol" ),
  236. BITMAPS::add_component, AF_ACTIVATE );
  237. TOOL_ACTION EE_ACTIONS::placePower( "eeschema.InteractiveDrawing.placePowerSymbol",
  238. AS_GLOBAL,
  239. 'P', LEGACY_HK_NAME( "Add Power" ),
  240. _( "Add Power" ), _( "Add a power symbol" ),
  241. BITMAPS::add_power, AF_ACTIVATE );
  242. TOOL_ACTION EE_ACTIONS::placeNoConnect( "eeschema.InteractiveDrawing.placeNoConnect",
  243. AS_GLOBAL,
  244. 'Q', LEGACY_HK_NAME( "Add No Connect Flag" ),
  245. _( "Add No Connect Flag" ), _( "Add a no-connection flag" ),
  246. BITMAPS::noconn, AF_ACTIVATE, (void*) SCH_NO_CONNECT_T );
  247. TOOL_ACTION EE_ACTIONS::placeJunction( "eeschema.InteractiveDrawing.placeJunction",
  248. AS_GLOBAL,
  249. 'J', LEGACY_HK_NAME( "Add Junction" ),
  250. _( "Add Junction" ), _( "Add a junction" ),
  251. BITMAPS::add_junction, AF_ACTIVATE, (void*) SCH_JUNCTION_T );
  252. TOOL_ACTION EE_ACTIONS::placeBusWireEntry( "eeschema.InteractiveDrawing.placeBusWireEntry",
  253. AS_GLOBAL,
  254. 'Z', LEGACY_HK_NAME( "Add Wire Entry" ),
  255. _( "Add Wire to Bus Entry" ), _( "Add a wire entry to a bus" ),
  256. BITMAPS::add_line2bus, AF_ACTIVATE, (void*) SCH_BUS_WIRE_ENTRY_T );
  257. TOOL_ACTION EE_ACTIONS::placeLabel( "eeschema.InteractiveDrawing.placeLabel",
  258. AS_GLOBAL,
  259. 'L', LEGACY_HK_NAME( "Add Label" ),
  260. _( "Add Label" ), _( "Add a net label" ),
  261. BITMAPS::add_label, AF_ACTIVATE );
  262. TOOL_ACTION EE_ACTIONS::placeClassLabel( "eeschema.InteractiveDrawing.placeClassLabel",
  263. AS_GLOBAL, 0, "",
  264. _( "Add Net Class Directive" ), _( "Add a net class directive label" ),
  265. BITMAPS::add_class_flag, AF_ACTIVATE );
  266. TOOL_ACTION EE_ACTIONS::placeHierLabel( "eeschema.InteractiveDrawing.placeHierarchicalLabel",
  267. AS_GLOBAL,
  268. 'H', LEGACY_HK_NAME( "Add Hierarchical Label" ),
  269. _( "Add Hierarchical Label" ), _( "Add a hierarchical label" ),
  270. BITMAPS::add_hierarchical_label, AF_ACTIVATE );
  271. TOOL_ACTION EE_ACTIONS::drawSheet( "eeschema.InteractiveDrawing.drawSheet",
  272. AS_GLOBAL,
  273. 'S', LEGACY_HK_NAME( "Add Sheet" ),
  274. _( "Add Sheet" ), _( "Add a hierarchical sheet" ),
  275. BITMAPS::add_hierarchical_subsheet, AF_ACTIVATE, (void*) SCH_SHEET_T );
  276. TOOL_ACTION EE_ACTIONS::importSheetPin( "eeschema.InteractiveDrawing.importSheetPin",
  277. AS_GLOBAL, 0, "",
  278. _( "Import Sheet Pin" ), _( "Import a hierarchical sheet pin" ),
  279. BITMAPS::import_hierarchical_label, AF_ACTIVATE );
  280. TOOL_ACTION EE_ACTIONS::placeGlobalLabel( "eeschema.InteractiveDrawing.placeGlobalLabel",
  281. AS_GLOBAL,
  282. MD_CTRL + 'L', LEGACY_HK_NAME( "Add Global Label" ),
  283. _( "Add Global Label" ), _( "Add a global label" ),
  284. BITMAPS::add_glabel, AF_ACTIVATE );
  285. TOOL_ACTION EE_ACTIONS::placeSchematicText( "eeschema.InteractiveDrawing.placeSchematicText",
  286. AS_GLOBAL,
  287. 'T', LEGACY_HK_NAME( "Add Graphic Text" ),
  288. _( "Add Text" ), _( "Add text" ),
  289. BITMAPS::text, AF_ACTIVATE );
  290. TOOL_ACTION EE_ACTIONS::drawTextBox( "eeschema.InteractiveDrawing.drawTextBox",
  291. AS_GLOBAL, 0, "",
  292. _( "Add Text Box" ), _( "Add a text box" ),
  293. BITMAPS::add_textbox, AF_ACTIVATE, (void*) SHAPE_T::RECT );
  294. TOOL_ACTION EE_ACTIONS::drawRectangle( "eeschema.InteractiveDrawing.drawRectangle",
  295. AS_GLOBAL, 0, "",
  296. _( "Add Rectangle" ), _( "Add a rectangle" ),
  297. BITMAPS::add_rectangle, AF_ACTIVATE, (void*) SHAPE_T::RECT );
  298. TOOL_ACTION EE_ACTIONS::drawCircle( "eeschema.InteractiveDrawing.drawCircle",
  299. AS_GLOBAL, 0, "",
  300. _( "Add Circle" ), _( "Add a circle" ),
  301. BITMAPS::add_circle, AF_ACTIVATE, (void*) SHAPE_T::CIRCLE );
  302. TOOL_ACTION EE_ACTIONS::drawArc( "eeschema.InteractiveDrawing.drawArc",
  303. AS_GLOBAL, 0, "",
  304. _( "Add Arc" ), _( "Add an arc" ),
  305. BITMAPS::add_arc, AF_ACTIVATE, (void*) SHAPE_T::ARC );
  306. TOOL_ACTION EE_ACTIONS::placeImage( "eeschema.InteractiveDrawing.placeImage",
  307. AS_GLOBAL, 0, "",
  308. _( "Add Image" ), _( "Add bitmap image" ),
  309. BITMAPS::image, AF_ACTIVATE );
  310. TOOL_ACTION EE_ACTIONS::finishSheet( "eeschema.InteractiveDrawing.finishSheet",
  311. AS_GLOBAL, 0, "",
  312. _( "Finish Sheet" ), _( "Finish drawing sheet" ),
  313. BITMAPS::checked_ok, AF_NONE );
  314. // SCH_EDIT_TOOL
  315. //
  316. TOOL_ACTION EE_ACTIONS::repeatDrawItem( "eeschema.InteractiveEdit.repeatDrawItem",
  317. AS_GLOBAL,
  318. #ifdef __WXMAC__
  319. WXK_F1, LEGACY_HK_NAME( "Repeat Last Item" ),
  320. #else
  321. WXK_INSERT, LEGACY_HK_NAME( "Repeat Last Item" ),
  322. #endif
  323. _( "Repeat Last Item" ), _( "Duplicates the last drawn item" ) );
  324. TOOL_ACTION EE_ACTIONS::rotateCW( "eeschema.InteractiveEdit.rotateCW",
  325. AS_GLOBAL, 0, "",
  326. _( "Rotate Clockwise" ), _( "Rotates selected item(s) clockwise" ),
  327. BITMAPS::rotate_cw );
  328. TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW",
  329. AS_GLOBAL,
  330. 'R', LEGACY_HK_NAME( "Rotate Item" ),
  331. _( "Rotate Counterclockwise" ), _( "Rotates selected item(s) counter-clockwise" ),
  332. BITMAPS::rotate_ccw );
  333. TOOL_ACTION EE_ACTIONS::mirrorV( "eeschema.InteractiveEdit.mirrorV",
  334. AS_GLOBAL,
  335. 'Y', LEGACY_HK_NAME( "Mirror X" ), // Yes, these were backwards prior to 6.0....
  336. _( "Mirror Vertically" ), _( "Flips selected item(s) from top to bottom" ),
  337. BITMAPS::mirror_v );
  338. TOOL_ACTION EE_ACTIONS::mirrorH( "eeschema.InteractiveEdit.mirrorH",
  339. AS_GLOBAL,
  340. 'X', LEGACY_HK_NAME( "Mirror Y" ), // Yes, these were backwards prior to 6.0....
  341. _( "Mirror Horizontally" ), _( "Flips selected item(s) from left to right" ),
  342. BITMAPS::mirror_h );
  343. TOOL_ACTION EE_ACTIONS::swap( "eeschema.InteractiveEdit.swap",
  344. AS_GLOBAL,
  345. 'S', "",
  346. _( "Swap" ), _( "Swaps selected items' positions" ),
  347. BITMAPS::swap );
  348. TOOL_ACTION EE_ACTIONS::properties( "eeschema.InteractiveEdit.properties",
  349. AS_GLOBAL,
  350. 'E', LEGACY_HK_NAME( "Edit Item" ),
  351. _( "Properties..." ), _( "Displays item properties dialog" ),
  352. BITMAPS::edit );
  353. TOOL_ACTION EE_ACTIONS::editReference( "eeschema.InteractiveEdit.editReference",
  354. AS_GLOBAL,
  355. 'U', LEGACY_HK_NAME( "Edit Symbol Reference" ),
  356. _( "Edit Reference Designator..." ), _( "Displays reference designator dialog" ),
  357. BITMAPS::edit_comp_ref );
  358. TOOL_ACTION EE_ACTIONS::editValue( "eeschema.InteractiveEdit.editValue",
  359. AS_GLOBAL,
  360. 'V', LEGACY_HK_NAME( "Edit Symbol Value" ),
  361. _( "Edit Value..." ), _( "Displays value field dialog" ),
  362. BITMAPS::edit_comp_value );
  363. TOOL_ACTION EE_ACTIONS::editFootprint( "eeschema.InteractiveEdit.editFootprint",
  364. AS_GLOBAL,
  365. 'F', LEGACY_HK_NAME( "Edit Symbol Footprint" ),
  366. _( "Edit Footprint..." ), _( "Displays footprint field dialog" ),
  367. BITMAPS::edit_comp_footprint );
  368. TOOL_ACTION EE_ACTIONS::autoplaceFields( "eeschema.InteractiveEdit.autoplaceFields",
  369. AS_GLOBAL,
  370. 'O', LEGACY_HK_NAME( "Autoplace Fields" ),
  371. _( "Autoplace Fields" ), _( "Runs the automatic placement algorithm on the symbol or sheet's fields" ),
  372. BITMAPS::autoplace_fields );
  373. TOOL_ACTION EE_ACTIONS::changeSymbols( "eeschema.InteractiveEdit.changeSymbols",
  374. AS_GLOBAL, 0, "",
  375. _( "Change Symbols..." ),
  376. _( "Assign different symbols from the library" ),
  377. BITMAPS::exchange );
  378. TOOL_ACTION EE_ACTIONS::updateSymbols( "eeschema.InteractiveEdit.updateSymbols",
  379. AS_GLOBAL, 0, "",
  380. _( "Update Symbols from Library..." ),
  381. _( "Update symbols to include any changes from the library" ),
  382. BITMAPS::refresh );
  383. TOOL_ACTION EE_ACTIONS::changeSymbol( "eeschema.InteractiveEdit.changeSymbol",
  384. AS_GLOBAL, 0, "",
  385. _( "Change Symbol..." ),
  386. _( "Assign a different symbol from the library" ),
  387. BITMAPS::exchange );
  388. TOOL_ACTION EE_ACTIONS::updateSymbol( "eeschema.InteractiveEdit.updateSymbol",
  389. AS_GLOBAL, 0, "",
  390. _( "Update Symbol..." ),
  391. _( "Update symbol to include any changes from the library" ),
  392. BITMAPS::refresh );
  393. TOOL_ACTION EE_ACTIONS::assignNetclass( "eeschema.InteractiveEdit.assignNetclass",
  394. AS_GLOBAL, 0, "",
  395. _( "Assign Netclass..." ), _( "Assign a netclass to nets matching a pattern" ),
  396. BITMAPS::netlist);
  397. TOOL_ACTION EE_ACTIONS::toggleDeMorgan( "eeschema.InteractiveEdit.toggleDeMorgan",
  398. AS_GLOBAL, 0, "",
  399. _( "De Morgan Conversion" ), _( "Switch between De Morgan representations" ),
  400. BITMAPS::morgan2 );
  401. TOOL_ACTION EE_ACTIONS::showDeMorganStandard( "eeschema.InteractiveEdit.showDeMorganStandard",
  402. AS_GLOBAL, 0, "",
  403. _( "De Morgan Standard" ), _( "Switch to standard De Morgan representation" ),
  404. BITMAPS::morgan1 );
  405. TOOL_ACTION EE_ACTIONS::showDeMorganAlternate( "eeschema.InteractiveEdit.showDeMorganAlternate",
  406. AS_GLOBAL, 0, "",
  407. _( "De Morgan Alternate" ), _( "Switch to alternate De Morgan representation" ),
  408. BITMAPS::morgan2 );
  409. TOOL_ACTION EE_ACTIONS::toLabel( "eeschema.InteractiveEdit.toLabel",
  410. AS_GLOBAL, 0, "",
  411. _( "Change to Label" ), _( "Change existing item to a label" ),
  412. BITMAPS::add_line_label, AF_NONE, (void*) SCH_LABEL_T );
  413. TOOL_ACTION EE_ACTIONS::toCLabel( "eeschema.InteractiveEdit.toCLabel",
  414. AS_GLOBAL, 0, "",
  415. _( "Change to Directive Label" ), _( "Change existing item to a directive label" ),
  416. BITMAPS::add_class_flag, AF_NONE, (void*) SCH_DIRECTIVE_LABEL_T );
  417. TOOL_ACTION EE_ACTIONS::toHLabel( "eeschema.InteractiveEdit.toHLabel",
  418. AS_GLOBAL, 0, "",
  419. _( "Change to Hierarchical Label" ), _( "Change existing item to a hierarchical label" ),
  420. BITMAPS::add_hierarchical_label, AF_NONE, (void*) SCH_HIER_LABEL_T );
  421. TOOL_ACTION EE_ACTIONS::toGLabel( "eeschema.InteractiveEdit.toGLabel",
  422. AS_GLOBAL, 0, "",
  423. _( "Change to Global Label" ), _( "Change existing item to a global label" ),
  424. BITMAPS::add_glabel, AF_NONE, (void*) SCH_GLOBAL_LABEL_T );
  425. TOOL_ACTION EE_ACTIONS::toText( "eeschema.InteractiveEdit.toText",
  426. AS_GLOBAL, 0, "",
  427. _( "Change to Text" ), _( "Change existing item to a text comment" ),
  428. BITMAPS::text, AF_NONE, (void*) SCH_TEXT_T );
  429. TOOL_ACTION EE_ACTIONS::toTextBox( "eeschema.InteractiveEdit.toTextBox",
  430. AS_GLOBAL, 0, "",
  431. _( "Change to Text Box" ), _( "Change existing item to a text box" ),
  432. BITMAPS::add_textbox, AF_NONE, (void*) SCH_TEXTBOX_T );
  433. TOOL_ACTION EE_ACTIONS::cleanupSheetPins( "eeschema.InteractiveEdit.cleanupSheetPins",
  434. AS_GLOBAL, 0, "",
  435. _( "Cleanup Sheet Pins" ), _( "Delete unreferenced sheet pins" ) );
  436. TOOL_ACTION EE_ACTIONS::editTextAndGraphics( "eeschema.InteractiveEdit.editTextAndGraphics",
  437. AS_GLOBAL, 0, "",
  438. _( "Edit Text & Graphics Properties..." ),
  439. _( "Edit text and graphics properties globally across schematic" ),
  440. BITMAPS::text );
  441. TOOL_ACTION EE_ACTIONS::symbolProperties( "eeschema.InteractiveEdit.symbolProperties",
  442. AS_GLOBAL, 0, "",
  443. _( "Symbol Properties..." ), _( "Displays symbol properties dialog" ),
  444. BITMAPS::part_properties );
  445. TOOL_ACTION EE_ACTIONS::pinTable( "eeschema.InteractiveEdit.pinTable",
  446. AS_GLOBAL, 0, "",
  447. _( "Pin Table..." ), _( "Displays pin table for bulk editing of pins" ),
  448. BITMAPS::pin_table );
  449. TOOL_ACTION EE_ACTIONS::breakWire( "eeschema.InteractiveEdit.breakWire",
  450. AS_GLOBAL, 0, "",
  451. _( "Break" ), _( "Divide into connected segments" ),
  452. BITMAPS::break_line );
  453. TOOL_ACTION EE_ACTIONS::slice( "eeschema.InteractiveEdit.slice",
  454. AS_GLOBAL, 0, "",
  455. _( "Slice" ), _( "Divide into unconnected segments" ),
  456. BITMAPS::slice_line );
  457. // SCH_EDITOR_CONTROL
  458. //
  459. TOOL_ACTION EE_ACTIONS::restartMove( "eeschema.EditorControl.restartMove",
  460. AS_GLOBAL );
  461. TOOL_ACTION EE_ACTIONS::highlightNet( "eeschema.EditorControl.highlightNet",
  462. AS_GLOBAL,
  463. '`', "",
  464. _( "Highlight Net" ), _( "Highlight net under cursor" ),
  465. BITMAPS::net_highlight_schematic );
  466. TOOL_ACTION EE_ACTIONS::clearHighlight( "eeschema.EditorControl.clearHighlight",
  467. AS_GLOBAL, '~', "",
  468. _( "Clear Net Highlighting" ), _( "Clear any existing net highlighting" ) );
  469. TOOL_ACTION EE_ACTIONS::updateNetHighlighting( "eeschema.EditorControl.updateNetHighlighting",
  470. AS_GLOBAL );
  471. TOOL_ACTION EE_ACTIONS::highlightNetTool( "eeschema.EditorControl.highlightNetTool",
  472. AS_GLOBAL, 0, "",
  473. _( "Highlight Nets" ), _( "Highlight wires and pins of a net" ),
  474. BITMAPS::net_highlight_schematic, AF_ACTIVATE );
  475. TOOL_ACTION EE_ACTIONS::editWithLibEdit( "eeschema.EditorControl.editWithSymbolEditor",
  476. AS_GLOBAL,
  477. MD_CTRL + 'E', LEGACY_HK_NAME( "Edit with Symbol Editor" ),
  478. _( "Edit with Symbol Editor" ), _( "Open the selected symbol in the Symbol Editor" ),
  479. BITMAPS::libedit );
  480. TOOL_ACTION EE_ACTIONS::editLibSymbolWithLibEdit( "eeschema.EditorControl.editLibSymbolWithSymbolEditor",
  481. AS_GLOBAL,
  482. MD_CTRL + MD_SHIFT + 'E', "",
  483. _( "Edit Library Symbol..." ), _( "Open the library symbol in the Symbol Editor" ),
  484. BITMAPS::libedit );
  485. TOOL_ACTION EE_ACTIONS::editSymbolFields( "eeschema.EditorControl.editSymbolFields",
  486. AS_GLOBAL, 0, "",
  487. _( "Edit Symbol Fields..." ), _( "Bulk-edit fields of all symbols in schematic" ),
  488. BITMAPS::spreadsheet );
  489. TOOL_ACTION EE_ACTIONS::editSymbolLibraryLinks( "eeschema.EditorControl.editSymbolLibraryLinks",
  490. AS_GLOBAL, 0, "",
  491. _( "Edit Symbol Library Links..." ), _( "Edit links between schematic and library symbols" ),
  492. BITMAPS::edit_cmp_symb_links );
  493. TOOL_ACTION EE_ACTIONS::assignFootprints( "eeschema.EditorControl.assignFootprints",
  494. AS_GLOBAL, 0, "",
  495. _( "Assign Footprints..." ), _( "Run footprint assignment tool" ),
  496. BITMAPS::icon_cvpcb_24 );
  497. TOOL_ACTION EE_ACTIONS::importFPAssignments( "eeschema.EditorControl.importFPAssignments",
  498. AS_GLOBAL, 0, "",
  499. _( "Import Footprint Assignments..." ),
  500. _( "Import symbol footprint assignments from .cmp file created by board editor" ),
  501. BITMAPS::import_footprint_names );
  502. TOOL_ACTION EE_ACTIONS::annotate( "eeschema.EditorControl.annotate",
  503. AS_GLOBAL, 0, "",
  504. _( "Annotate Schematic..." ), _( "Fill in schematic symbol reference designators" ),
  505. BITMAPS::annotate );
  506. TOOL_ACTION EE_ACTIONS::schematicSetup( "eeschema.EditorControl.schematicSetup",
  507. AS_GLOBAL, 0, "",
  508. _( "Schematic Setup..." ),
  509. _( "Edit schematic setup including annotation styles and electrical rules" ),
  510. BITMAPS::options_schematic );
  511. TOOL_ACTION EE_ACTIONS::editPageNumber( "eeschema.EditorControl.editPageNumber",
  512. AS_GLOBAL, 0, "",
  513. _( "Edit Sheet Page Number..." ),
  514. _( "Edit the page number of the current or selected sheet" ) );
  515. TOOL_ACTION EE_ACTIONS::rescueSymbols( "eeschema.EditorControl.rescueSymbols",
  516. AS_GLOBAL, 0, "",
  517. _( "Rescue Symbols..." ),
  518. _( "Find old symbols in project and rename/rescue them" ),
  519. BITMAPS::rescue );
  520. TOOL_ACTION EE_ACTIONS::remapSymbols( "eeschema.EditorControl.remapSymbols",
  521. AS_GLOBAL, 0, "",
  522. _( "Remap Legacy Library Symbols..." ),
  523. _( "Remap library symbol references in legacy schematics to the symbol library table" ),
  524. BITMAPS::rescue );
  525. TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( "eeschema.EditorControl.drawSheetOnClipboard",
  526. AS_GLOBAL, 0, "",
  527. _( "Export Drawing to Clipboard" ), _( "Export drawing of current sheet to clipboard" ),
  528. BITMAPS::copy );
  529. TOOL_ACTION EE_ACTIONS::showPcbNew( "eeschema.EditorControl.showPcbNew",
  530. AS_GLOBAL, 0, "",
  531. _( "Switch to PCB Editor" ), _( "Open PCB in board editor" ),
  532. BITMAPS::icon_pcbnew_24 );
  533. TOOL_ACTION EE_ACTIONS::exportNetlist( "eeschema.EditorControl.exportNetlist",
  534. AS_GLOBAL, 0, "",
  535. _( "Export Netlist..." ), _( "Export file containing netlist in one of several formats" ),
  536. BITMAPS::netlist );
  537. TOOL_ACTION EE_ACTIONS::generateBOM( "eeschema.EditorControl.generateBOM",
  538. AS_GLOBAL, 0, "",
  539. _( "Generate BOM..." ), _( "Generate a bill of materials for the current schematic" ),
  540. BITMAPS::post_bom );
  541. TOOL_ACTION EE_ACTIONS::exportSymbolsToLibrary( "eeschema.EditorControl.exportSymbolsToLibrary",
  542. AS_GLOBAL, 0, "",
  543. _( "Export Symbols to Library..." ),
  544. _( "Add symbols used in schematic to an existing symbol library\n"
  545. "(does not remove other symbols from this library)" ),
  546. BITMAPS::library_archive );
  547. TOOL_ACTION EE_ACTIONS::exportSymbolsToNewLibrary( "eeschema.EditorControl.exportSymbolsToNewLibrary",
  548. AS_GLOBAL, 0, "",
  549. _( "Export Symbols to New Library..." ),
  550. _( "Create a new symbol library using the symbols used in the schematic\n"
  551. "(if the library already exists it will be replaced)" ),
  552. BITMAPS::library_archive_as );
  553. TOOL_ACTION EE_ACTIONS::selectOnPCB( "eeschema.EditorControl.selectOnPCB",
  554. AS_GLOBAL, 0, "",
  555. _( "Select on PCB" ),
  556. _( "Select corresponding items in PCB editor" ),
  557. BITMAPS::select_same_sheet );
  558. TOOL_ACTION EE_ACTIONS::toggleHiddenPins( "eeschema.EditorControl.showHiddenPins",
  559. AS_GLOBAL, 0, "",
  560. _( "Show Hidden Pins" ), _( "Toggle display of hidden pins" ),
  561. BITMAPS::hidden_pin );
  562. TOOL_ACTION EE_ACTIONS::toggleHiddenFields( "eeschema.EditorControl.showHiddenFields",
  563. AS_GLOBAL, 0, "",
  564. _( "Show Hidden Fields" ), _( "Toggle display of hidden text fields" ) );
  565. TOOL_ACTION EE_ACTIONS::toggleERCWarnings( "eeschema.EditorControl.showERCWarnings",
  566. AS_GLOBAL, 0, "",
  567. _( "Show ERC Warnings" ), _( "Show markers for electrical rules checker warnings" ) );
  568. TOOL_ACTION EE_ACTIONS::toggleERCErrors( "eeschema.EditorControl.showERCErrors",
  569. AS_GLOBAL, 0, "",
  570. _( "Show ERC Errors" ), _( "Show markers for electrical rules checker errors" ) );
  571. TOOL_ACTION EE_ACTIONS::toggleERCExclusions( "eeschema.EditorControl.showERCExclusions",
  572. AS_GLOBAL, 0, "",
  573. _( "Show ERC Exclusions" ),
  574. _( "Show markers for excluded electrical rules checker violations" ) );
  575. TOOL_ACTION EE_ACTIONS::toggleOPVoltages( "eeschema.EditorControl.showOperatingPointVoltages",
  576. AS_GLOBAL, 0, "",
  577. _( "Show OP Voltages" ),
  578. _( "Show operating point voltage data from simulation" ) );
  579. TOOL_ACTION EE_ACTIONS::toggleOPCurrents( "eeschema.EditorControl.showOperatingPointCurrents",
  580. AS_GLOBAL, 0, "",
  581. _( "Show OP Currents" ),
  582. _( "Show operating point current data from simulation" ) );
  583. TOOL_ACTION EE_ACTIONS::lineModeFree( "eeschema.EditorControl.lineModeFree",
  584. AS_GLOBAL, 0, "",
  585. _( "Line Mode for Wires and Buses" ), _( "Draw and drag at any angle" ),
  586. BITMAPS::lines_any, AF_NONE, (void*) LINE_MODE::LINE_MODE_FREE );
  587. TOOL_ACTION EE_ACTIONS::lineMode90( "eeschema.EditorControl.lineModeOrthonal",
  588. AS_GLOBAL, 0, "",
  589. _( "Line Mode for Wires and Buses" ),
  590. _( "Constrain drawing and dragging to horizontal or vertical motions" ),
  591. BITMAPS::lines90, AF_NONE, (void*) LINE_MODE::LINE_MODE_90);
  592. TOOL_ACTION EE_ACTIONS::lineMode45( "eeschema.EditorControl.lineMode45",
  593. AS_GLOBAL, 0, "",
  594. _( "Line Mode for Wires and Buses" ),
  595. _( "Constrain drawing and dragging to horizontal, vertical, or 45-degree angle motions" ),
  596. BITMAPS::hv45mode, AF_NONE, (void*) LINE_MODE::LINE_MODE_45);
  597. TOOL_ACTION EE_ACTIONS::lineModeNext( "eeschema.EditorControl.lineModeNext",
  598. AS_GLOBAL, MD_SHIFT + WXK_SPACE, "",
  599. _( "Line Mode for Wires and Buses" ), _( "Switch to next line mode" ),
  600. BITMAPS::unknown );
  601. TOOL_ACTION EE_ACTIONS::toggleAnnotateAuto( "eeschema.EditorControl.annotateAutomatically",
  602. AS_GLOBAL, 0, "",
  603. _( "Annotate Automatically" ), _( "Toggle automatic annotation of new symbols" ),
  604. BITMAPS::annotate );
  605. TOOL_ACTION EE_ACTIONS::repairSchematic( "eeschema.EditorControl.repairSchematic",
  606. AS_GLOBAL, 0, "",
  607. _( "Repair Schematic" ),
  608. _( "Run various diagnostics and attempt to repair schematic" ),
  609. BITMAPS::rescue );
  610. // Python Console
  611. TOOL_ACTION EE_ACTIONS::showPythonConsole( "eeschema.EditorControl.showPythonConsole",
  612. AS_GLOBAL, 0, "",
  613. _( "Scripting Console" ), _( "Show the Python scripting console" ),
  614. BITMAPS::py_script );
  615. // SCH_NAVIGATE_TOOL
  616. //
  617. TOOL_ACTION EE_ACTIONS::changeSheet( "eeschema.NavigateTool.changeSheet",
  618. AS_CONTEXT, 0, "",
  619. _( "Change Sheet" ), _( "Change to provided sheet's contents in the schematic editor" ),
  620. BITMAPS::enter_sheet );
  621. TOOL_ACTION EE_ACTIONS::enterSheet( "eeschema.NavigateTool.enterSheet",
  622. AS_GLOBAL, 0, "",
  623. _( "Enter Sheet" ), _( "Display the selected sheet's contents in the schematic editor" ),
  624. BITMAPS::enter_sheet );
  625. TOOL_ACTION EE_ACTIONS::leaveSheet( "eeschema.NavigateTool.leaveSheet",
  626. AS_GLOBAL,
  627. MD_ALT + WXK_BACK, LEGACY_HK_NAME( "Leave Sheet" ),
  628. _( "Leave Sheet" ), _( "Display the parent sheet in the schematic editor" ),
  629. BITMAPS::leave_sheet );
  630. TOOL_ACTION EE_ACTIONS::navigateUp( "eeschema.NavigateTool.up",
  631. AS_GLOBAL, MD_ALT + WXK_UP, "",
  632. _( "Navigate Up" ), _( "Navigate up one sheet in the hierarchy" ),
  633. BITMAPS::up );
  634. TOOL_ACTION EE_ACTIONS::navigateBack( "eeschema.NavigateTool.back",
  635. AS_GLOBAL,
  636. MD_ALT + WXK_LEFT, "",
  637. _( "Navigate Back" ), _( "Move backward in sheet navigation history" ),
  638. BITMAPS::left );
  639. TOOL_ACTION EE_ACTIONS::navigateForward( "eeschema.NavigateTool.forward",
  640. AS_GLOBAL,
  641. MD_ALT + WXK_RIGHT, "",
  642. _( "Navigate Forward" ), _( "Move forward in sheet navigation history" ),
  643. BITMAPS::right );
  644. TOOL_ACTION EE_ACTIONS::navigatePrevious( "eeschema.NavigateTool.previous",
  645. AS_GLOBAL,
  646. WXK_PAGEUP, "",
  647. _( "Previous Sheet" ), _( "Move to previous sheet by number" ),
  648. BITMAPS::left );
  649. TOOL_ACTION EE_ACTIONS::navigateNext( "eeschema.NavigateTool.next",
  650. AS_GLOBAL,
  651. WXK_PAGEDOWN, "",
  652. _( "Next Sheet" ), _( "Move to next sheet by number" ),
  653. BITMAPS::right );
  654. TOOL_ACTION EE_ACTIONS::showHierarchy( "eeschema.EditorTool.showHierarchy",
  655. AS_GLOBAL,
  656. MD_CTRL + 'H', "",
  657. _( "Hierarchy Navigator" ), _( "Show or hide the schematic sheet hierarchy navigator" ),
  658. BITMAPS::hierarchy_nav );
  659. // SCH_LINE_WIRE_BUS_TOOL
  660. //
  661. const DRAW_SEGMENT_EVENT_PARAMS drawWireActionParam = { LAYER_WIRE, false, nullptr };
  662. TOOL_ACTION EE_ACTIONS::drawWire( "eeschema.InteractiveDrawingLineWireBus.drawWires",
  663. AS_GLOBAL,
  664. 'W', LEGACY_HK_NAME( "Begin Wire" ),
  665. _( "Add Wire" ), _( "Add a wire" ),
  666. BITMAPS::add_line, AF_ACTIVATE, (void*) &drawWireActionParam );
  667. const DRAW_SEGMENT_EVENT_PARAMS drawBusActionParam = { LAYER_BUS, false, nullptr };
  668. TOOL_ACTION EE_ACTIONS::drawBus( "eeschema.InteractiveDrawingLineWireBus.drawBuses",
  669. AS_GLOBAL,
  670. 'B', LEGACY_HK_NAME( "Begin Bus" ),
  671. _( "Add Bus" ), _( "Add a bus" ),
  672. BITMAPS::add_bus, AF_ACTIVATE, (void*) &drawBusActionParam );
  673. TOOL_ACTION EE_ACTIONS::unfoldBus( "eeschema.InteractiveDrawingLineWireBus.unfoldBus",
  674. AS_GLOBAL,
  675. 'C', LEGACY_HK_NAME( "Unfold from Bus" ),
  676. _( "Unfold from Bus" ), _( "Break a wire out of a bus" ),
  677. BITMAPS::INVALID_BITMAP, AF_ACTIVATE );
  678. const DRAW_SEGMENT_EVENT_PARAMS drawLinesActionParam = { LAYER_NOTES, false, nullptr };
  679. TOOL_ACTION EE_ACTIONS::drawLines( "eeschema.InteractiveDrawingLineWireBus.drawLines",
  680. AS_GLOBAL,
  681. 'I', LEGACY_HK_NAME( "Add Graphic PolyLine" ),
  682. _( "Add Lines" ), _( "Add connected graphic lines" ),
  683. BITMAPS::add_dashed_line, AF_ACTIVATE, (void*) &drawLinesActionParam );
  684. TOOL_ACTION EE_ACTIONS::undoLastSegment( "eeschema.InteractiveDrawingLineWireBus.undoLastSegment",
  685. AS_GLOBAL,
  686. WXK_BACK, "",
  687. _( "Undo Last Segment" ), _( "Walks the current line back one segment." ),
  688. BITMAPS::undo );
  689. TOOL_ACTION EE_ACTIONS::switchSegmentPosture( "eeschema.InteractiveDrawingLineWireBus.switchPosture",
  690. AS_GLOBAL,
  691. '/', "",
  692. _( "Switch Segment Posture" ), _( "Switches posture of the current segment." ),
  693. BITMAPS::change_entry_orient, AF_NONE );
  694. TOOL_ACTION EE_ACTIONS::finishLineWireOrBus( "eeschema.InteractiveDrawingLineWireBus.finish",
  695. AS_GLOBAL,
  696. 'K', LEGACY_HK_NAME( "End Line Wire Bus" ),
  697. _( "Finish Wire or Bus" ), _( "Complete drawing at current segment" ),
  698. BITMAPS::checked_ok, AF_NONE );
  699. TOOL_ACTION EE_ACTIONS::finishWire( "eeschema.InteractiveDrawingLineWireBus.finishWire",
  700. AS_GLOBAL, 0, "",
  701. _( "Finish Wire" ), _( "Complete wire with current segment" ),
  702. BITMAPS::checked_ok, AF_NONE );
  703. TOOL_ACTION EE_ACTIONS::finishBus( "eeschema.InteractiveDrawingLineWireBus.finishBus",
  704. AS_GLOBAL, 0, "",
  705. _( "Finish Bus" ), _( "Complete bus with current segment" ),
  706. BITMAPS::checked_ok, AF_NONE );
  707. TOOL_ACTION EE_ACTIONS::finishLine( "eeschema.InteractiveDrawingLineWireBus.finishLine",
  708. AS_GLOBAL, 0, "",
  709. _( "Finish Lines" ), _( "Complete connected lines with current segment" ),
  710. BITMAPS::checked_ok, AF_NONE );
  711. // SCH_MOVE_TOOL
  712. //
  713. TOOL_ACTION EE_ACTIONS::move( "eeschema.InteractiveMove.move",
  714. AS_GLOBAL,
  715. 'M', LEGACY_HK_NAME( "Move Item" ),
  716. _( "Move" ), _( "Moves the selected item(s)" ), BITMAPS::move, AF_ACTIVATE );
  717. TOOL_ACTION EE_ACTIONS::drag( "eeschema.InteractiveMove.drag",
  718. AS_GLOBAL,
  719. 'G', LEGACY_HK_NAME( "Drag Item" ),
  720. _( "Drag" ), _( "Drags the selected item(s)" ), BITMAPS::move, AF_ACTIVATE );
  721. TOOL_ACTION EE_ACTIONS::moveActivate( "eeschema.InteractiveMove",
  722. AS_GLOBAL, 0, "",
  723. _( "Move Activate" ), "", BITMAPS::move, AF_ACTIVATE );
  724. TOOL_ACTION EE_ACTIONS::symbolMoveActivate( "eeschema.SymbolMoveTool",
  725. AS_GLOBAL, 0, "",
  726. _( "Symbol Move Activate" ), "", BITMAPS::move, AF_ACTIVATE );
  727. TOOL_ACTION EE_ACTIONS::alignToGrid( "eeschema.AlignToGrid",
  728. AS_GLOBAL, 0, "",
  729. _( "Align Elements to Grid" ), "", BITMAPS::move, AF_ACTIVATE );
  730. // Schematic editor save copy curr sheet command
  731. TOOL_ACTION EE_ACTIONS::saveCurrSheetCopyAs( "eeschema.EditorControl.saveCurrSheetCopyAs",
  732. AS_GLOBAL,
  733. 0, "",
  734. _( "Save Current Sheet Copy As..." ), _( "Save a copy of the current sheet to another location or name" ),
  735. BITMAPS::save_as );
  736. // Drag and drop
  737. TOOL_ACTION EE_ACTIONS::ddAppendFile( "eeschema.EditorControl.ddAppendFile",
  738. AS_GLOBAL );
  739. // SIMULATOR
  740. TOOL_ACTION EE_ACTIONS::newPlot( "eeschema.Simulation.newPlot",
  741. AS_GLOBAL,
  742. MD_CTRL + 'N', LEGACY_HK_NAME( "New" ),
  743. _( "New Plot" ), "",
  744. BITMAPS::new_generic );
  745. TOOL_ACTION EE_ACTIONS::openWorkbook( "eeschema.Simulation.openWorkbook",
  746. AS_GLOBAL,
  747. MD_CTRL + 'O', LEGACY_HK_NAME( "Open" ),
  748. _( "Open Workbook..." ), "",
  749. BITMAPS::directory_open );
  750. TOOL_ACTION EE_ACTIONS::saveWorkbook( "eeschema.Simulation.saveWorkbook",
  751. AS_GLOBAL,
  752. MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
  753. _( "Save Workbook" ), "",
  754. BITMAPS::save );
  755. TOOL_ACTION EE_ACTIONS::saveWorkbookAs( "eeschema.Simulation.saveWorkbookAs",
  756. AS_GLOBAL,
  757. MD_SHIFT + MD_CTRL + 'S', LEGACY_HK_NAME( "Save As" ),
  758. _( "Save Workbook As..." ), "",
  759. BITMAPS::sim_add_signal );
  760. TOOL_ACTION EE_ACTIONS::exportPlotAsPNG( "eeschema.Simulator.exportPNG",
  761. AS_GLOBAL, 0, "",
  762. _( "Export Current Plot as PNG..." ), "",
  763. BITMAPS::export_png );
  764. TOOL_ACTION EE_ACTIONS::exportPlotAsCSV( "eeschema.Simulator.exportCSV",
  765. AS_GLOBAL, 0, "",
  766. _( "Export Current Plot as CSV..." ), "",
  767. BITMAPS::export_file );
  768. TOOL_ACTION EE_ACTIONS::toggleLegend( "eeschema.Simulator.toggleLegend",
  769. AS_GLOBAL, 0, "",
  770. _( "Show Legend" ), "",
  771. BITMAPS::text );
  772. TOOL_ACTION EE_ACTIONS::toggleDottedSecondary( "eeschema.Simulator.toggleDottedSecondary",
  773. AS_GLOBAL, 0, "",
  774. _( "Dotted Current/Phase" ),
  775. _( "Draw secondary signal trace (current or phase) with a dotted line" ) );
  776. TOOL_ACTION EE_ACTIONS::toggleDarkModePlots( "eeschema.Simulator.toggleDarkModePlots",
  777. AS_GLOBAL, 0, "",
  778. _( "Dark Mode Plots" ),
  779. _( "Draw plots with a black background" ) );
  780. TOOL_ACTION EE_ACTIONS::simCommand( "eeschema.Simulation.simCommand",
  781. AS_GLOBAL, 0, "",
  782. _( "Simulation Command..." ),
  783. _( "Edit the simulation command for the current plot tab" ),
  784. BITMAPS::sim_command );
  785. TOOL_ACTION EE_ACTIONS::runSimulation( "eeschema.Simulation.runSimulation",
  786. AS_GLOBAL,
  787. 'R', "",
  788. _( "Run Simulation" ), "",
  789. BITMAPS::sim_run );
  790. TOOL_ACTION EE_ACTIONS::stopSimulation( "eeschema.Simulation.stopSimulation",
  791. AS_GLOBAL, 0, "",
  792. _( "Stop Simulation" ), "",
  793. BITMAPS::sim_stop );
  794. TOOL_ACTION EE_ACTIONS::simProbe( "eeschema.Simulation.probe",
  795. AS_GLOBAL,
  796. 'P', "",
  797. _( "Probe Schematic..." ), _( "Add a simulator probe" ),
  798. BITMAPS::sim_probe );
  799. TOOL_ACTION EE_ACTIONS::simTune( "eeschema.Simulation.tune",
  800. AS_GLOBAL,
  801. 'T', "",
  802. _( "Add Tuned Value..." ), _( "Select a value to be tuned" ),
  803. BITMAPS::sim_tune );
  804. TOOL_ACTION EE_ACTIONS::showNetlist( "eeschema.Simulation.showNetlist",
  805. AS_GLOBAL, 0, "",
  806. _( "Show SPICE Netlist" ), "",
  807. BITMAPS::netlist );
  808. TOOL_ACTION EE_ACTIONS::editUserDefinedSignals( "eeschema.Simulation.editUserDefinedSignals",
  809. AS_GLOBAL, 0, "",
  810. _( "User-defined Signals" ),
  811. _( "Add, edit or delete user-defined simulation signals" ),
  812. BITMAPS::sim_add_signal );