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.

2366 lines
96 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2013-2016 CERN
  5. * Copyright (C) 2016-2022 KiCad Developers, see AUTHORS.txt for contributors.
  6. * @author Maciej Suminski <maciej.suminski@cern.ch>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, you may find one here:
  20. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  21. * or you may search the http://www.gnu.org website for the version 2 license,
  22. * or you may write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  24. */
  25. #include "pcb_actions.h"
  26. #include "tool/tool_action.h"
  27. #include "tool/tool_event.h"
  28. #include <pcbnew_id.h>
  29. #include <bitmaps.h>
  30. #include <layer_ids.h>
  31. #include <microwave/microwave_tool.h>
  32. #include <tool/tool_manager.h>
  33. #include <tools/pcb_selection_tool.h>
  34. #include <router/pns_router.h>
  35. #include <router/pns_routing_settings.h>
  36. // Forward declarations for types needed in the parameters
  37. class PCB_BITMAP;
  38. // Actions, being statically-defined, require specialized I18N handling. We continue to
  39. // use the _() macro so that string harvesting by the I18N framework doesn't have to be
  40. // specialized, but we don't translate on initialization and instead do it in the getters.
  41. #undef _
  42. #define _(s) s
  43. // CONVERT_TOOL
  44. //
  45. TOOL_ACTION PCB_ACTIONS::convertToPoly( TOOL_ACTION_ARGS()
  46. .Name( "pcbnew.Convert.convertToPoly" )
  47. .Scope( AS_GLOBAL )
  48. .MenuText( _( "Create Polygon from Selection..." ) )
  49. .Tooltip( _( "Creates a graphic polygon from the selection" ) )
  50. .Icon( BITMAPS::add_graphical_polygon ) );
  51. TOOL_ACTION PCB_ACTIONS::convertToZone( TOOL_ACTION_ARGS()
  52. .Name( "pcbnew.Convert.convertToZone" )
  53. .Scope( AS_GLOBAL )
  54. .MenuText( _( "Create Zone from Selection..." ) )
  55. .Tooltip( _( "Creates a copper zone from the selection" ) )
  56. .Icon( BITMAPS::add_zone ) );
  57. TOOL_ACTION PCB_ACTIONS::convertToKeepout( TOOL_ACTION_ARGS()
  58. .Name( "pcbnew.Convert.convertToKeepout" )
  59. .Scope( AS_GLOBAL )
  60. .MenuText( _( "Create Rule Area from Selection..." ) )
  61. .Tooltip( _( "Creates a rule area from the selection" ) )
  62. .Icon( BITMAPS::add_keepout_area ) );
  63. TOOL_ACTION PCB_ACTIONS::convertToLines( TOOL_ACTION_ARGS()
  64. .Name( "pcbnew.Convert.convertToLines" )
  65. .Scope( AS_GLOBAL )
  66. .MenuText( _( "Create Lines from Selection" ) )
  67. .Tooltip( _( "Creates graphic lines from the selection" ) )
  68. .Icon( BITMAPS::add_line ) );
  69. TOOL_ACTION PCB_ACTIONS::convertToArc( TOOL_ACTION_ARGS()
  70. .Name( "pcbnew.Convert.convertToArc" )
  71. .Scope( AS_GLOBAL )
  72. .MenuText( _( "Create Arc from Selection" ) )
  73. .Tooltip( _( "Creates an arc from the selected line segment" ) )
  74. .Icon( BITMAPS::add_arc ) );
  75. TOOL_ACTION PCB_ACTIONS::convertToTracks( TOOL_ACTION_ARGS()
  76. .Name( "pcbnew.Convert.convertToTracks" )
  77. .Scope( AS_GLOBAL )
  78. .MenuText( _( "Create Tracks from Selection" ) )
  79. .Tooltip( _( "Creates tracks from the selected graphic lines" ) )
  80. .Icon( BITMAPS::add_tracks ) );
  81. // DRAWING_TOOL
  82. //
  83. TOOL_ACTION PCB_ACTIONS::drawLine( TOOL_ACTION_ARGS()
  84. .Name( "pcbnew.InteractiveDrawing.line" )
  85. .Scope( AS_GLOBAL )
  86. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'L' )
  87. .LegacyHotkeyName( "Draw Line" )
  88. .MenuText( _( "Draw Line" ) )
  89. .Tooltip( _( "Draw a line" ) )
  90. .Icon( BITMAPS::add_graphical_segments )
  91. .Flags( AF_ACTIVATE ) );
  92. TOOL_ACTION PCB_ACTIONS::drawPolygon( TOOL_ACTION_ARGS()
  93. .Name( "pcbnew.InteractiveDrawing.graphicPolygon" )
  94. .Scope( AS_GLOBAL )
  95. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'P' )
  96. .LegacyHotkeyName( "Draw Graphic Polygon" )
  97. .MenuText( _( "Draw Graphic Polygon" ) )
  98. .Tooltip( _( "Draw a graphic polygon" ) )
  99. .Icon( BITMAPS::add_graphical_polygon )
  100. .Flags( AF_ACTIVATE )
  101. .Parameter( ZONE_MODE::GRAPHIC_POLYGON ) );
  102. TOOL_ACTION PCB_ACTIONS::drawRectangle( TOOL_ACTION_ARGS()
  103. .Name( "pcbnew.InteractiveDrawing.rectangle" )
  104. .Scope( AS_GLOBAL )
  105. .MenuText( _( "Draw Rectangle" ) )
  106. .Tooltip( _( "Draw a rectangle" ) )
  107. .Icon( BITMAPS::add_rectangle )
  108. .Flags( AF_ACTIVATE ) );
  109. TOOL_ACTION PCB_ACTIONS::drawCircle( TOOL_ACTION_ARGS()
  110. .Name( "pcbnew.InteractiveDrawing.circle" )
  111. .Scope( AS_GLOBAL )
  112. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'C' )
  113. .LegacyHotkeyName( "Draw Circle" )
  114. .MenuText( _( "Draw Circle" ) )
  115. .Tooltip( _( "Draw a circle" ) )
  116. .Icon( BITMAPS::add_circle )
  117. .Flags( AF_ACTIVATE ) );
  118. TOOL_ACTION PCB_ACTIONS::drawArc( TOOL_ACTION_ARGS()
  119. .Name( "pcbnew.InteractiveDrawing.arc" )
  120. .Scope( AS_GLOBAL )
  121. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'A' )
  122. .LegacyHotkeyName( "Draw Arc" )
  123. .MenuText( _( "Draw Arc" ) )
  124. .Tooltip( _( "Draw an arc" ) )
  125. .Icon( BITMAPS::add_arc )
  126. .Flags( AF_ACTIVATE ) );
  127. TOOL_ACTION PCB_ACTIONS::placeCharacteristics( TOOL_ACTION_ARGS()
  128. .Name( "pcbnew.InteractiveDrawing.placeCharacteristics" )
  129. .Scope( AS_GLOBAL )
  130. .LegacyHotkeyName( "Add Board Characteristics" )
  131. .MenuText( _( "Add Board Characteristics" ) )
  132. .Tooltip( _( "Add a board characteristics table on a graphic layer" ) )
  133. .Flags( AF_ACTIVATE ) );
  134. TOOL_ACTION PCB_ACTIONS::placeStackup( TOOL_ACTION_ARGS()
  135. .Name( "pcbnew.InteractiveDrawing.placeStackup" )
  136. .Scope( AS_GLOBAL )
  137. .LegacyHotkeyName( "Add Stackup Table" )
  138. .MenuText( _( "Add Stackup Table" ) )
  139. .Tooltip( _( "Add a board stackup table on a graphic layer" ) )
  140. .Flags( AF_ACTIVATE ) );
  141. TOOL_ACTION PCB_ACTIONS::placeImage( TOOL_ACTION_ARGS()
  142. .Name( "pcbnew.InteractiveDrawing.placeImage" )
  143. .Scope( AS_GLOBAL )
  144. .MenuText( _( "Add Image" ) )
  145. .Tooltip( _( "Add bitmap image" ) )
  146. .Icon( BITMAPS::image )
  147. .Flags( AF_ACTIVATE )
  148. .Parameter<PCB_BITMAP*>( nullptr ) );
  149. TOOL_ACTION PCB_ACTIONS::placeText( TOOL_ACTION_ARGS()
  150. .Name( "pcbnew.InteractiveDrawing.text" )
  151. .Scope( AS_GLOBAL )
  152. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'T' )
  153. .LegacyHotkeyName( "Add Text" )
  154. .MenuText( _( "Add Text" ) )
  155. .Tooltip( _( "Add a text item" ) )
  156. .Icon( BITMAPS::text )
  157. .Flags( AF_ACTIVATE ) );
  158. TOOL_ACTION PCB_ACTIONS::drawTextBox( TOOL_ACTION_ARGS()
  159. .Name( "pcbnew.InteractiveDrawing.textbox" )
  160. .Scope( AS_GLOBAL )
  161. .MenuText( _( "Add Text Box" ) )
  162. .Tooltip( _( "Add a wrapped text item" ) )
  163. .Icon( BITMAPS::add_textbox )
  164. .Flags( AF_ACTIVATE ) );
  165. TOOL_ACTION PCB_ACTIONS::drawAlignedDimension( TOOL_ACTION_ARGS()
  166. .Name( "pcbnew.InteractiveDrawing.alignedDimension" )
  167. .Scope( AS_GLOBAL )
  168. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'H' )
  169. .LegacyHotkeyName( "Add Dimension" )
  170. .MenuText( _( "Add Aligned Dimension" ) )
  171. .Tooltip( _( "Add an aligned linear dimension" ) )
  172. .Icon( BITMAPS::add_aligned_dimension )
  173. .Flags( AF_ACTIVATE ) );
  174. TOOL_ACTION PCB_ACTIONS::drawCenterDimension( TOOL_ACTION_ARGS()
  175. .Name( "pcbnew.InteractiveDrawing.centerDimension" )
  176. .Scope( AS_GLOBAL )
  177. .MenuText( _( "Add Center Dimension" ) )
  178. .Tooltip( _( "Add a center dimension" ) )
  179. .Icon( BITMAPS::add_center_dimension )
  180. .Flags( AF_ACTIVATE ) );
  181. TOOL_ACTION PCB_ACTIONS::drawRadialDimension( TOOL_ACTION_ARGS()
  182. .Name( "pcbnew.InteractiveDrawing.radialDimension" )
  183. .Scope( AS_GLOBAL )
  184. .MenuText( _( "Add Radial Dimension" ) )
  185. .Tooltip( _( "Add a radial dimension" ) )
  186. .Icon( BITMAPS::add_radial_dimension )
  187. .Flags( AF_ACTIVATE ) );
  188. TOOL_ACTION PCB_ACTIONS::drawOrthogonalDimension( TOOL_ACTION_ARGS()
  189. .Name( "pcbnew.InteractiveDrawing.orthogonalDimension" )
  190. .Scope( AS_GLOBAL )
  191. .MenuText( _( "Add Orthogonal Dimension" ) )
  192. .Tooltip( _( "Add an orthogonal dimension" ) )
  193. .Icon( BITMAPS::add_orthogonal_dimension )
  194. .Flags( AF_ACTIVATE ) );
  195. TOOL_ACTION PCB_ACTIONS::drawLeader( TOOL_ACTION_ARGS()
  196. .Name( "pcbnew.InteractiveDrawing.leader" )
  197. .Scope( AS_GLOBAL )
  198. .MenuText( _( "Add Leader" ) )
  199. .Tooltip( _( "Add a leader dimension" ) )
  200. .Icon( BITMAPS::add_leader )
  201. .Flags( AF_ACTIVATE ) );
  202. TOOL_ACTION PCB_ACTIONS::drawZone( TOOL_ACTION_ARGS()
  203. .Name( "pcbnew.InteractiveDrawing.zone" )
  204. .Scope( AS_GLOBAL )
  205. #ifdef __WXOSX_MAC__
  206. .DefaultHotkey( MD_ALT + 'Z' )
  207. #else
  208. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'Z' )
  209. #endif
  210. .LegacyHotkeyName( "Add Filled Zone" )
  211. .MenuText( _( "Add Filled Zone" ) )
  212. .Tooltip( _( "Add a filled zone" ) )
  213. .Icon( BITMAPS::add_zone )
  214. .Flags( AF_ACTIVATE )
  215. .Parameter( ZONE_MODE::ADD ) );
  216. TOOL_ACTION PCB_ACTIONS::drawVia( TOOL_ACTION_ARGS()
  217. .Name( "pcbnew.InteractiveDrawing.via" )
  218. .Scope( AS_GLOBAL )
  219. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'V' )
  220. .LegacyHotkeyName( "Add Vias" )
  221. .MenuText( _( "Add Vias" ) )
  222. .Tooltip( _( "Add free-standing vias" ) )
  223. .Icon( BITMAPS::add_via )
  224. .Flags( AF_ACTIVATE ) );
  225. TOOL_ACTION PCB_ACTIONS::drawRuleArea( TOOL_ACTION_ARGS()
  226. .Name( "pcbnew.InteractiveDrawing.ruleArea" )
  227. .Scope( AS_GLOBAL )
  228. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'K' )
  229. .LegacyHotkeyName( "Add Keepout Area" )
  230. .MenuText( _( "Add Rule Area" ) )
  231. .Tooltip( _( "Add a rule area (keepout)" ) )
  232. .Icon( BITMAPS::add_keepout_area )
  233. .Flags( AF_ACTIVATE )
  234. .Parameter( ZONE_MODE::ADD ) );
  235. TOOL_ACTION PCB_ACTIONS::drawZoneCutout( TOOL_ACTION_ARGS()
  236. .Name( "pcbnew.InteractiveDrawing.zoneCutout" )
  237. .Scope( AS_GLOBAL )
  238. .DefaultHotkey( MD_SHIFT + 'C' )
  239. .LegacyHotkeyName( "Add a Zone Cutout" )
  240. .MenuText( _( "Add a Zone Cutout" ) )
  241. .Tooltip( _( "Add a cutout area of an existing zone" ) )
  242. .Icon( BITMAPS::add_zone_cutout )
  243. .Flags( AF_ACTIVATE )
  244. .Parameter( ZONE_MODE::CUTOUT ) );
  245. TOOL_ACTION PCB_ACTIONS::drawSimilarZone( TOOL_ACTION_ARGS()
  246. .Name( "pcbnew.InteractiveDrawing.similarZone" )
  247. .Scope( AS_GLOBAL )
  248. .DefaultHotkey( MD_SHIFT + MD_CTRL + '.' )
  249. .LegacyHotkeyName( "Add a Similar Zone" )
  250. .MenuText( _( "Add a Similar Zone" ) )
  251. .Tooltip( _( "Add a zone with the same settings as an existing zone" ) )
  252. .Icon( BITMAPS::add_zone )
  253. .Flags( AF_ACTIVATE )
  254. .Parameter( ZONE_MODE::SIMILAR ) );
  255. TOOL_ACTION PCB_ACTIONS::placeImportedGraphics( TOOL_ACTION_ARGS()
  256. .Name( "pcbnew.InteractiveDrawing.placeImportedGraphics" )
  257. .Scope( AS_GLOBAL )
  258. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'F' )
  259. .LegacyHotkeyName( "Place DXF" )
  260. .MenuText( _( "Import Graphics..." ) )
  261. .Tooltip( _( "Import 2D drawing file" ) )
  262. .Icon( BITMAPS::import_vector )
  263. .Flags( AF_ACTIVATE ) );
  264. TOOL_ACTION PCB_ACTIONS::setAnchor( TOOL_ACTION_ARGS()
  265. .Name( "pcbnew.InteractiveDrawing.setAnchor" )
  266. .Scope( AS_GLOBAL )
  267. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'N' )
  268. .LegacyHotkeyName( "Place the Footprint Anchor" )
  269. .MenuText( _( "Place the Footprint Anchor" ) )
  270. .Tooltip( _( "Set the coordinate origin point (anchor) of the footprint" ) )
  271. .Icon( BITMAPS::anchor )
  272. .Flags( AF_ACTIVATE ) );
  273. TOOL_ACTION PCB_ACTIONS::incWidth( TOOL_ACTION_ARGS()
  274. .Name( "pcbnew.InteractiveDrawing.incWidth" )
  275. .Scope( AS_CONTEXT )
  276. .DefaultHotkey( MD_CTRL + '+' )
  277. .LegacyHotkeyName( "Increase Line Width" )
  278. .MenuText( _( "Increase Line Width" ) )
  279. .Tooltip( _( "Increase the line width" ) ) );
  280. TOOL_ACTION PCB_ACTIONS::decWidth( TOOL_ACTION_ARGS()
  281. .Name( "pcbnew.InteractiveDrawing.decWidth" )
  282. .Scope( AS_CONTEXT )
  283. .DefaultHotkey( MD_CTRL + '-' )
  284. .LegacyHotkeyName( "Decrease Line Width" )
  285. .MenuText( _( "Decrease Line Width" ) )
  286. .Tooltip( _( "Decrease the line width" ) ) );
  287. TOOL_ACTION PCB_ACTIONS::arcPosture( TOOL_ACTION_ARGS()
  288. .Name( "pcbnew.InteractiveDrawing.arcPosture" )
  289. .Scope( AS_CONTEXT )
  290. .DefaultHotkey( '/' )
  291. .LegacyHotkeyName( "Switch Track Posture" )
  292. .MenuText( _( "Switch Arc Posture" ) )
  293. .Tooltip( _( "Switch the arc posture" ) ) );
  294. TOOL_ACTION PCB_ACTIONS::magneticSnapActiveLayer( TOOL_ACTION_ARGS()
  295. .Name( "common.Control.magneticSnapActiveLayer" )
  296. .Scope( AS_GLOBAL )
  297. .MenuText( _( "Snap to objects on the active layer only" ) )
  298. .Tooltip( _( "Enables snapping to objects on the active layer only" ) ) );
  299. TOOL_ACTION PCB_ACTIONS::magneticSnapAllLayers( TOOL_ACTION_ARGS()
  300. .Name( "common.Control.magneticSnapAllLayers" )
  301. .Scope( AS_GLOBAL )
  302. .MenuText( _( "Snap to objects on all layers" ) )
  303. .Tooltip( _( "Enables snapping to objects on all visible layers" ) ) );
  304. TOOL_ACTION PCB_ACTIONS::magneticSnapToggle( TOOL_ACTION_ARGS()
  305. .Name( "common.Control.magneticSnapToggle" )
  306. .Scope( AS_GLOBAL )
  307. .DefaultHotkey( MD_SHIFT + 'S' )
  308. .MenuText( _( "Toggle snapping between active and all layers" ) )
  309. .Tooltip( _( "Toggles between snapping on all visible layers and only the active area" ) ) );
  310. TOOL_ACTION PCB_ACTIONS::deleteLastPoint( TOOL_ACTION_ARGS()
  311. .Name( "pcbnew.InteractiveDrawing.deleteLastPoint" )
  312. .Scope( AS_CONTEXT )
  313. .DefaultHotkey( WXK_BACK )
  314. .MenuText( _( "Delete Last Point" ) )
  315. .Tooltip( _( "Delete the last point added to the current item" ) )
  316. .Icon( BITMAPS::undo ) );
  317. TOOL_ACTION PCB_ACTIONS::closeOutline( TOOL_ACTION_ARGS()
  318. .Name( "pcbnew.InteractiveDrawing.closeOutline" )
  319. .Scope( AS_CONTEXT )
  320. .MenuText( _( "Close Outline" ) )
  321. .Tooltip( _( "Close the in progress outline" ) )
  322. .Icon( BITMAPS::checked_ok ) );
  323. // DRC
  324. //
  325. TOOL_ACTION PCB_ACTIONS::runDRC( TOOL_ACTION_ARGS()
  326. .Name( "pcbnew.DRCTool.runDRC" )
  327. .Scope( AS_GLOBAL )
  328. .MenuText( _( "Design Rules Checker" ) )
  329. .Tooltip( _( "Show the design rules checker window" ) )
  330. .Icon( BITMAPS::erc ) );
  331. // EDIT_TOOL
  332. //
  333. TOOL_ACTION PCB_ACTIONS::editFpInFpEditor( TOOL_ACTION_ARGS()
  334. .Name( "pcbnew.EditorControl.EditFpInFpEditor" )
  335. .Scope( AS_GLOBAL )
  336. .DefaultHotkey( MD_CTRL + 'E' )
  337. .LegacyHotkeyName( "Edit with Footprint Editor" )
  338. .MenuText( _( "Open in Footprint Editor" ) )
  339. .Tooltip( _( "Opens the selected footprint in the Footprint Editor" ) )
  340. .Icon( BITMAPS::module_editor ) );
  341. TOOL_ACTION PCB_ACTIONS::editLibFpInFpEditor( TOOL_ACTION_ARGS()
  342. .Name( "pcbnew.EditorControl.EditLibFpInFpEditor" )
  343. .Scope( AS_GLOBAL )
  344. .DefaultHotkey( MD_CTRL + MD_SHIFT + 'E' )
  345. .MenuText( _( "Edit Library Footprint..." ) )
  346. .Tooltip( _( "Opens the selected footprint in the Footprint Editor" ) )
  347. .Icon( BITMAPS::module_editor ) );
  348. TOOL_ACTION PCB_ACTIONS::getAndPlace( TOOL_ACTION_ARGS()
  349. .Name( "pcbnew.InteractiveEdit.FindMove" )
  350. .Scope( AS_GLOBAL )
  351. .DefaultHotkey( 'T' )
  352. .LegacyHotkeyName( "Get and Move Footprint" )
  353. .MenuText( _( "Get and Move Footprint" ) )
  354. .Tooltip( _( "Selects a footprint by reference designator and places it under the cursor for moving") )
  355. .Icon( BITMAPS::move )
  356. .Flags( AF_ACTIVATE ) );
  357. TOOL_ACTION PCB_ACTIONS::move( TOOL_ACTION_ARGS()
  358. .Name( "pcbnew.InteractiveMove.move" )
  359. .Scope( AS_GLOBAL )
  360. .DefaultHotkey( 'M' )
  361. .LegacyHotkeyName( "Move Item" )
  362. .MenuText( _( "Move" ) )
  363. .Tooltip( _( "Moves the selected item(s)" ) )
  364. .Icon( BITMAPS::move )
  365. .Flags( AF_ACTIVATE )
  366. .Parameter( ACTIONS::CURSOR_EVENT_TYPE::CURSOR_NONE ) );
  367. TOOL_ACTION PCB_ACTIONS::moveIndividually( TOOL_ACTION_ARGS()
  368. .Name( "pcbnew.InteractiveMove.moveIndividually" )
  369. .Scope( AS_GLOBAL )
  370. .DefaultHotkey( MD_CTRL + 'M' )
  371. .MenuText( _( "Move Individually" ) )
  372. .Tooltip( _( "Moves the selected items one-by-one" ) )
  373. .Icon( BITMAPS::move )
  374. .Flags( AF_ACTIVATE )
  375. .Parameter( ACTIONS::CURSOR_EVENT_TYPE::CURSOR_NONE ) );
  376. TOOL_ACTION PCB_ACTIONS::moveWithReference( TOOL_ACTION_ARGS()
  377. .Name( "pcbnew.InteractiveMove.moveWithReference" )
  378. .Scope( AS_GLOBAL )
  379. .MenuText( _( "Move with Reference" ) )
  380. .Tooltip( _( "Moves the selected item(s) with a specified starting point" ) )
  381. .Icon( BITMAPS::move )
  382. .Flags( AF_ACTIVATE )
  383. .Parameter( ACTIONS::CURSOR_EVENT_TYPE::CURSOR_NONE ) );
  384. TOOL_ACTION PCB_ACTIONS::copyWithReference( TOOL_ACTION_ARGS()
  385. .Name( "pcbnew.InteractiveMove.copyWithReference" )
  386. .Scope( AS_GLOBAL )
  387. .MenuText( _( "Copy with Reference" ) )
  388. .Tooltip( _( "Copy selected item(s) to clipboard with a specified starting point" ) )
  389. .Icon( BITMAPS::copy )
  390. .Flags( AF_ACTIVATE ) );
  391. TOOL_ACTION PCB_ACTIONS::duplicateIncrement(TOOL_ACTION_ARGS()
  392. .Name( "pcbnew.InteractiveEdit.duplicateIncrementPads" )
  393. .Scope( AS_GLOBAL )
  394. .DefaultHotkey( MD_SHIFT + MD_CTRL + 'D' )
  395. .LegacyHotkeyName( "Duplicate Item and Increment" )
  396. .MenuText( _( "Duplicate and Increment" ) )
  397. .Tooltip( _( "Duplicates the selected item(s), incrementing pad numbers" ) )
  398. .Icon( BITMAPS::duplicate ) );
  399. TOOL_ACTION PCB_ACTIONS::moveExact( TOOL_ACTION_ARGS()
  400. .Name( "pcbnew.InteractiveEdit.moveExact" )
  401. .Scope( AS_GLOBAL )
  402. .DefaultHotkey( MD_SHIFT + 'M' )
  403. .LegacyHotkeyName( "Move Item Exactly" )
  404. .MenuText( _( "Move Exactly..." ) )
  405. .Tooltip( _( "Moves the selected item(s) by an exact amount" ) )
  406. .Icon( BITMAPS::move_exactly ) );
  407. TOOL_ACTION PCB_ACTIONS::pointEditorMoveCorner( TOOL_ACTION_ARGS()
  408. .Name( "pcbnew.InteractiveEdit.moveCorner" )
  409. .Scope( AS_GLOBAL )
  410. .MenuText( _( "Move Corner To..." ) )
  411. .Tooltip( _( "Move the active corner to an exact location" ) )
  412. .Icon( BITMAPS::move_exactly ) );
  413. TOOL_ACTION PCB_ACTIONS::pointEditorMoveMidpoint( TOOL_ACTION_ARGS()
  414. .Name( "pcbnew.InteractiveEdit.moveMidpoint" )
  415. .Scope( AS_GLOBAL )
  416. .MenuText( _( "Move Midpoint To..." ) )
  417. .Tooltip( _( "Move the active midpoint to an exact location" ) )
  418. .Icon( BITMAPS::move_exactly ) );
  419. TOOL_ACTION PCB_ACTIONS::createArray( TOOL_ACTION_ARGS()
  420. .Name( "pcbnew.InteractiveEdit.createArray" )
  421. .Scope( AS_GLOBAL )
  422. .DefaultHotkey( MD_CTRL + 'T' )
  423. .LegacyHotkeyName( "Create Array" )
  424. .MenuText( _( "Create Array..." ) )
  425. .Tooltip( _( "Create array" ) )
  426. .Icon( BITMAPS::array )
  427. .Flags( AF_ACTIVATE ) );
  428. TOOL_ACTION PCB_ACTIONS::rotateCw( TOOL_ACTION_ARGS()
  429. .Name( "pcbnew.InteractiveEdit.rotateCw" )
  430. .Scope( AS_GLOBAL )
  431. .DefaultHotkey( MD_SHIFT + 'R' )
  432. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  433. .LegacyHotkeyName( "Rotate Item Clockwise (Modern Toolset only)" )
  434. .MenuText( _( "Rotate Clockwise" ) )
  435. .Tooltip( _( "Rotates selected item(s) clockwise" ) )
  436. .Icon( BITMAPS::rotate_cw )
  437. .Flags( AF_NONE )
  438. .Parameter( -1 ) );
  439. TOOL_ACTION PCB_ACTIONS::rotateCcw( TOOL_ACTION_ARGS()
  440. .Name( "pcbnew.InteractiveEdit.rotateCcw" )
  441. .Scope( AS_GLOBAL )
  442. .DefaultHotkey( 'R' )
  443. .LegacyHotkeyName( "Rotate Item" )
  444. .MenuText( _( "Rotate Counterclockwise" ) )
  445. .Tooltip( _( "Rotates selected item(s) counterclockwise" ) )
  446. .Icon( BITMAPS::rotate_ccw )
  447. .Flags( AF_NONE )
  448. .Parameter( 1 ) );
  449. TOOL_ACTION PCB_ACTIONS::flip( TOOL_ACTION_ARGS()
  450. .Name( "pcbnew.InteractiveEdit.flip" )
  451. .Scope( AS_GLOBAL )
  452. .DefaultHotkey( 'F' )
  453. .LegacyHotkeyName( "Flip Item" )
  454. .MenuText( _( "Change Side / Flip" ) )
  455. .Tooltip( _( "Flips selected item(s) to opposite side of board" ) )
  456. .Icon( BITMAPS::swap_layer ) );
  457. TOOL_ACTION PCB_ACTIONS::mirrorH( TOOL_ACTION_ARGS()
  458. .Name( "pcbnew.InteractiveEdit.mirrorHoriontally" )
  459. .Scope( AS_GLOBAL )
  460. .MenuText( _( "Mirror Horizontally" ) )
  461. .Tooltip( _( "Mirrors selected item across the Y axis" ) )
  462. .Icon( BITMAPS::mirror_h ) );
  463. TOOL_ACTION PCB_ACTIONS::mirrorV( TOOL_ACTION_ARGS()
  464. .Name( "pcbnew.InteractiveEdit.mirrorVertically" )
  465. .Scope( AS_GLOBAL )
  466. .MenuText( _( "Mirror Vertically" ) )
  467. .Tooltip( _( "Mirrors selected item across the X axis" ) )
  468. .Icon( BITMAPS::mirror_v ) );
  469. TOOL_ACTION PCB_ACTIONS::swap( TOOL_ACTION_ARGS()
  470. .Name( "pcbnew.InteractiveEdit.swap" )
  471. .Scope( AS_GLOBAL )
  472. .DefaultHotkey( 'S' )
  473. .MenuText( _( "Swap" ) )
  474. .Tooltip( _( "Swaps selected items' positions" ) )
  475. .Icon( BITMAPS::swap ) );
  476. TOOL_ACTION PCB_ACTIONS::packAndMoveFootprints( TOOL_ACTION_ARGS()
  477. .Name( "pcbnew.InteractiveEdit.packAndMoveFootprints" )
  478. .Scope( AS_GLOBAL )
  479. .DefaultHotkey( 'P' )
  480. .MenuText( _( "Pack and Move Footprints" ) )
  481. .Tooltip( _( "Sorts selected footprints by reference, packs based on size and initiates movement" ) )
  482. .Icon( BITMAPS::pack_footprints ) );
  483. TOOL_ACTION PCB_ACTIONS::skip( TOOL_ACTION_ARGS()
  484. .Name( "pcbnew.InteractiveEdit.skip" )
  485. .Scope( AS_CONTEXT )
  486. .DefaultHotkey( WXK_TAB )
  487. .MenuText( _( "Skip" ) )
  488. .Tooltip( _( "Skip item" ) )
  489. .Icon( BITMAPS::right ) );
  490. TOOL_ACTION PCB_ACTIONS::changeTrackWidth( TOOL_ACTION_ARGS()
  491. .Name( "pcbnew.InteractiveEdit.changeTrackWidth" )
  492. .Scope( AS_GLOBAL )
  493. .MenuText( _( "Change Track Width" ) )
  494. .Tooltip( _( "Updates selected track & via sizes" ) ) );
  495. TOOL_ACTION PCB_ACTIONS::filletTracks( TOOL_ACTION_ARGS()
  496. .Name( "pcbnew.InteractiveEdit.filletTracks" )
  497. .Scope( AS_GLOBAL )
  498. .MenuText( _( "Fillet Tracks" ) )
  499. .Tooltip( _( "Adds arcs tangent to the selected straight track segments" ) ) );
  500. TOOL_ACTION PCB_ACTIONS::filletLines( TOOL_ACTION_ARGS()
  501. .Name( "pcbnew.InteractiveEdit.filletLines" )
  502. .Scope( AS_GLOBAL )
  503. .MenuText( _( "Fillet Lines" ) )
  504. .Tooltip( _( "Adds arcs tangent to the selected lines" ) )
  505. .Icon( BITMAPS::fillet ) );
  506. TOOL_ACTION PCB_ACTIONS::chamferLines( TOOL_ACTION_ARGS()
  507. .Name( "pcbnew.InteractiveEdit.chamferLines" )
  508. .Scope( AS_GLOBAL )
  509. .MenuText( _( "Chamfer Lines" ) )
  510. .Tooltip( _( "Cut away corners between selected lines" ) )
  511. .Icon( BITMAPS::chamfer ) );
  512. TOOL_ACTION PCB_ACTIONS::extendLines( TOOL_ACTION_ARGS()
  513. .Name( "pcbnew.InteractiveEdit.extendLines" )
  514. .Scope( AS_GLOBAL )
  515. .MenuText( _( "Extend Lines to Meet" ) )
  516. .Tooltip( _( "Extend lines to meet each other" ) ) );
  517. TOOL_ACTION PCB_ACTIONS::mergePolygons( TOOL_ACTION_ARGS()
  518. .Name( "pcbnew.InteractiveEdit.mergePolygons" )
  519. .Scope( AS_GLOBAL )
  520. .MenuText( _( "Merge Polygons" ) )
  521. .Tooltip( _( "Merge selected polygons into a single polygon" ) )
  522. .Icon( BITMAPS::merge_polygons ) );
  523. TOOL_ACTION PCB_ACTIONS::subtractPolygons( TOOL_ACTION_ARGS()
  524. .Name( "pcbnew.InteractiveEdit.subtractPolygons" )
  525. .Scope( AS_GLOBAL )
  526. .MenuText( _( "Subtract Polygons" ) )
  527. .Tooltip( _( "Subtract selected polygons from the last one selected" ) )
  528. .Icon( BITMAPS::subtract_polygons ) );
  529. TOOL_ACTION PCB_ACTIONS::intersectPolygons( TOOL_ACTION_ARGS()
  530. .Name( "pcbnew.InteractiveEdit.intersectPolygons" )
  531. .Scope( AS_GLOBAL )
  532. .MenuText( _( "Intersect Polygons" ) )
  533. .Tooltip( _( "Create the intersection of the selected polygons" ) )
  534. .Icon( BITMAPS::intersect_polygons ) );
  535. TOOL_ACTION PCB_ACTIONS::deleteFull( TOOL_ACTION_ARGS()
  536. .Name( "pcbnew.InteractiveEdit.deleteFull" )
  537. .Scope( AS_GLOBAL )
  538. .DefaultHotkey( MD_SHIFT + WXK_DELETE )
  539. .LegacyHotkeyName( "Delete Full Track" )
  540. .MenuText( _( "Delete Full Track" ) )
  541. .Tooltip( _( "Deletes selected item(s) and copper connections" ) )
  542. .Icon( BITMAPS::delete_cursor )
  543. .Flags( AF_NONE )
  544. .Parameter( PCB_ACTIONS::REMOVE_FLAGS::ALT ) );
  545. TOOL_ACTION PCB_ACTIONS::properties( TOOL_ACTION_ARGS()
  546. .Name( "pcbnew.InteractiveEdit.properties" )
  547. .Scope( AS_GLOBAL )
  548. .DefaultHotkey( 'E' )
  549. .LegacyHotkeyName( "Edit Item" )
  550. .MenuText( _( "Properties..." ) )
  551. .Tooltip( _( "Displays item properties dialog" ) )
  552. .Icon( BITMAPS::edit ) );
  553. // FOOTPRINT_EDITOR_CONTROL
  554. //
  555. TOOL_ACTION PCB_ACTIONS::showFootprintTree( TOOL_ACTION_ARGS()
  556. .Name( "pcbnew.ModuleEditor.showFootprintTree" )
  557. .Scope( AS_GLOBAL )
  558. .MenuText( _( "Show Footprint Tree" ) )
  559. .Tooltip( _( "Show Footprint Tree" ) )
  560. .Icon( BITMAPS::search_tree ) );
  561. TOOL_ACTION PCB_ACTIONS::hideFootprintTree( TOOL_ACTION_ARGS()
  562. .Name( "pcbnew.ModuleEditor.hideFootprintTree" )
  563. .Scope( AS_GLOBAL )
  564. .MenuText( _( "Hide Footprint Tree" ) )
  565. .Tooltip( _( "Hide Footprint Tree" ) )
  566. .Icon( BITMAPS::search_tree ) );
  567. TOOL_ACTION PCB_ACTIONS::newFootprint( TOOL_ACTION_ARGS()
  568. .Name( "pcbnew.ModuleEditor.newFootprint" )
  569. .Scope( AS_GLOBAL )
  570. .DefaultHotkey( MD_CTRL + 'N' )
  571. .LegacyHotkeyName( "New" )
  572. .MenuText( _( "New Footprint..." ) )
  573. .Tooltip( _( "Create a new, empty footprint" ) )
  574. .Icon( BITMAPS::new_footprint ) );
  575. TOOL_ACTION PCB_ACTIONS::createFootprint( TOOL_ACTION_ARGS()
  576. .Name( "pcbnew.ModuleEditor.createFootprint" )
  577. .Scope( AS_GLOBAL )
  578. .MenuText( _( "Create Footprint..." ) )
  579. .Tooltip( _( "Create a new footprint using the Footprint Wizard" ) )
  580. .Icon( BITMAPS::module_wizard ) );
  581. TOOL_ACTION PCB_ACTIONS::editFootprint( TOOL_ACTION_ARGS()
  582. .Name( "pcbnew.ModuleEditor.editFootprint" )
  583. .Scope( AS_GLOBAL )
  584. .MenuText( _( "Edit Footprint" ) )
  585. .Tooltip( _( "Show selected footprint on editor canvas" ) )
  586. .Icon( BITMAPS::edit ) );
  587. TOOL_ACTION PCB_ACTIONS::duplicateFootprint( TOOL_ACTION_ARGS()
  588. .Name( "pcbnew.ModuleEditor.duplicateFootprint" )
  589. .Scope( AS_GLOBAL )
  590. .MenuText( _( "Duplicate Footprint" ) )
  591. .Tooltip( _( "Make a copy of the selected footprint" ) )
  592. .Icon( BITMAPS::duplicate ) );
  593. TOOL_ACTION PCB_ACTIONS::renameFootprint( TOOL_ACTION_ARGS()
  594. .Name( "pcbnew.ModuleEditor.renameFootprint" )
  595. .Scope( AS_GLOBAL )
  596. .MenuText( _( "Rename Footprint..." ) )
  597. .Tooltip( _( "Rename the selected footprint" ) )
  598. .Icon( BITMAPS::edit ) );
  599. TOOL_ACTION PCB_ACTIONS::deleteFootprint( TOOL_ACTION_ARGS()
  600. .Name( "pcbnew.ModuleEditor.deleteFootprint" )
  601. .Scope( AS_GLOBAL )
  602. .MenuText( _( "Delete Footprint from Library" ) )
  603. .Tooltip( _( "Delete Footprint from Library" ) )
  604. .Icon( BITMAPS::trash ) );
  605. TOOL_ACTION PCB_ACTIONS::cutFootprint( TOOL_ACTION_ARGS()
  606. .Name( "pcbnew.ModuleEditor.cutFootprint" )
  607. .Scope( AS_GLOBAL )
  608. .MenuText( _( "Cut Footprint" ) )
  609. .Tooltip( _( "Cut Footprint" ) )
  610. .Icon( BITMAPS::cut ) );
  611. TOOL_ACTION PCB_ACTIONS::copyFootprint( TOOL_ACTION_ARGS()
  612. .Name( "pcbnew.ModuleEditor.copyFootprint" )
  613. .Scope( AS_GLOBAL )
  614. .MenuText( _( "Copy Footprint" ) )
  615. .Tooltip( _( "Copy Footprint" ) )
  616. .Icon( BITMAPS::copy ) );
  617. TOOL_ACTION PCB_ACTIONS::pasteFootprint( TOOL_ACTION_ARGS()
  618. .Name( "pcbnew.ModuleEditor.pasteFootprint" )
  619. .Scope( AS_GLOBAL )
  620. .MenuText( _( "Paste Footprint" ) )
  621. .Tooltip( _( "Paste Footprint" ) )
  622. .Icon( BITMAPS::paste ) );
  623. TOOL_ACTION PCB_ACTIONS::importFootprint( TOOL_ACTION_ARGS()
  624. .Name( "pcbnew.ModuleEditor.importFootprint" )
  625. .Scope( AS_GLOBAL )
  626. .MenuText( _( "Import Footprint..." ) )
  627. .Tooltip( _( "Import footprint from file" ) )
  628. .Icon( BITMAPS::import_module ) );
  629. TOOL_ACTION PCB_ACTIONS::exportFootprint( TOOL_ACTION_ARGS()
  630. .Name( "pcbnew.ModuleEditor.exportFootprint" )
  631. .Scope( AS_GLOBAL )
  632. .MenuText( _( "Export Current Footprint..." ) )
  633. .Tooltip( _( "Export edited footprint to file" ) )
  634. .Icon( BITMAPS::export_module ) );
  635. TOOL_ACTION PCB_ACTIONS::footprintProperties( TOOL_ACTION_ARGS()
  636. .Name( "pcbnew.ModuleEditor.footprintProperties" )
  637. .Scope( AS_GLOBAL )
  638. .MenuText( _( "Footprint Properties..." ) )
  639. .Tooltip( _( "Edit footprint properties" ) )
  640. .Icon( BITMAPS::module_options ) );
  641. TOOL_ACTION PCB_ACTIONS::checkFootprint( TOOL_ACTION_ARGS()
  642. .Name( "pcbnew.ModuleEditor.checkFootprint" )
  643. .Scope( AS_GLOBAL )
  644. .MenuText( _( "Footprint Checker" ) )
  645. .Tooltip( _( "Show the footprint checker window" ) )
  646. .Icon( BITMAPS::erc ) );
  647. // GLOBAL_EDIT_TOOL
  648. //
  649. TOOL_ACTION PCB_ACTIONS::updateFootprint( TOOL_ACTION_ARGS()
  650. .Name( "pcbnew.GlobalEdit.updateFootprint" )
  651. .Scope( AS_GLOBAL )
  652. .MenuText( _( "Update Footprint..." ) )
  653. .Tooltip( _( "Update footprint to include any changes from the library" ) )
  654. .Icon( BITMAPS::refresh ) );
  655. TOOL_ACTION PCB_ACTIONS::updateFootprints( TOOL_ACTION_ARGS()
  656. .Name( "pcbnew.GlobalEdit.updateFootprints" )
  657. .Scope( AS_GLOBAL )
  658. .MenuText( _( "Update Footprints from Library..." ) )
  659. .Tooltip( _( "Update footprints to include any changes from the library" ) )
  660. .Icon( BITMAPS::refresh ) );
  661. TOOL_ACTION PCB_ACTIONS::removeUnusedPads( TOOL_ACTION_ARGS()
  662. .Name( "pcbnew.GlobalEdit.removeUnusedPads" )
  663. .Scope( AS_GLOBAL )
  664. .MenuText( _( "Remove Unused Pads..." ) )
  665. .Tooltip( _( "Remove or restore the unconnected inner layers on through hole pads and vias" ) )
  666. .Icon( BITMAPS::pads_remove ) );
  667. TOOL_ACTION PCB_ACTIONS::changeFootprint( TOOL_ACTION_ARGS()
  668. .Name( "pcbnew.GlobalEdit.changeFootprint" )
  669. .Scope( AS_GLOBAL )
  670. .MenuText( _( "Change Footprint..." ) )
  671. .Tooltip( _( "Assign a different footprint from the library" ) )
  672. .Icon( BITMAPS::exchange ) );
  673. TOOL_ACTION PCB_ACTIONS::changeFootprints( TOOL_ACTION_ARGS()
  674. .Name( "pcbnew.GlobalEdit.changeFootprints" )
  675. .Scope( AS_GLOBAL )
  676. .MenuText( _( "Change Footprints..." ) )
  677. .Tooltip( _( "Assign different footprints from the library" ) )
  678. .Icon( BITMAPS::exchange ) );
  679. TOOL_ACTION PCB_ACTIONS::swapLayers( TOOL_ACTION_ARGS()
  680. .Name( "pcbnew.GlobalEdit.swapLayers" )
  681. .Scope( AS_GLOBAL )
  682. .MenuText( _( "Swap Layers..." ) )
  683. .Tooltip( _( "Move tracks or drawings from one layer to another" ) )
  684. .Icon( BITMAPS::swap_layer ) );
  685. TOOL_ACTION PCB_ACTIONS::editTracksAndVias( TOOL_ACTION_ARGS()
  686. .Name( "pcbnew.GlobalEdit.editTracksAndVias" )
  687. .Scope( AS_GLOBAL )
  688. .MenuText( _( "Edit Track & Via Properties..." ) )
  689. .Tooltip( _( "Edit track and via properties globally across board" ) )
  690. .Icon( BITMAPS::width_track_via ) );
  691. TOOL_ACTION PCB_ACTIONS::editTextAndGraphics( TOOL_ACTION_ARGS()
  692. .Name( "pcbnew.GlobalEdit.editTextAndGraphics" )
  693. .Scope( AS_GLOBAL )
  694. .MenuText( _( "Edit Text & Graphics Properties..." ) )
  695. .Tooltip( _( "Edit Text and graphics properties globally across board" ) )
  696. .Icon( BITMAPS::text ) );
  697. TOOL_ACTION PCB_ACTIONS::editTeardrops( TOOL_ACTION_ARGS()
  698. .Name( "pcbnew.GlobalEdit.editTeardrops" )
  699. .Scope( AS_GLOBAL )
  700. .MenuText( _( "Edit Teardrops..." ) )
  701. .Tooltip( _( "Add, remove or edit teardrops globally across board" ) )
  702. .Icon( BITMAPS::via ) );
  703. TOOL_ACTION PCB_ACTIONS::globalDeletions( TOOL_ACTION_ARGS()
  704. .Name( "pcbnew.GlobalEdit.globalDeletions" )
  705. .Scope( AS_GLOBAL )
  706. .MenuText( _( "Global Deletions..." ) )
  707. .Tooltip( _( "Delete tracks, footprints and graphic items from board" ) )
  708. .Icon( BITMAPS::general_deletions ) );
  709. TOOL_ACTION PCB_ACTIONS::cleanupTracksAndVias( TOOL_ACTION_ARGS()
  710. .Name( "pcbnew.GlobalEdit.cleanupTracksAndVias" )
  711. .Scope( AS_GLOBAL )
  712. .MenuText( _( "Cleanup Tracks & Vias..." ) )
  713. .Tooltip( _( "Cleanup redundant items, shorting items, etc." ) )
  714. .Icon( BITMAPS::delete_cursor ) );
  715. TOOL_ACTION PCB_ACTIONS::cleanupGraphics( TOOL_ACTION_ARGS()
  716. .Name( "pcbnew.GlobalEdit.cleanupGraphics" )
  717. .Scope( AS_GLOBAL )
  718. .MenuText( _( "Cleanup Graphics..." ) )
  719. .Tooltip( _( "Cleanup redundant items, etc." ) )
  720. .Icon( BITMAPS::delete_cursor ) );
  721. // MICROWAVE_TOOL
  722. //
  723. TOOL_ACTION PCB_ACTIONS::microwaveCreateGap( TOOL_ACTION_ARGS()
  724. .Name( "pcbnew.MicrowaveTool.createGap" )
  725. .Scope( AS_GLOBAL )
  726. .MenuText( _( "Add Microwave Gap" ) )
  727. .Tooltip( _( "Create gap of specified length for microwave applications" ) )
  728. .Icon( BITMAPS::mw_add_gap )
  729. .Flags( AF_ACTIVATE )
  730. .Parameter( MICROWAVE_FOOTPRINT_SHAPE::GAP ) );
  731. TOOL_ACTION PCB_ACTIONS::microwaveCreateStub( TOOL_ACTION_ARGS()
  732. .Name( "pcbnew.MicrowaveTool.createStub" )
  733. .Scope( AS_GLOBAL )
  734. .MenuText( _( "Add Microwave Stub" ) )
  735. .Tooltip( _( "Create stub of specified length for microwave applications" ) )
  736. .Icon( BITMAPS::mw_add_stub )
  737. .Flags( AF_ACTIVATE )
  738. .Parameter( MICROWAVE_FOOTPRINT_SHAPE::STUB ) );
  739. TOOL_ACTION PCB_ACTIONS::microwaveCreateStubArc( TOOL_ACTION_ARGS()
  740. .Name( "pcbnew.MicrowaveTool.createStubArc" )
  741. .Scope( AS_GLOBAL )
  742. .MenuText( _( "Add Microwave Arc Stub" ) )
  743. .Tooltip( _( "Create stub (arc) of specified size for microwave applications" ) )
  744. .Icon( BITMAPS::mw_add_stub_arc )
  745. .Flags( AF_ACTIVATE )
  746. .Parameter( MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC ) );
  747. TOOL_ACTION PCB_ACTIONS::microwaveCreateFunctionShape( TOOL_ACTION_ARGS()
  748. .Name( "pcbnew.MicrowaveTool.createFunctionShape" )
  749. .Scope( AS_GLOBAL )
  750. .MenuText( _( "Add Microwave Polygonal Shape" ) )
  751. .Tooltip( _( "Create a microwave polygonal shape from a list of vertices" ) )
  752. .Icon( BITMAPS::mw_add_shape )
  753. .Flags( AF_ACTIVATE )
  754. .Parameter( MICROWAVE_FOOTPRINT_SHAPE::FUNCTION_SHAPE ) );
  755. TOOL_ACTION PCB_ACTIONS::microwaveCreateLine( TOOL_ACTION_ARGS()
  756. .Name( "pcbnew.MicrowaveTool.createLine" )
  757. .Scope( AS_GLOBAL )
  758. .MenuText( _( "Add Microwave Line" ) )
  759. .Tooltip( _( "Create line of specified length for microwave applications" ) )
  760. .Icon( BITMAPS::mw_add_line )
  761. .Flags( AF_ACTIVATE ) );
  762. // PAD_TOOL
  763. //
  764. TOOL_ACTION PCB_ACTIONS::copyPadSettings( TOOL_ACTION_ARGS()
  765. .Name( "pcbnew.PadTool.CopyPadSettings" )
  766. .Scope( AS_GLOBAL )
  767. .MenuText( _( "Copy Pad Properties to Default" ) )
  768. .Tooltip( _( "Copy current pad's properties" ) )
  769. .Icon( BITMAPS::copy_pad_settings ) );
  770. TOOL_ACTION PCB_ACTIONS::applyPadSettings( TOOL_ACTION_ARGS()
  771. .Name( "pcbnew.PadTool.ApplyPadSettings" )
  772. .Scope( AS_GLOBAL )
  773. .MenuText( _( "Paste Default Pad Properties to Selected" ) )
  774. .Tooltip( _( "Replace the current pad's properties with those copied earlier" ) )
  775. .Icon( BITMAPS::apply_pad_settings ) );
  776. TOOL_ACTION PCB_ACTIONS::pushPadSettings( TOOL_ACTION_ARGS()
  777. .Name( "pcbnew.PadTool.PushPadSettings" )
  778. .Scope( AS_GLOBAL )
  779. .MenuText( _( "Push Pad Properties to Other Pads..." ) )
  780. .Tooltip( _( "Copy the current pad's properties to other pads" ) )
  781. .Icon( BITMAPS::push_pad_settings ) );
  782. TOOL_ACTION PCB_ACTIONS::enumeratePads( TOOL_ACTION_ARGS()
  783. .Name( "pcbnew.PadTool.enumeratePads" )
  784. .Scope( AS_GLOBAL )
  785. .MenuText( _( "Renumber Pads..." ) )
  786. .Tooltip( _( "Renumber pads by clicking on them in the desired order" ) )
  787. .Icon( BITMAPS::pad_enumerate )
  788. .Flags( AF_ACTIVATE ) );
  789. TOOL_ACTION PCB_ACTIONS::placePad( TOOL_ACTION_ARGS()
  790. .Name( "pcbnew.PadTool.placePad" )
  791. .Scope( AS_GLOBAL )
  792. .MenuText( _( "Add Pad" ) )
  793. .Tooltip( _( "Add a pad" ) )
  794. .Icon( BITMAPS::pad )
  795. .Flags( AF_ACTIVATE ) );
  796. TOOL_ACTION PCB_ACTIONS::explodePad( TOOL_ACTION_ARGS()
  797. .Name( "pcbnew.PadTool.explodePad" )
  798. .Scope( AS_GLOBAL )
  799. .DefaultHotkey( MD_CTRL + 'E' )
  800. .MenuText( _( "Edit Pad as Graphic Shapes" ) )
  801. .Tooltip( _( "Ungroups a custom-shaped pad for editing as individual graphic shapes" ) )
  802. .Icon( BITMAPS::custom_pad_to_primitives ) );
  803. TOOL_ACTION PCB_ACTIONS::recombinePad( TOOL_ACTION_ARGS()
  804. .Name( "pcbnew.PadTool.recombinePad" )
  805. .Scope( AS_GLOBAL )
  806. .DefaultHotkey( MD_CTRL + 'E' )
  807. .MenuText( _( "Finish Pad Edit" ) )
  808. .Tooltip( _( "Regroups all touching graphic shapes into the edited pad" ) )
  809. .Icon( BITMAPS::custom_pad_to_primitives ) );
  810. TOOL_ACTION PCB_ACTIONS::defaultPadProperties( TOOL_ACTION_ARGS()
  811. .Name( "pcbnew.PadTool.defaultPadProperties" )
  812. .Scope( AS_GLOBAL )
  813. .MenuText( _( "Default Pad Properties..." ) )
  814. .Tooltip( _( "Edit the pad properties used when creating new pads" ) )
  815. .Icon( BITMAPS::options_pad ) );
  816. // SCRIPTING TOOL
  817. //
  818. TOOL_ACTION PCB_ACTIONS::pluginsReload( TOOL_ACTION_ARGS()
  819. .Name( "pcbnew.ScriptingTool.pluginsReload" )
  820. .Scope( AS_GLOBAL )
  821. .MenuText( _( "Refresh Plugins" ) )
  822. .Tooltip( _( "Reload all python plugins and refresh plugin menus" ) )
  823. .Icon( BITMAPS::reload ) );
  824. TOOL_ACTION PCB_ACTIONS::pluginsShowFolder( TOOL_ACTION_ARGS()
  825. .Name( "pcbnew.ScriptingTool.pluginsShowFolder" )
  826. .Scope( AS_GLOBAL )
  827. #ifdef __WXMAC__
  828. .MenuText( _( "Reveal Plugin Folder in Finder" ) )
  829. .Tooltip( _( "Reveals the plugins folder in a Finder window" ) )
  830. #else
  831. .MenuText( _( "Open Plugin Directory" ) )
  832. .Tooltip( _( "Opens the directory in the default system file manager" ) )
  833. #endif
  834. .Icon( BITMAPS::directory_open ) );
  835. // BOARD_EDITOR_CONTROL
  836. //
  837. TOOL_ACTION PCB_ACTIONS::boardSetup( TOOL_ACTION_ARGS()
  838. .Name( "pcbnew.EditorControl.boardSetup" )
  839. .Scope( AS_GLOBAL )
  840. .MenuText( _( "Board Setup..." ) )
  841. .Tooltip( _( "Edit board setup including layers, design rules and various defaults" ) )
  842. .Icon( BITMAPS::options_board ) );
  843. TOOL_ACTION PCB_ACTIONS::importNetlist( TOOL_ACTION_ARGS()
  844. .Name( "pcbnew.EditorControl.importNetlist" )
  845. .Scope( AS_GLOBAL )
  846. .MenuText( _( "Import Netlist..." ) )
  847. .Tooltip( _( "Read netlist and update board connectivity" ) )
  848. .Icon( BITMAPS::netlist ) );
  849. TOOL_ACTION PCB_ACTIONS::importSpecctraSession( TOOL_ACTION_ARGS()
  850. .Name( "pcbnew.EditorControl.importSpecctraSession" )
  851. .Scope( AS_GLOBAL )
  852. .MenuText( _( "Import Specctra Session..." ) )
  853. .Tooltip( _( "Import routed Specctra session (*.ses) file" ) )
  854. .Icon( BITMAPS::import ) );
  855. TOOL_ACTION PCB_ACTIONS::exportSpecctraDSN( TOOL_ACTION_ARGS()
  856. .Name( "pcbnew.EditorControl.exportSpecctraDSN" )
  857. .Scope( AS_GLOBAL )
  858. .MenuText( _( "Export Specctra DSN..." ) )
  859. .Tooltip( _( "Export Specctra DSN routing info" ) )
  860. .Icon( BITMAPS::export_dsn ) );
  861. TOOL_ACTION PCB_ACTIONS::generateGerbers( TOOL_ACTION_ARGS()
  862. .Name( "pcbnew.EditorControl.generateGerbers" )
  863. .Scope( AS_GLOBAL )
  864. .MenuText( _( "Gerbers (.gbr)..." ) )
  865. .Tooltip( _( "Generate Gerbers for fabrication" ) )
  866. .Icon( BITMAPS::post_gerber ) );
  867. TOOL_ACTION PCB_ACTIONS::generateDrillFiles( TOOL_ACTION_ARGS()
  868. .Name( "pcbnew.EditorControl.generateDrillFiles" )
  869. .Scope( AS_GLOBAL )
  870. .MenuText( _( "Drill Files (.drl)..." ) )
  871. .Tooltip( _( "Generate Excellon drill file(s)" ) )
  872. .Icon( BITMAPS::post_drill ) );
  873. TOOL_ACTION PCB_ACTIONS::generatePosFile( TOOL_ACTION_ARGS()
  874. .Name( "pcbnew.EditorControl.generatePosFile" )
  875. .Scope( AS_GLOBAL )
  876. .MenuText( _( "Component Placement (.pos)..." ) )
  877. .Tooltip( _( "Generate component placement file(s) for pick and place" ) )
  878. .Icon( BITMAPS::post_compo ) );
  879. TOOL_ACTION PCB_ACTIONS::generateReportFile( TOOL_ACTION_ARGS()
  880. .Name( "pcbnew.EditorControl.generateReportFile" )
  881. .Scope( AS_GLOBAL )
  882. .MenuText( _( "Footprint Report (.rpt)..." ) )
  883. .Tooltip( _( "Create report of all footprints from current board" ) )
  884. .Icon( BITMAPS::post_rpt ) );
  885. TOOL_ACTION PCB_ACTIONS::generateD356File( TOOL_ACTION_ARGS()
  886. .Name( "pcbnew.EditorControl.generateD356File" )
  887. .Scope( AS_GLOBAL )
  888. .MenuText( _( "IPC-D-356 Netlist File..." ) )
  889. .Tooltip( _( "Generate IPC-D-356 netlist file" ) )
  890. .Icon( BITMAPS::post_d356 ) );
  891. TOOL_ACTION PCB_ACTIONS::generateBOM( TOOL_ACTION_ARGS()
  892. .Name( "pcbnew.EditorControl.generateBOM" )
  893. .Scope( AS_GLOBAL )
  894. .MenuText( _( "BOM..." ) )
  895. .Tooltip( _( "Create bill of materials from board" ) )
  896. .Icon( BITMAPS::post_bom ) );
  897. // Track & via size control
  898. TOOL_ACTION PCB_ACTIONS::trackWidthInc( TOOL_ACTION_ARGS()
  899. .Name( "pcbnew.EditorControl.trackWidthInc" )
  900. .Scope( AS_GLOBAL )
  901. .DefaultHotkey( 'W' )
  902. .LegacyHotkeyName( "Switch Track Width To Next" )
  903. .MenuText( _( "Switch Track Width to Next" ) )
  904. .Tooltip( _( "Change track width to next pre-defined size" ) ) );
  905. TOOL_ACTION PCB_ACTIONS::trackWidthDec( TOOL_ACTION_ARGS()
  906. .Name( "pcbnew.EditorControl.trackWidthDec" )
  907. .Scope( AS_GLOBAL )
  908. .DefaultHotkey( MD_SHIFT + 'W' )
  909. .LegacyHotkeyName( "Switch Track Width To Previous" )
  910. .MenuText( _( "Switch Track Width to Previous" ) )
  911. .Tooltip( _( "Change track width to previous pre-defined size" ) ) );
  912. TOOL_ACTION PCB_ACTIONS::viaSizeInc( TOOL_ACTION_ARGS()
  913. .Name( "pcbnew.EditorControl.viaSizeInc" )
  914. .Scope( AS_GLOBAL )
  915. .DefaultHotkey( '\'' )
  916. .LegacyHotkeyName( "Increase Via Size" )
  917. .MenuText( _( "Increase Via Size" ) )
  918. .Tooltip( _( "Change via size to next pre-defined size" ) ) );
  919. TOOL_ACTION PCB_ACTIONS::viaSizeDec( TOOL_ACTION_ARGS()
  920. .Name( "pcbnew.EditorControl.viaSizeDec" )
  921. .Scope( AS_GLOBAL )
  922. .DefaultHotkey( '\\' )
  923. .LegacyHotkeyName( "Decrease Via Size" )
  924. .MenuText( _( "Decrease Via Size" ) )
  925. .Tooltip( _( "Change via size to previous pre-defined size" ) ) );
  926. TOOL_ACTION PCB_ACTIONS::trackViaSizeChanged( TOOL_ACTION_ARGS()
  927. .Name( "pcbnew.EditorControl.trackViaSizeChanged" )
  928. .Scope( AS_GLOBAL )
  929. .Flags( AF_NOTIFY ) );
  930. TOOL_ACTION PCB_ACTIONS::assignNetClass( TOOL_ACTION_ARGS()
  931. .Name( "pcbnew.EditorControl.assignNetclass" )
  932. .Scope( AS_GLOBAL )
  933. .MenuText( _( "Assign Netclass..." ) )
  934. .Tooltip( _( "Assign a netclass to nets matching a pattern" ) )
  935. .Icon( BITMAPS::netlist ) );
  936. TOOL_ACTION PCB_ACTIONS::zoneMerge( TOOL_ACTION_ARGS()
  937. .Name( "pcbnew.EditorControl.zoneMerge" )
  938. .Scope( AS_GLOBAL )
  939. .MenuText( _( "Merge Zones" ) )
  940. .Tooltip( _( "Merge zones" ) ) );
  941. TOOL_ACTION PCB_ACTIONS::zoneDuplicate( TOOL_ACTION_ARGS()
  942. .Name( "pcbnew.EditorControl.zoneDuplicate" )
  943. .Scope( AS_GLOBAL )
  944. .MenuText( _( "Duplicate Zone onto Layer..." ) )
  945. .Tooltip( _( "Duplicate zone outline onto a different layer" ) )
  946. .Icon( BITMAPS::zone_duplicate ) );
  947. TOOL_ACTION PCB_ACTIONS::placeFootprint( TOOL_ACTION_ARGS()
  948. .Name( "pcbnew.EditorControl.placeFootprint" )
  949. .Scope( AS_GLOBAL )
  950. .DefaultHotkey( 'A' )
  951. .LegacyHotkeyName( "Add Footprint" )
  952. .MenuText( _( "Add Footprint" ) )
  953. .Tooltip( _( "Add a footprint" ) )
  954. .Icon( BITMAPS::module )
  955. .Flags( AF_ACTIVATE )
  956. .Parameter<FOOTPRINT*>( nullptr ) );
  957. TOOL_ACTION PCB_ACTIONS::drillOrigin( TOOL_ACTION_ARGS()
  958. .Name( "pcbnew.EditorControl.drillOrigin" )
  959. .Scope( AS_GLOBAL )
  960. .MenuText( _( "Drill/Place File Origin" ) )
  961. .Tooltip( _( "Place origin point for drill files and component placement files" ) )
  962. .Icon( BITMAPS::set_origin )
  963. .Flags( AF_ACTIVATE ) );
  964. TOOL_ACTION PCB_ACTIONS::toggleLock( TOOL_ACTION_ARGS()
  965. .Name( "pcbnew.EditorControl.toggleLock" )
  966. .Scope( AS_GLOBAL )
  967. .DefaultHotkey( 'L' )
  968. .LegacyHotkeyName( "Lock/Unlock Footprint" )
  969. .MenuText( _( "Toggle Lock" ) )
  970. .Tooltip( _( "Lock or unlock selected items" ) )
  971. .Icon( BITMAPS::lock_unlock ) );
  972. TOOL_ACTION PCB_ACTIONS::toggleHV45Mode( TOOL_ACTION_ARGS()
  973. .Name( "pcbnew.EditorControl.toggle45" )
  974. .Scope( AS_GLOBAL )
  975. .DefaultHotkey( MD_SHIFT + ' ' )
  976. .MenuText( _( "Constrain to H, V, 45" ) )
  977. .Tooltip( _( "Limit actions to horizontal, vertical, or 45 degrees from the starting point" ) )
  978. .Icon( BITMAPS::hv45mode ) );
  979. TOOL_ACTION PCB_ACTIONS::lock( TOOL_ACTION_ARGS()
  980. .Name( "pcbnew.EditorControl.lock" )
  981. .Scope( AS_GLOBAL )
  982. .MenuText( _( "Lock" ) )
  983. .Tooltip( _( "Prevent items from being moved and/or resized on the canvas" ) )
  984. .Icon( BITMAPS::locked ) );
  985. TOOL_ACTION PCB_ACTIONS::unlock( TOOL_ACTION_ARGS()
  986. .Name( "pcbnew.EditorControl.unlock" )
  987. .Scope( AS_GLOBAL )
  988. .MenuText( _( "Unlock" ) )
  989. .Tooltip( _( "Allow items to be moved and/or resized on the canvas" ) )
  990. .Icon( BITMAPS::unlocked ) );
  991. TOOL_ACTION PCB_ACTIONS::group( TOOL_ACTION_ARGS()
  992. .Name( "pcbnew.EditorControl.group" )
  993. .Scope( AS_GLOBAL )
  994. .MenuText( _( "Group" ) )
  995. .Tooltip( _( "Group the selected items so that they are treated as a single item" ) )
  996. .Icon( BITMAPS::group ) );
  997. TOOL_ACTION PCB_ACTIONS::ungroup( TOOL_ACTION_ARGS()
  998. .Name( "pcbnew.EditorControl.ungroup" )
  999. .Scope( AS_GLOBAL )
  1000. .MenuText( _( "Ungroup" ) )
  1001. .Tooltip( _( "Ungroup any selected groups" ) )
  1002. .Icon( BITMAPS::group_ungroup ) );
  1003. TOOL_ACTION PCB_ACTIONS::removeFromGroup( TOOL_ACTION_ARGS()
  1004. .Name( "pcbnew.EditorControl.removeFromGroup" )
  1005. .Scope( AS_GLOBAL )
  1006. .MenuText( _( "Remove Items" ) )
  1007. .Tooltip( _( "Remove items from group" ) )
  1008. .Icon( BITMAPS::group_remove ) );
  1009. TOOL_ACTION PCB_ACTIONS::groupEnter( TOOL_ACTION_ARGS()
  1010. .Name( "pcbnew.EditorControl.groupEnter" )
  1011. .Scope( AS_GLOBAL )
  1012. .MenuText( _( "Enter Group" ) )
  1013. .Tooltip( _( "Enter the group to edit items" ) )
  1014. .Icon( BITMAPS::group_enter ) );
  1015. TOOL_ACTION PCB_ACTIONS::groupLeave( TOOL_ACTION_ARGS()
  1016. .Name( "pcbnew.EditorControl.groupLeave" )
  1017. .Scope( AS_GLOBAL )
  1018. .MenuText( _( "Leave Group" ) )
  1019. .Tooltip( _( "Leave the current group" ) )
  1020. .Icon( BITMAPS::group_leave ) );
  1021. TOOL_ACTION PCB_ACTIONS::appendBoard( TOOL_ACTION_ARGS()
  1022. .Name( "pcbnew.EditorControl.appendBoard" )
  1023. .Scope( AS_GLOBAL )
  1024. .MenuText( _( "Append Board..." ) )
  1025. .Tooltip( _( "Open another board and append its contents to this board" ) )
  1026. .Icon( BITMAPS::add_board ) );
  1027. TOOL_ACTION PCB_ACTIONS::highlightNet( TOOL_ACTION_ARGS()
  1028. .Name( "pcbnew.EditorControl.highlightNet" )
  1029. .Scope( AS_GLOBAL )
  1030. .DefaultHotkey( '`' )
  1031. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1032. .LegacyHotkeyName( "Toggle Highlight of Selected Net (Modern Toolset only)" )
  1033. .MenuText( _( "Highlight Net" ) )
  1034. .Tooltip( _( "Highlight net under cursor" ) )
  1035. .Icon( BITMAPS::net_highlight )
  1036. .Parameter<int>( 0 ) );
  1037. TOOL_ACTION PCB_ACTIONS::toggleLastNetHighlight( TOOL_ACTION_ARGS()
  1038. .Name( "pcbnew.EditorControl.toggleLastNetHighlight" )
  1039. .Scope( AS_GLOBAL )
  1040. .MenuText( _( "Toggle Last Net Highlight" ) )
  1041. .Tooltip( _( "Toggle between last two highlighted nets" ) )
  1042. .Parameter<int>( 0 ) );
  1043. TOOL_ACTION PCB_ACTIONS::clearHighlight( TOOL_ACTION_ARGS()
  1044. .Name( "pcbnew.EditorControl.clearHighlight" )
  1045. .Scope( AS_GLOBAL )
  1046. .DefaultHotkey( '~' )
  1047. .MenuText( _( "Clear Net Highlighting" ) )
  1048. .Tooltip( _( "Clear any existing net highlighting" ) ) );
  1049. TOOL_ACTION PCB_ACTIONS::toggleNetHighlight( TOOL_ACTION_ARGS()
  1050. .Name( "pcbnew.EditorControl.toggleNetHighlight" )
  1051. .Scope( AS_GLOBAL )
  1052. .DefaultHotkey( MD_ALT + '`' )
  1053. .MenuText( _( "Toggle Net Highlight" ) )
  1054. .Tooltip( _( "Toggle net highlighting" ) )
  1055. .Icon( BITMAPS::net_highlight )
  1056. .Parameter<int>( 0 ) );
  1057. TOOL_ACTION PCB_ACTIONS::highlightNetSelection( TOOL_ACTION_ARGS()
  1058. .Name( "pcbnew.EditorControl.highlightNetSelection" )
  1059. .Scope( AS_GLOBAL )
  1060. .MenuText( _( "Highlight Net" ) )
  1061. .Tooltip( _( "Highlight all copper items on the selected net(s)" ) )
  1062. .Icon( BITMAPS::net_highlight )
  1063. .Parameter<int>( 0 ) );
  1064. TOOL_ACTION PCB_ACTIONS::highlightItem( TOOL_ACTION_ARGS()
  1065. .Name( "pcbnew.EditorControl.highlightItem" )
  1066. .Scope( AS_GLOBAL ) );
  1067. TOOL_ACTION PCB_ACTIONS::hideNetInRatsnest( TOOL_ACTION_ARGS()
  1068. .Name( "pcbnew.EditorControl.hideNet" )
  1069. .Scope( AS_GLOBAL )
  1070. .MenuText( _( "Hide Net in Ratsnest" ) )
  1071. .Tooltip( _( "Hide the selected net in the ratsnest of unconnected net lines/arcs" ) )
  1072. .Icon( BITMAPS::hide_ratsnest )
  1073. .Parameter<int>( 0 ) ); // Default to hiding selected net
  1074. TOOL_ACTION PCB_ACTIONS::showNetInRatsnest( TOOL_ACTION_ARGS()
  1075. .Name( "pcbnew.EditorControl.showNet" )
  1076. .Scope( AS_GLOBAL )
  1077. .MenuText( _( "Show Net in Ratsnest" ) )
  1078. .Tooltip( _( "Show the selected net in the ratsnest of unconnected net lines/arcs" ) )
  1079. .Icon( BITMAPS::show_ratsnest )
  1080. .Parameter<int>( 0 ) ); // Default to showing selected net
  1081. TOOL_ACTION PCB_ACTIONS::showEeschema( TOOL_ACTION_ARGS()
  1082. .Name( "pcbnew.EditorControl.showEeschema" )
  1083. .Scope( AS_GLOBAL )
  1084. .MenuText( _( "Switch to Schematic Editor" ) )
  1085. .Tooltip( _( "Open schematic in schematic editor" ) )
  1086. .Icon( BITMAPS::icon_eeschema_24 ) );
  1087. // PCB_CONTROL
  1088. //
  1089. TOOL_ACTION PCB_ACTIONS::localRatsnestTool( TOOL_ACTION_ARGS()
  1090. .Name( "pcbnew.Control.localRatsnestTool" )
  1091. .Scope( AS_GLOBAL )
  1092. .MenuText( _( "Local Ratsnest" ) )
  1093. .Tooltip( _( "Toggle ratsnest display of selected item(s)" ) )
  1094. .Icon( BITMAPS::tool_ratsnest )
  1095. .Flags( AF_ACTIVATE ) );
  1096. TOOL_ACTION PCB_ACTIONS::hideLocalRatsnest( TOOL_ACTION_ARGS()
  1097. .Name( "pcbnew.Control.hideDynamicRatsnest" )
  1098. .Scope( AS_GLOBAL ) );
  1099. TOOL_ACTION PCB_ACTIONS::updateLocalRatsnest( TOOL_ACTION_ARGS()
  1100. .Name( "pcbnew.Control.updateLocalRatsnest" )
  1101. .Scope( AS_GLOBAL )
  1102. .Parameter( VECTOR2I() ) );
  1103. TOOL_ACTION PCB_ACTIONS::listNets( TOOL_ACTION_ARGS()
  1104. .Name( "pcbnew.Control.listNets" )
  1105. .Scope( AS_GLOBAL )
  1106. .MenuText( _( "Net Inspector" ) )
  1107. .Tooltip( _( "Show the net inspector" ) )
  1108. .Icon( BITMAPS::list_nets ) );
  1109. TOOL_ACTION PCB_ACTIONS::showPythonConsole( TOOL_ACTION_ARGS()
  1110. .Name( "pcbnew.Control.showPythonConsole" )
  1111. .Scope( AS_GLOBAL )
  1112. .MenuText( _( "Scripting Console" ) )
  1113. .Tooltip( _( "Show the Python scripting console" ) )
  1114. .Icon( BITMAPS::py_script ) );
  1115. TOOL_ACTION PCB_ACTIONS::showLayersManager( TOOL_ACTION_ARGS()
  1116. .Name( "pcbnew.Control.showLayersManager" )
  1117. .Scope( AS_GLOBAL )
  1118. .MenuText( _( "Show Appearance Manager" ) )
  1119. .Tooltip( _( "Show/hide the appearance manager" ) )
  1120. .Icon( BITMAPS::layers_manager ) );
  1121. TOOL_ACTION PCB_ACTIONS::flipBoard( TOOL_ACTION_ARGS()
  1122. .Name( "pcbnew.Control.flipBoard" )
  1123. .Scope( AS_GLOBAL )
  1124. .MenuText( _( "Flip Board View" ) )
  1125. .Tooltip( _( "View board from the opposite side" ) )
  1126. .Icon( BITMAPS::flip_board ) );
  1127. // Display modes
  1128. TOOL_ACTION PCB_ACTIONS::showRatsnest( TOOL_ACTION_ARGS()
  1129. .Name( "pcbnew.Control.showRatsnest" )
  1130. .Scope( AS_GLOBAL )
  1131. .MenuText( _( "Show Ratsnest" ) )
  1132. .Tooltip( _( "Show board ratsnest" ) )
  1133. .Icon( BITMAPS::general_ratsnest ) );
  1134. TOOL_ACTION PCB_ACTIONS::ratsnestLineMode( TOOL_ACTION_ARGS()
  1135. .Name( "pcbnew.Control.ratsnestLineMode" )
  1136. .Scope( AS_GLOBAL )
  1137. .MenuText( _( "Curved Ratsnest Lines" ) )
  1138. .Tooltip( _( "Show ratsnest with curved lines" ) )
  1139. .Icon( BITMAPS::curved_ratsnest ) );
  1140. TOOL_ACTION PCB_ACTIONS::ratsnestModeCycle( TOOL_ACTION_ARGS()
  1141. .Name( "pcbnew.Control.ratsnestModeCycle" )
  1142. .Scope( AS_GLOBAL )
  1143. .MenuText( _( "Ratsnest Mode (3-state)" ) )
  1144. .Tooltip( _( "Cycle between showing ratsnests for all layers, just visible layers, and none" ) ) );
  1145. TOOL_ACTION PCB_ACTIONS::netColorModeCycle( TOOL_ACTION_ARGS()
  1146. .Name( "pcbnew.Control.netColorMode" )
  1147. .Scope( AS_GLOBAL )
  1148. .MenuText( _( "Net Color Mode (3-state)" ) )
  1149. .Tooltip( _( "Cycle between using net and netclass colors for all nets, just ratsnests, and none" ) ) );
  1150. TOOL_ACTION PCB_ACTIONS::trackDisplayMode( TOOL_ACTION_ARGS()
  1151. .Name( "pcbnew.Control.trackDisplayMode" )
  1152. .Scope( AS_GLOBAL )
  1153. .DefaultHotkey( 'K' )
  1154. .LegacyHotkeyName( "Track Display Mode" )
  1155. .MenuText( _( "Sketch Tracks" ) )
  1156. .Tooltip( _( "Show tracks in outline mode" ) )
  1157. .Icon( BITMAPS::showtrack ) );
  1158. TOOL_ACTION PCB_ACTIONS::padDisplayMode( TOOL_ACTION_ARGS()
  1159. .Name( "pcbnew.Control.padDisplayMode" )
  1160. .Scope( AS_GLOBAL )
  1161. .MenuText( _( "Sketch Pads" ) )
  1162. .Tooltip( _( "Show pads in outline mode" ) )
  1163. .Icon( BITMAPS::pad_sketch ) );
  1164. TOOL_ACTION PCB_ACTIONS::viaDisplayMode( TOOL_ACTION_ARGS()
  1165. .Name( "pcbnew.Control.viaDisplayMode" )
  1166. .Scope( AS_GLOBAL )
  1167. .MenuText( _( "Sketch Vias" ) )
  1168. .Tooltip( _( "Show vias in outline mode" ) )
  1169. .Icon( BITMAPS::via_sketch ) );
  1170. TOOL_ACTION PCB_ACTIONS::graphicsOutlines( TOOL_ACTION_ARGS()
  1171. .Name( "pcbnew.Control.graphicOutlines" )
  1172. .Scope( AS_GLOBAL )
  1173. .MenuText( _( "Sketch Graphic Items" ) )
  1174. .Tooltip( _( "Show graphic items in outline mode" ) )
  1175. .Icon( BITMAPS::show_mod_edge ) );
  1176. TOOL_ACTION PCB_ACTIONS::textOutlines( TOOL_ACTION_ARGS()
  1177. .Name( "pcbnew.Control.textOutlines" )
  1178. .Scope( AS_GLOBAL )
  1179. .MenuText( _( "Sketch Text Items" ) )
  1180. .Tooltip( _( "Show footprint texts in line mode" ) )
  1181. .Icon( BITMAPS::text_sketch ) );
  1182. TOOL_ACTION PCB_ACTIONS::showPadNumbers( TOOL_ACTION_ARGS()
  1183. .Name( "pcbnew.Control.showPadNumbers" )
  1184. .Scope( AS_GLOBAL )
  1185. .MenuText( _( "Show pad numbers" ) )
  1186. .Tooltip( _( "Show pad numbers" ) )
  1187. .Icon( BITMAPS::pad_number ) );
  1188. TOOL_ACTION PCB_ACTIONS::zoneDisplayFilled( TOOL_ACTION_ARGS()
  1189. .Name( "pcbnew.Control.zoneDisplayEnable" )
  1190. .Scope( AS_GLOBAL )
  1191. .MenuText( _( "Draw Zone Fills" ) )
  1192. .Tooltip( _( "Show filled areas of zones" ) )
  1193. .Icon( BITMAPS::show_zone ) );
  1194. TOOL_ACTION PCB_ACTIONS::zoneDisplayOutline( TOOL_ACTION_ARGS()
  1195. .Name( "pcbnew.Control.zoneDisplayDisable" )
  1196. .Scope( AS_GLOBAL )
  1197. .MenuText( _( "Draw Zone Outlines" ) )
  1198. .Tooltip( _( "Show only zone boundaries" ) )
  1199. .Icon( BITMAPS::show_zone_disable ) );
  1200. TOOL_ACTION PCB_ACTIONS::zoneDisplayFractured( TOOL_ACTION_ARGS()
  1201. .Name( "pcbnew.Control.zoneDisplayOutlines" )
  1202. .Scope( AS_GLOBAL )
  1203. .MenuText( _( "Draw Zone Fill Fracture Borders" ) )
  1204. .Tooltip( _( "Draw Zone Fill Fracture Borders" ) )
  1205. .Icon( BITMAPS::show_zone_outline_only ) );
  1206. TOOL_ACTION PCB_ACTIONS::zoneDisplayTriangulated( TOOL_ACTION_ARGS()
  1207. .Name( "pcbnew.Control.zoneDisplayTesselation" )
  1208. .Scope( AS_GLOBAL )
  1209. .MenuText( _( "Draw Zone Fill Triangulation" ) )
  1210. .Tooltip( _( "Draw Zone Fill Triangulation" ) )
  1211. .Icon( BITMAPS::show_zone_triangulation ) );
  1212. TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( TOOL_ACTION_ARGS()
  1213. .Name( "pcbnew.Control.zoneDisplayToggle" )
  1214. .Scope( AS_GLOBAL )
  1215. .MenuText( _( "Toggle Zone Display" ) )
  1216. .Tooltip( _( "Cycle between showing zone fills and just their outlines" ) )
  1217. .Icon( BITMAPS::show_zone ) );
  1218. // Layer control
  1219. // Translate aLayer to the action that switches to it
  1220. TOOL_ACTION* PCB_ACTIONS::LayerIDToAction( PCB_LAYER_ID aLayer )
  1221. {
  1222. switch( aLayer )
  1223. {
  1224. case F_Cu: return &PCB_ACTIONS::layerTop;
  1225. case In1_Cu: return &PCB_ACTIONS::layerInner1;
  1226. case In2_Cu: return &PCB_ACTIONS::layerInner2;
  1227. case In3_Cu: return &PCB_ACTIONS::layerInner3;
  1228. case In4_Cu: return &PCB_ACTIONS::layerInner4;
  1229. case In5_Cu: return &PCB_ACTIONS::layerInner5;
  1230. case In6_Cu: return &PCB_ACTIONS::layerInner6;
  1231. case In7_Cu: return &PCB_ACTIONS::layerInner7;
  1232. case In8_Cu: return &PCB_ACTIONS::layerInner8;
  1233. case In9_Cu: return &PCB_ACTIONS::layerInner9;
  1234. case In10_Cu: return &PCB_ACTIONS::layerInner10;
  1235. case In11_Cu: return &PCB_ACTIONS::layerInner11;
  1236. case In12_Cu: return &PCB_ACTIONS::layerInner12;
  1237. case In13_Cu: return &PCB_ACTIONS::layerInner13;
  1238. case In14_Cu: return &PCB_ACTIONS::layerInner14;
  1239. case In15_Cu: return &PCB_ACTIONS::layerInner15;
  1240. case In16_Cu: return &PCB_ACTIONS::layerInner16;
  1241. case In17_Cu: return &PCB_ACTIONS::layerInner17;
  1242. case In18_Cu: return &PCB_ACTIONS::layerInner18;
  1243. case In19_Cu: return &PCB_ACTIONS::layerInner19;
  1244. case In20_Cu: return &PCB_ACTIONS::layerInner20;
  1245. case In21_Cu: return &PCB_ACTIONS::layerInner21;
  1246. case In22_Cu: return &PCB_ACTIONS::layerInner22;
  1247. case In23_Cu: return &PCB_ACTIONS::layerInner23;
  1248. case In24_Cu: return &PCB_ACTIONS::layerInner24;
  1249. case In25_Cu: return &PCB_ACTIONS::layerInner25;
  1250. case In26_Cu: return &PCB_ACTIONS::layerInner26;
  1251. case In27_Cu: return &PCB_ACTIONS::layerInner27;
  1252. case In28_Cu: return &PCB_ACTIONS::layerInner28;
  1253. case In29_Cu: return &PCB_ACTIONS::layerInner29;
  1254. case In30_Cu: return &PCB_ACTIONS::layerInner30;
  1255. case B_Cu: return &PCB_ACTIONS::layerBottom;
  1256. default: return nullptr;
  1257. }
  1258. }
  1259. // Implemented as an accessor + static variable to ensure it is initialized when used
  1260. // in static action constructors
  1261. TOOL_ACTION_GROUP PCB_ACTIONS::layerDirectSwitchActions()
  1262. {
  1263. static TOOL_ACTION_GROUP group( "pcbnew.Control.DirectLayerActions" );
  1264. return group;
  1265. }
  1266. TOOL_ACTION PCB_ACTIONS::layerTop( TOOL_ACTION_ARGS()
  1267. .Name( "pcbnew.Control.layerTop" )
  1268. .Scope( AS_GLOBAL )
  1269. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1270. .DefaultHotkey( WXK_PAGEUP )
  1271. .LegacyHotkeyName( "Switch to Component (F.Cu) layer" )
  1272. .MenuText( _( "Switch to Component (F.Cu) layer" ) )
  1273. .Tooltip( _( "Switch to Component (F.Cu) layer" ) )
  1274. .Flags( AF_NOTIFY )
  1275. .Parameter( F_Cu ) );
  1276. TOOL_ACTION PCB_ACTIONS::layerInner1( TOOL_ACTION_ARGS()
  1277. .Name( "pcbnew.Control.layerInner1" )
  1278. .Scope( AS_GLOBAL )
  1279. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1280. .LegacyHotkeyName( "Switch to Inner layer 1" )
  1281. .MenuText( _( "Switch to Inner layer 1" ) )
  1282. .Tooltip( _( "Switch to Inner layer 1" ) )
  1283. .Flags( AF_NOTIFY )
  1284. .Parameter( In1_Cu ) );
  1285. TOOL_ACTION PCB_ACTIONS::layerInner2( TOOL_ACTION_ARGS()
  1286. .Name( "pcbnew.Control.layerInner2" )
  1287. .Scope( AS_GLOBAL )
  1288. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1289. .LegacyHotkeyName( "Switch to Inner layer 2" )
  1290. .MenuText( _( "Switch to Inner layer 2" ) )
  1291. .Tooltip( _( "Switch to Inner layer 2" ) )
  1292. .Flags( AF_NOTIFY )
  1293. .Parameter( In2_Cu ) );
  1294. TOOL_ACTION PCB_ACTIONS::layerInner3( TOOL_ACTION_ARGS()
  1295. .Name( "pcbnew.Control.layerInner3" )
  1296. .Scope( AS_GLOBAL )
  1297. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1298. .LegacyHotkeyName( "Switch to Inner layer 3" )
  1299. .MenuText( _( "Switch to Inner layer 3" ) )
  1300. .Tooltip( _( "Switch to Inner layer 3" ) )
  1301. .Flags( AF_NOTIFY )
  1302. .Parameter( In3_Cu ) );
  1303. TOOL_ACTION PCB_ACTIONS::layerInner4( TOOL_ACTION_ARGS()
  1304. .Name( "pcbnew.Control.layerInner4" )
  1305. .Scope( AS_GLOBAL )
  1306. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1307. .LegacyHotkeyName( "Switch to Inner layer 4" )
  1308. .MenuText( _( "Switch to Inner layer 4" ) )
  1309. .Tooltip( _( "Switch to Inner layer 4" ) )
  1310. .Flags( AF_NOTIFY )
  1311. .Parameter( In4_Cu ) );
  1312. TOOL_ACTION PCB_ACTIONS::layerInner5( TOOL_ACTION_ARGS()
  1313. .Name( "pcbnew.Control.layerInner5" )
  1314. .Scope( AS_GLOBAL )
  1315. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1316. .LegacyHotkeyName( "Switch to Inner layer 5" )
  1317. .MenuText( _( "Switch to Inner layer 5" ) )
  1318. .Tooltip( _( "Switch to Inner layer 5" ) )
  1319. .Flags( AF_NOTIFY )
  1320. .Parameter( In5_Cu ) );
  1321. TOOL_ACTION PCB_ACTIONS::layerInner6( TOOL_ACTION_ARGS()
  1322. .Name( "pcbnew.Control.layerInner6" )
  1323. .Scope( AS_GLOBAL )
  1324. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1325. .LegacyHotkeyName( "Switch to Inner layer 6" )
  1326. .MenuText( _( "Switch to Inner layer 6" ) )
  1327. .Tooltip( _( "Switch to Inner layer 6" ) )
  1328. .Flags( AF_NOTIFY )
  1329. .Parameter( In6_Cu ) );
  1330. TOOL_ACTION PCB_ACTIONS::layerInner7( TOOL_ACTION_ARGS()
  1331. .Name( "pcbnew.Control.layerInner7" )
  1332. .Scope( AS_GLOBAL )
  1333. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1334. .MenuText( _( "Switch to Inner layer 7" ) )
  1335. .Tooltip( _( "Switch to Inner layer 7" ) )
  1336. .Flags( AF_NOTIFY )
  1337. .Parameter( In7_Cu ) );
  1338. TOOL_ACTION PCB_ACTIONS::layerInner8( TOOL_ACTION_ARGS()
  1339. .Name( "pcbnew.Control.layerInner8" )
  1340. .Scope( AS_GLOBAL )
  1341. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1342. .MenuText( _( "Switch to Inner layer 8" ) )
  1343. .Tooltip( _( "Switch to Inner layer 8" ) )
  1344. .Flags( AF_NOTIFY )
  1345. .Parameter( In8_Cu ) );
  1346. TOOL_ACTION PCB_ACTIONS::layerInner9( TOOL_ACTION_ARGS()
  1347. .Name( "pcbnew.Control.layerInner9" )
  1348. .Scope( AS_GLOBAL )
  1349. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1350. .MenuText( _( "Switch to Inner layer 9" ) )
  1351. .Tooltip( _( "Switch to Inner layer 9" ) )
  1352. .Flags( AF_NOTIFY )
  1353. .Parameter( In9_Cu ) );
  1354. TOOL_ACTION PCB_ACTIONS::layerInner10( TOOL_ACTION_ARGS()
  1355. .Name( "pcbnew.Control.layerInner10" )
  1356. .Scope( AS_GLOBAL )
  1357. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1358. .MenuText( _( "Switch to Inner layer 10" ) )
  1359. .Tooltip( _( "Switch to Inner layer 10" ) )
  1360. .Flags( AF_NOTIFY )
  1361. .Parameter( In10_Cu ) );
  1362. TOOL_ACTION PCB_ACTIONS::layerInner11( TOOL_ACTION_ARGS()
  1363. .Name( "pcbnew.Control.layerInner11" )
  1364. .Scope( AS_GLOBAL )
  1365. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1366. .MenuText( _( "Switch to Inner layer 11" ) )
  1367. .Tooltip( _( "Switch to Inner layer 11" ) )
  1368. .Flags( AF_NOTIFY )
  1369. .Parameter( In11_Cu ) );
  1370. TOOL_ACTION PCB_ACTIONS::layerInner12( TOOL_ACTION_ARGS()
  1371. .Name( "pcbnew.Control.layerInner12" )
  1372. .Scope( AS_GLOBAL )
  1373. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1374. .MenuText( _( "Switch to Inner layer 12" ) )
  1375. .Tooltip( _( "Switch to Inner layer 12" ) )
  1376. .Flags( AF_NOTIFY )
  1377. .Parameter( In12_Cu ) );
  1378. TOOL_ACTION PCB_ACTIONS::layerInner13( TOOL_ACTION_ARGS()
  1379. .Name( "pcbnew.Control.layerInner13" )
  1380. .Scope( AS_GLOBAL )
  1381. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1382. .MenuText( _( "Switch to Inner layer 13" ) )
  1383. .Tooltip( _( "Switch to Inner layer 13" ) )
  1384. .Flags( AF_NOTIFY )
  1385. .Parameter( In13_Cu ) );
  1386. TOOL_ACTION PCB_ACTIONS::layerInner14( TOOL_ACTION_ARGS()
  1387. .Name( "pcbnew.Control.layerInner14" )
  1388. .Scope( AS_GLOBAL )
  1389. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1390. .MenuText( _( "Switch to Inner layer 14" ) )
  1391. .Tooltip( _( "Switch to Inner layer 14" ) )
  1392. .Flags( AF_NOTIFY )
  1393. .Parameter( In14_Cu ) );
  1394. TOOL_ACTION PCB_ACTIONS::layerInner15( TOOL_ACTION_ARGS()
  1395. .Name( "pcbnew.Control.layerInner15" )
  1396. .Scope( AS_GLOBAL )
  1397. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1398. .MenuText( _( "Switch to Inner layer 15" ) )
  1399. .Tooltip( _( "Switch to Inner layer 15" ) )
  1400. .Flags( AF_NOTIFY )
  1401. .Parameter( In15_Cu ) );
  1402. TOOL_ACTION PCB_ACTIONS::layerInner16( TOOL_ACTION_ARGS()
  1403. .Name( "pcbnew.Control.layerInner16" )
  1404. .Scope( AS_GLOBAL )
  1405. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1406. .MenuText( _( "Switch to Inner layer 16" ) )
  1407. .Tooltip( _( "Switch to Inner layer 16" ) )
  1408. .Flags( AF_NOTIFY )
  1409. .Parameter( In16_Cu ) );
  1410. TOOL_ACTION PCB_ACTIONS::layerInner17( TOOL_ACTION_ARGS()
  1411. .Name( "pcbnew.Control.layerInner17" )
  1412. .Scope( AS_GLOBAL )
  1413. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1414. .MenuText( _( "Switch to Inner layer 17" ) )
  1415. .Tooltip( _( "Switch to Inner layer 17" ) )
  1416. .Flags( AF_NOTIFY )
  1417. .Parameter( In17_Cu ) );
  1418. TOOL_ACTION PCB_ACTIONS::layerInner18( TOOL_ACTION_ARGS()
  1419. .Name( "pcbnew.Control.layerInner18" )
  1420. .Scope( AS_GLOBAL )
  1421. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1422. .MenuText( _( "Switch to Inner layer 18" ) )
  1423. .Tooltip( _( "Switch to Inner layer 18" ) )
  1424. .Flags( AF_NOTIFY )
  1425. .Parameter( In18_Cu ) );
  1426. TOOL_ACTION PCB_ACTIONS::layerInner19( TOOL_ACTION_ARGS()
  1427. .Name( "pcbnew.Control.layerInner19" )
  1428. .Scope( AS_GLOBAL )
  1429. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1430. .MenuText( _( "Switch to Inner layer 19" ) )
  1431. .Tooltip( _( "Switch to Inner layer 19" ) )
  1432. .Flags( AF_NOTIFY )
  1433. .Parameter( In19_Cu ) );
  1434. TOOL_ACTION PCB_ACTIONS::layerInner20( TOOL_ACTION_ARGS()
  1435. .Name( "pcbnew.Control.layerInner20" )
  1436. .Scope( AS_GLOBAL )
  1437. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1438. .MenuText( _( "Switch to Inner layer 20" ) )
  1439. .Tooltip( _( "Switch to Inner layer 20" ) )
  1440. .Flags( AF_NOTIFY )
  1441. .Parameter( In20_Cu ) );
  1442. TOOL_ACTION PCB_ACTIONS::layerInner21( TOOL_ACTION_ARGS()
  1443. .Name( "pcbnew.Control.layerInner21" )
  1444. .Scope( AS_GLOBAL )
  1445. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1446. .MenuText( _( "Switch to Inner layer 21" ) )
  1447. .Tooltip( _( "Switch to Inner layer 21" ) )
  1448. .Flags( AF_NOTIFY )
  1449. .Parameter( In21_Cu ) );
  1450. TOOL_ACTION PCB_ACTIONS::layerInner22( TOOL_ACTION_ARGS()
  1451. .Name( "pcbnew.Control.layerInner22" )
  1452. .Scope( AS_GLOBAL )
  1453. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1454. .MenuText( _( "Switch to Inner layer 22" ) )
  1455. .Tooltip( _( "Switch to Inner layer 22" ) )
  1456. .Flags( AF_NOTIFY )
  1457. .Parameter( In22_Cu ) );
  1458. TOOL_ACTION PCB_ACTIONS::layerInner23( TOOL_ACTION_ARGS()
  1459. .Name( "pcbnew.Control.layerInner23" )
  1460. .Scope( AS_GLOBAL )
  1461. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1462. .MenuText( _( "Switch to Inner layer 23" ) )
  1463. .Tooltip( _( "Switch to Inner layer 23" ) )
  1464. .Flags( AF_NOTIFY )
  1465. .Parameter( In23_Cu ) );
  1466. TOOL_ACTION PCB_ACTIONS::layerInner24( TOOL_ACTION_ARGS()
  1467. .Name( "pcbnew.Control.layerInner24" )
  1468. .Scope( AS_GLOBAL )
  1469. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1470. .MenuText( _( "Switch to Inner layer 24" ) )
  1471. .Tooltip( _( "Switch to Inner layer 24" ) )
  1472. .Flags( AF_NOTIFY )
  1473. .Parameter( In24_Cu ) );
  1474. TOOL_ACTION PCB_ACTIONS::layerInner25( TOOL_ACTION_ARGS()
  1475. .Name( "pcbnew.Control.layerInner25" )
  1476. .Scope( AS_GLOBAL )
  1477. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1478. .MenuText( _( "Switch to Inner layer 25" ) )
  1479. .Tooltip( _( "Switch to Inner layer 25" ) )
  1480. .Flags( AF_NOTIFY )
  1481. .Parameter( In25_Cu ) );
  1482. TOOL_ACTION PCB_ACTIONS::layerInner26( TOOL_ACTION_ARGS()
  1483. .Name( "pcbnew.Control.layerInner26" )
  1484. .Scope( AS_GLOBAL )
  1485. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1486. .MenuText( _( "Switch to Inner layer 26" ) )
  1487. .Tooltip( _( "Switch to Inner layer 26" ) )
  1488. .Flags( AF_NOTIFY )
  1489. .Parameter( In26_Cu ) );
  1490. TOOL_ACTION PCB_ACTIONS::layerInner27( TOOL_ACTION_ARGS()
  1491. .Name( "pcbnew.Control.layerInner27" )
  1492. .Scope( AS_GLOBAL )
  1493. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1494. .MenuText( _( "Switch to Inner layer 27" ) )
  1495. .Tooltip( _( "Switch to Inner layer 27" ) )
  1496. .Flags( AF_NOTIFY )
  1497. .Parameter( In27_Cu ) );
  1498. TOOL_ACTION PCB_ACTIONS::layerInner28( TOOL_ACTION_ARGS()
  1499. .Name( "pcbnew.Control.layerInner28" )
  1500. .Scope( AS_GLOBAL )
  1501. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1502. .MenuText( _( "Switch to Inner layer 28" ) )
  1503. .Tooltip( _( "Switch to Inner layer 28" ) )
  1504. .Flags( AF_NOTIFY )
  1505. .Parameter( In28_Cu ) );
  1506. TOOL_ACTION PCB_ACTIONS::layerInner29( TOOL_ACTION_ARGS()
  1507. .Name( "pcbnew.Control.layerInner29" )
  1508. .Scope( AS_GLOBAL )
  1509. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1510. .MenuText( _( "Switch to Inner layer 29" ) )
  1511. .Tooltip( _( "Switch to Inner layer 29" ) )
  1512. .Flags( AF_NOTIFY )
  1513. .Parameter( In29_Cu ) );
  1514. TOOL_ACTION PCB_ACTIONS::layerInner30( TOOL_ACTION_ARGS()
  1515. .Name( "pcbnew.Control.layerInner30" )
  1516. .Scope( AS_GLOBAL )
  1517. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1518. .MenuText( _( "Switch to Inner layer 30" ) )
  1519. .Tooltip( _( "Switch to Inner layer 30" ) )
  1520. .Flags( AF_NOTIFY )
  1521. .Parameter( In30_Cu ) );
  1522. TOOL_ACTION PCB_ACTIONS::layerBottom( TOOL_ACTION_ARGS()
  1523. .Name( "pcbnew.Control.layerBottom" )
  1524. .Scope( AS_GLOBAL )
  1525. .Group( PCB_ACTIONS::layerDirectSwitchActions() )
  1526. .DefaultHotkey( WXK_PAGEDOWN )
  1527. .LegacyHotkeyName( "Switch to Copper (B.Cu) layer" )
  1528. .MenuText( _( "Switch to Copper (B.Cu) layer" ) )
  1529. .Tooltip( _( "Switch to Copper (B.Cu) layer" ) )
  1530. .Flags( AF_NOTIFY )
  1531. .Parameter( B_Cu ) );
  1532. TOOL_ACTION PCB_ACTIONS::layerNext( TOOL_ACTION_ARGS()
  1533. .Name( "pcbnew.Control.layerNext" )
  1534. .Scope( AS_GLOBAL )
  1535. .DefaultHotkey( '+' )
  1536. .LegacyHotkeyName( "Switch to Next Layer" )
  1537. .MenuText( _( "Switch to Next Layer" ) )
  1538. .Tooltip( _( "Switch to Next Layer" ) )
  1539. .Flags( AF_NOTIFY ) );
  1540. TOOL_ACTION PCB_ACTIONS::layerPrev( TOOL_ACTION_ARGS()
  1541. .Name( "pcbnew.Control.layerPrev" )
  1542. .Scope( AS_GLOBAL )
  1543. .DefaultHotkey( '-' )
  1544. .LegacyHotkeyName( "Switch to Previous Layer" )
  1545. .MenuText( _( "Switch to Previous Layer" ) )
  1546. .Tooltip( _( "Switch to Previous Layer" ) )
  1547. .Flags( AF_NOTIFY ) );
  1548. TOOL_ACTION PCB_ACTIONS::layerToggle( TOOL_ACTION_ARGS()
  1549. .Name( "pcbnew.Control.layerToggle" )
  1550. .Scope( AS_GLOBAL )
  1551. .DefaultHotkey( 'V' )
  1552. .LegacyHotkeyName( "Add Through Via" )
  1553. .MenuText( _( "Toggle Layer" ) )
  1554. .Tooltip( _( "Switch between layers in active layer pair" ) )
  1555. .Flags( AF_NOTIFY ) );
  1556. TOOL_ACTION PCB_ACTIONS::layerAlphaInc( TOOL_ACTION_ARGS()
  1557. .Name( "pcbnew.Control.layerAlphaInc" )
  1558. .Scope( AS_GLOBAL )
  1559. .DefaultHotkey( '}' )
  1560. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1561. .LegacyHotkeyName( "Increment Layer Transparency (Modern Toolset only)" )
  1562. .MenuText( _( "Increase Layer Opacity" ) )
  1563. .Tooltip( _( "Make the current layer less transparent" ) )
  1564. .Icon( BITMAPS::contrast_mode ) );
  1565. TOOL_ACTION PCB_ACTIONS::layerAlphaDec( TOOL_ACTION_ARGS()
  1566. .Name( "pcbnew.Control.layerAlphaDec" )
  1567. .Scope( AS_GLOBAL )
  1568. .DefaultHotkey( '{' )
  1569. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1570. .LegacyHotkeyName( "Decrement Layer Transparency (Modern Toolset only)" )
  1571. .MenuText( _( "Decrease Layer Opacity" ) )
  1572. .Tooltip( _( "Make the current layer more transparent" ) )
  1573. .Icon( BITMAPS::contrast_mode ) );
  1574. TOOL_ACTION PCB_ACTIONS::layerChanged( TOOL_ACTION_ARGS()
  1575. .Name( "pcbnew.Control.layerChanged" )
  1576. .Scope( AS_GLOBAL )
  1577. .Flags( AF_NOTIFY ) );
  1578. //Show board statistics tool
  1579. TOOL_ACTION PCB_ACTIONS::boardStatistics( TOOL_ACTION_ARGS()
  1580. .Name( "pcbnew.InspectionTool.ShowBoardStatistics" )
  1581. .Scope( AS_GLOBAL )
  1582. .MenuText( _( "Show Board Statistics" ) )
  1583. .Tooltip( _( "Shows board statistics" ) ) );
  1584. TOOL_ACTION PCB_ACTIONS::inspectClearance( TOOL_ACTION_ARGS()
  1585. .Name( "pcbnew.InspectionTool.InspectClearance" )
  1586. .Scope( AS_GLOBAL )
  1587. .MenuText( _( "Clearance Resolution" ) )
  1588. .Tooltip( _( "Show clearance resolution for the active layer between two selected objects" ) )
  1589. .Icon( BITMAPS::mw_add_gap ) );
  1590. TOOL_ACTION PCB_ACTIONS::inspectConstraints( TOOL_ACTION_ARGS()
  1591. .Name( "pcbnew.InspectionTool.InspectConstraints" )
  1592. .Scope( AS_GLOBAL )
  1593. .MenuText( _( "Constraints Resolution" ) )
  1594. .Tooltip( _( "Show constraints resolution for the selected object" ) )
  1595. .Icon( BITMAPS::mw_add_gap ) );
  1596. TOOL_ACTION PCB_ACTIONS::diffFootprint( TOOL_ACTION_ARGS()
  1597. .Name( "pcbnew.InspectionTool.DiffFootprint" )
  1598. .Scope( AS_GLOBAL )
  1599. .MenuText( _( "Diff Footprint with Library" ) )
  1600. .Tooltip( _( "Show differences between board footprint and its library equivalent" ) )
  1601. .Icon( BITMAPS::library ) );
  1602. TOOL_ACTION PCB_ACTIONS::showFootprintAssociations( TOOL_ACTION_ARGS()
  1603. .Name( "pcbnew.InspectionTool.ShowFootprintAssociations" )
  1604. .Scope( AS_GLOBAL )
  1605. .MenuText( _( "Show Footprint Associations" ) )
  1606. .Tooltip( _( "Show footprint library and schematic symbol associations" ) )
  1607. .Icon( BITMAPS::edit_cmp_symb_links ) );
  1608. //Geographic re-annotation tool
  1609. TOOL_ACTION PCB_ACTIONS::boardReannotate( TOOL_ACTION_ARGS()
  1610. .Name( "pcbnew.ReannotateTool.ShowReannotateDialog" )
  1611. .Scope( AS_GLOBAL )
  1612. .MenuText( _( "Geographical Reannotate..." ) )
  1613. .Tooltip( _( "Reannotate PCB in geographical order" ) )
  1614. .Icon( BITMAPS::annotate ) );
  1615. TOOL_ACTION PCB_ACTIONS::repairBoard( TOOL_ACTION_ARGS()
  1616. .Name( "pcbnew.Control.repairBoard" )
  1617. .Scope( AS_GLOBAL )
  1618. .MenuText( _( "Repair Board" ) )
  1619. .Tooltip( _( "Run various diagnostics and attempt to repair board" ) )
  1620. .Icon( BITMAPS::rescue )
  1621. .Parameter( false ) ); // Don't repair quietly
  1622. TOOL_ACTION PCB_ACTIONS::repairFootprint( TOOL_ACTION_ARGS()
  1623. .Name( "pcbnew.ModuleEditor.repairFootprint" )
  1624. .Scope( AS_GLOBAL )
  1625. .MenuText( _( "Repair Footprint" ) )
  1626. .Tooltip( _( "Run various diagnostics and attempt to repair footprint" ) ) );
  1627. // PLACEMENT_TOOL
  1628. //
  1629. TOOL_ACTION PCB_ACTIONS::alignTop( TOOL_ACTION_ARGS()
  1630. .Name( "pcbnew.AlignAndDistribute.alignTop" )
  1631. .Scope( AS_GLOBAL )
  1632. .MenuText( _( "Align to Top" ) )
  1633. .Tooltip( _( "Aligns selected items to the top edge" ) )
  1634. .Icon( BITMAPS::align_items_top ) );
  1635. TOOL_ACTION PCB_ACTIONS::alignBottom( TOOL_ACTION_ARGS()
  1636. .Name( "pcbnew.AlignAndDistribute.alignBottom" )
  1637. .Scope( AS_GLOBAL )
  1638. .MenuText( _( "Align to Bottom" ) )
  1639. .Tooltip( _( "Aligns selected items to the bottom edge" ) )
  1640. .Icon( BITMAPS::align_items_bottom ) );
  1641. TOOL_ACTION PCB_ACTIONS::alignLeft( TOOL_ACTION_ARGS()
  1642. .Name( "pcbnew.AlignAndDistribute.alignLeft" )
  1643. .Scope( AS_GLOBAL )
  1644. .MenuText( _( "Align to Left" ) )
  1645. .Tooltip( _( "Aligns selected items to the left edge" ) )
  1646. .Icon( BITMAPS::align_items_left ) );
  1647. TOOL_ACTION PCB_ACTIONS::alignRight( TOOL_ACTION_ARGS()
  1648. .Name( "pcbnew.AlignAndDistribute.alignRight" )
  1649. .Scope( AS_GLOBAL )
  1650. .MenuText( _( "Align to Right" ) )
  1651. .Tooltip( _( "Aligns selected items to the right edge" ) )
  1652. .Icon( BITMAPS::align_items_right ) );
  1653. TOOL_ACTION PCB_ACTIONS::alignCenterY( TOOL_ACTION_ARGS()
  1654. .Name( "pcbnew.AlignAndDistribute.alignCenterY" )
  1655. .Scope( AS_GLOBAL )
  1656. .MenuText( _( "Align to Vertical Center" ) )
  1657. .Tooltip( _( "Aligns selected items to the vertical center" ) )
  1658. .Icon( BITMAPS::align_items_center ) );
  1659. TOOL_ACTION PCB_ACTIONS::alignCenterX( TOOL_ACTION_ARGS()
  1660. .Name( "pcbnew.AlignAndDistribute.alignCenterX" )
  1661. .Scope( AS_GLOBAL )
  1662. .MenuText( _( "Align to Horizontal Center" ) )
  1663. .Tooltip( _( "Aligns selected items to the horizontal center" ) )
  1664. .Icon( BITMAPS::align_items_middle ) );
  1665. TOOL_ACTION PCB_ACTIONS::distributeHorizontally( TOOL_ACTION_ARGS()
  1666. .Name( "pcbnew.AlignAndDistribute.distributeHorizontally" )
  1667. .Scope( AS_GLOBAL )
  1668. .MenuText( _( "Distribute Horizontally" ) )
  1669. .Tooltip( _( "Distributes selected items along the horizontal axis" ) )
  1670. .Icon( BITMAPS::distribute_horizontal ) );
  1671. TOOL_ACTION PCB_ACTIONS::distributeVertically( TOOL_ACTION_ARGS()
  1672. .Name( "pcbnew.AlignAndDistribute.distributeVertically" )
  1673. .Scope( AS_GLOBAL )
  1674. .MenuText( _( "Distribute Vertically" ) )
  1675. .Tooltip( _( "Distributes selected items along the vertical axis" ) )
  1676. .Icon( BITMAPS::distribute_vertical ) );
  1677. // PCB_POINT_EDITOR
  1678. //
  1679. TOOL_ACTION PCB_ACTIONS::pointEditorAddCorner( TOOL_ACTION_ARGS()
  1680. .Name( "pcbnew.PointEditor.addCorner" )
  1681. .Scope( AS_GLOBAL )
  1682. #ifdef __WXMAC__
  1683. .DefaultHotkey( WXK_F1 )
  1684. #else
  1685. .DefaultHotkey( WXK_INSERT )
  1686. #endif
  1687. .MenuText( _( "Create Corner" ) )
  1688. .Tooltip( _( "Create a corner" ) )
  1689. .Icon( BITMAPS::add_corner ) );
  1690. TOOL_ACTION PCB_ACTIONS::pointEditorRemoveCorner( TOOL_ACTION_ARGS()
  1691. .Name( "pcbnew.PointEditor.removeCorner" )
  1692. .Scope( AS_GLOBAL )
  1693. .MenuText( _( "Remove Corner" ) )
  1694. .Tooltip( _( "Remove corner" ) )
  1695. .Icon( BITMAPS::delete_cursor ) );
  1696. TOOL_ACTION PCB_ACTIONS::pointEditorArcKeepCenter( TOOL_ACTION_ARGS()
  1697. .Name( "pcbnew.PointEditor.arcKeepCenter" )
  1698. .Scope( AS_GLOBAL )
  1699. .MenuText( _( "Keep arc center, adjust radius" ) )
  1700. .Tooltip( _( "Switch arc editing mode to keep center, adjust radius and endpoints" ) )
  1701. .Parameter( ARC_EDIT_MODE::KEEP_CENTER_ADJUST_ANGLE_RADIUS ) );
  1702. TOOL_ACTION PCB_ACTIONS::pointEditorArcKeepEndpoint( TOOL_ACTION_ARGS()
  1703. .Name( "pcbnew.PointEditor.arcKeepEndpoint" )
  1704. .Scope( AS_GLOBAL )
  1705. .MenuText( _( "Keep arc endpoints or direction of starting point" ) )
  1706. .Tooltip( _( "Switch arc editing mode to keep endpoints, or to keep direction of the other point" ) )
  1707. .Parameter( ARC_EDIT_MODE::KEEP_ENDPOINTS_OR_START_DIRECTION ) );
  1708. // GROUP_TOOL
  1709. //
  1710. TOOL_ACTION PCB_ACTIONS::groupProperties( TOOL_ACTION_ARGS()
  1711. .Name( "pcbnew.Groups.groupProperties" )
  1712. .Scope( AS_GLOBAL ) );
  1713. TOOL_ACTION PCB_ACTIONS::pickNewGroupMember( TOOL_ACTION_ARGS()
  1714. .Name( "pcbnew.Groups.selectNewGroupMember" )
  1715. .Scope( AS_GLOBAL ) );
  1716. // POSITION_RELATIVE_TOOL
  1717. //
  1718. TOOL_ACTION PCB_ACTIONS::positionRelative( TOOL_ACTION_ARGS()
  1719. .Name( "pcbnew.PositionRelative.positionRelative" )
  1720. .Scope( AS_GLOBAL )
  1721. .DefaultHotkey( MD_SHIFT + 'P' )
  1722. .LegacyHotkeyName( "Position Item Relative" )
  1723. .MenuText( _( "Position Relative To..." ) )
  1724. .Tooltip( _( "Positions the selected item(s) by an exact amount relative to another" ) )
  1725. .Icon( BITMAPS::move_relative ) );
  1726. TOOL_ACTION PCB_ACTIONS::selectpositionRelativeItem( TOOL_ACTION_ARGS()
  1727. .Name( "pcbnew.PositionRelative.selectpositionRelativeItem" )
  1728. .Scope( AS_GLOBAL ) );
  1729. // PCB_SELECTION_TOOL
  1730. //
  1731. TOOL_ACTION PCB_ACTIONS::selectionActivate( TOOL_ACTION_ARGS()
  1732. .Name( "pcbnew.InteractiveSelection" )
  1733. .Scope( AS_GLOBAL )
  1734. // No description, not shown anywhere
  1735. .Flags( AF_ACTIVATE ) );
  1736. TOOL_ACTION PCB_ACTIONS::selectionCursor( TOOL_ACTION_ARGS()
  1737. .Name( "pcbnew.InteractiveSelection.Cursor" )
  1738. .Scope( AS_GLOBAL )
  1739. .Parameter<CLIENT_SELECTION_FILTER>( nullptr ) );
  1740. TOOL_ACTION PCB_ACTIONS::selectItem( TOOL_ACTION_ARGS()
  1741. .Name( "pcbnew.InteractiveSelection.SelectItem" )
  1742. .Scope( AS_GLOBAL ) );
  1743. TOOL_ACTION PCB_ACTIONS::selectItems( TOOL_ACTION_ARGS()
  1744. .Name( "pcbnew.InteractiveSelection.SelectItems" )
  1745. .Scope( AS_GLOBAL ) );
  1746. TOOL_ACTION PCB_ACTIONS::unselectItem( TOOL_ACTION_ARGS()
  1747. .Name( "pcbnew.InteractiveSelection.UnselectItem" )
  1748. .Scope( AS_GLOBAL ) );
  1749. TOOL_ACTION PCB_ACTIONS::unselectItems( TOOL_ACTION_ARGS()
  1750. .Name( "pcbnew.InteractiveSelection.UnselectItems" )
  1751. .Scope( AS_GLOBAL ) );
  1752. TOOL_ACTION PCB_ACTIONS::selectionClear( TOOL_ACTION_ARGS()
  1753. .Name( "pcbnew.InteractiveSelection.Clear" )
  1754. .Scope( AS_GLOBAL ) );
  1755. TOOL_ACTION PCB_ACTIONS::selectionMenu( TOOL_ACTION_ARGS()
  1756. .Name( "pcbnew.InteractiveSelection.SelectionMenu" )
  1757. .Scope( AS_GLOBAL ) );
  1758. TOOL_ACTION PCB_ACTIONS::selectConnection( TOOL_ACTION_ARGS()
  1759. .Name( "pcbnew.InteractiveSelection.SelectConnection" )
  1760. .Scope( AS_GLOBAL )
  1761. .DefaultHotkey( 'U' )
  1762. .LegacyHotkeyName( "Select Single Track" )
  1763. .MenuText( _( "Select/Expand Connection" ) )
  1764. .Tooltip( _( "Selects a connection or expands an existing selection to junctions, pads, or entire connections" ) )
  1765. .Icon( BITMAPS::add_tracks ) );
  1766. TOOL_ACTION PCB_ACTIONS::unrouteSelected( TOOL_ACTION_ARGS()
  1767. .Name( "pcbnew.InteractiveSelection.unrouteSelected" )
  1768. .Scope( AS_GLOBAL )
  1769. .MenuText( _( "Unroute Selected" ) )
  1770. .Tooltip( _( "Unroutes selected items to the nearest pad." ) )
  1771. .Icon( BITMAPS::general_deletions ) );
  1772. TOOL_ACTION PCB_ACTIONS::syncSelection( TOOL_ACTION_ARGS()
  1773. .Name( "pcbnew.InteractiveSelection.SyncSelection" )
  1774. .Scope( AS_GLOBAL ) );
  1775. TOOL_ACTION PCB_ACTIONS::syncSelectionWithNets( TOOL_ACTION_ARGS()
  1776. .Name( "pcbnew.InteractiveSelection.SyncSelectionWithNets" )
  1777. .Scope( AS_GLOBAL ) );
  1778. TOOL_ACTION PCB_ACTIONS::selectNet( TOOL_ACTION_ARGS()
  1779. .Name( "pcbnew.InteractiveSelection.SelectNet" )
  1780. .Scope( AS_GLOBAL )
  1781. .MenuText( _( "Select All Tracks in Net" ) )
  1782. .Tooltip( _( "Selects all tracks & vias belonging to the same net." ) )
  1783. .Parameter<int>( 0 ) );
  1784. TOOL_ACTION PCB_ACTIONS::deselectNet( TOOL_ACTION_ARGS()
  1785. .Name( "pcbnew.InteractiveSelection.DeselectNet" )
  1786. .Scope( AS_GLOBAL )
  1787. .MenuText( _( "Deselect All Tracks in Net" ) )
  1788. .Tooltip( _( "Deselects all tracks & vias belonging to the same net." ) )
  1789. .Parameter<int>( 0 ) );
  1790. TOOL_ACTION PCB_ACTIONS::selectUnconnected( TOOL_ACTION_ARGS()
  1791. .Name( "pcbnew.InteractiveSelection.SelectUnconnected" )
  1792. .Scope( AS_GLOBAL )
  1793. .DefaultHotkey( 'O' )
  1794. .MenuText( _( "Select All Unconnected Footprints" ) )
  1795. .Tooltip( _( "Selects all unconnected footprints belonging to each selected net." ) ) );
  1796. TOOL_ACTION PCB_ACTIONS::grabUnconnected( TOOL_ACTION_ARGS()
  1797. .Name( "pcbnew.InteractiveSelection.GrabUnconnected" )
  1798. .Scope( AS_GLOBAL )
  1799. .DefaultHotkey( MD_SHIFT + 'O' )
  1800. .MenuText( _( "Grab Nearest Unconnected Footprints" ) )
  1801. .Tooltip( _( "Selects and initiates moving the nearest unconnected footprint on each selected net." ) ) );
  1802. TOOL_ACTION PCB_ACTIONS::selectOnSheetFromEeschema( TOOL_ACTION_ARGS()
  1803. .Name( "pcbnew.InteractiveSelection.SelectOnSheet" )
  1804. .Scope( AS_GLOBAL )
  1805. .MenuText( _( "Sheet" ) )
  1806. .Tooltip( _( "Selects all footprints and tracks in the schematic sheet" ) )
  1807. .Icon( BITMAPS::select_same_sheet ) );
  1808. TOOL_ACTION PCB_ACTIONS::selectSameSheet( TOOL_ACTION_ARGS()
  1809. .Name( "pcbnew.InteractiveSelection.SelectSameSheet" )
  1810. .Scope( AS_GLOBAL )
  1811. .MenuText( _( "Items in Same Hierarchical Sheet" ) )
  1812. .Tooltip( _( "Selects all footprints and tracks in the same schematic sheet" ) )
  1813. .Icon( BITMAPS::select_same_sheet ) );
  1814. TOOL_ACTION PCB_ACTIONS::selectOnSchematic( TOOL_ACTION_ARGS()
  1815. .Name( "pcbnew.InteractiveSelection.SelectOnSchematic" )
  1816. .Scope( AS_GLOBAL )
  1817. .MenuText( _( "Select on Schematic" ) )
  1818. .Tooltip( _( "Selects corresponding items in Schematic editor" ) )
  1819. .Icon( BITMAPS::select_same_sheet ) );
  1820. TOOL_ACTION PCB_ACTIONS::filterSelection( TOOL_ACTION_ARGS()
  1821. .Name( "pcbnew.InteractiveSelection.FilterSelection" )
  1822. .Scope( AS_GLOBAL )
  1823. .MenuText( _( "Filter Selected Items..." ) )
  1824. .Tooltip( _( "Remove items from the selection by type" ) )
  1825. .Icon( BITMAPS::filter ) );
  1826. // ZONE_FILLER_TOOL
  1827. //
  1828. TOOL_ACTION PCB_ACTIONS::zoneFill( TOOL_ACTION_ARGS()
  1829. .Name( "pcbnew.ZoneFiller.zoneFill" )
  1830. .Scope( AS_GLOBAL )
  1831. .MenuText( _( "Draft Fill Selected Zone(s)" ) )
  1832. .Tooltip( _( "Update copper fill of selected zone(s) without regard to other interacting zones" ) )
  1833. .Icon( BITMAPS::fill_zone )
  1834. .Parameter<ZONE*>( nullptr ) );
  1835. TOOL_ACTION PCB_ACTIONS::zoneFillAll( TOOL_ACTION_ARGS()
  1836. .Name( "pcbnew.ZoneFiller.zoneFillAll" )
  1837. .Scope( AS_GLOBAL )
  1838. .DefaultHotkey( 'B' )
  1839. .LegacyHotkeyName( "Fill or Refill All Zones" )
  1840. .MenuText( _( "Fill All Zones" ) )
  1841. .Tooltip( _( "Update copper fill of all zones" ) )
  1842. .Icon( BITMAPS::fill_zone ) );
  1843. TOOL_ACTION PCB_ACTIONS::zoneFillDirty( TOOL_ACTION_ARGS()
  1844. .Name( "pcbnew.ZoneFiller.zoneFillDirty" )
  1845. .Scope( AS_CONTEXT ) );
  1846. TOOL_ACTION PCB_ACTIONS::zoneUnfill( TOOL_ACTION_ARGS()
  1847. .Name( "pcbnew.ZoneFiller.zoneUnfill" )
  1848. .Scope( AS_GLOBAL )
  1849. .MenuText( _( "Unfill Selected Zone(s)" ) )
  1850. .Tooltip( _( "Remove copper fill from selected zone(s)" ) )
  1851. .Icon( BITMAPS::zone_unfill ) );
  1852. TOOL_ACTION PCB_ACTIONS::zoneUnfillAll( TOOL_ACTION_ARGS()
  1853. .Name( "pcbnew.ZoneFiller.zoneUnfillAll" )
  1854. .Scope( AS_GLOBAL )
  1855. .DefaultHotkey( MD_CTRL + 'B' )
  1856. .LegacyHotkeyName( "Remove Filled Areas in All Zones" )
  1857. .MenuText( _( "Unfill All Zones" ) )
  1858. .Tooltip( _( "Remove copper fill from all zones" ) )
  1859. .Icon( BITMAPS::zone_unfill ) );
  1860. // AUTOPLACER_TOOL
  1861. //
  1862. TOOL_ACTION PCB_ACTIONS::autoplaceSelectedComponents( TOOL_ACTION_ARGS()
  1863. .Name( "pcbnew.Autoplacer.autoplaceSelected" )
  1864. .Scope( AS_GLOBAL )
  1865. .MenuText( _( "Place Selected Footprints" ) )
  1866. .Tooltip( _( "Performs automatic placement of selected components" ) ) );
  1867. TOOL_ACTION PCB_ACTIONS::autoplaceOffboardComponents( TOOL_ACTION_ARGS()
  1868. .Name( "pcbnew.Autoplacer.autoplaceOffboard" )
  1869. .Scope( AS_GLOBAL )
  1870. .MenuText( _( "Place Off-Board Footprints" ) )
  1871. .Tooltip( _( "Performs automatic placement of components outside board area" ) ) );
  1872. // ROUTER_TOOL
  1873. //
  1874. TOOL_ACTION PCB_ACTIONS::routeSingleTrack( TOOL_ACTION_ARGS()
  1875. .Name( "pcbnew.InteractiveRouter.SingleTrack" )
  1876. .Scope( AS_GLOBAL )
  1877. .DefaultHotkey( 'X' )
  1878. .LegacyHotkeyName( "Add New Track" )
  1879. .MenuText( _( "Route Single Track" ) )
  1880. .Tooltip( _( "Route tracks" ) )
  1881. .Icon( BITMAPS::add_tracks )
  1882. .Flags( AF_ACTIVATE )
  1883. .Parameter( PNS::PNS_MODE_ROUTE_SINGLE ) );
  1884. TOOL_ACTION PCB_ACTIONS::routeDiffPair( TOOL_ACTION_ARGS()
  1885. .Name( "pcbnew.InteractiveRouter.DiffPair" )
  1886. .Scope( AS_GLOBAL )
  1887. .DefaultHotkey( '6' )
  1888. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1889. .LegacyHotkeyName( "Route Differential Pair (Modern Toolset only)" )
  1890. .MenuText( _( "Route Differential Pair" ) )
  1891. .Tooltip( _( "Route differential pairs" ) )
  1892. .Icon( BITMAPS::ps_diff_pair )
  1893. .Flags( AF_ACTIVATE )
  1894. .Parameter( PNS::PNS_MODE_ROUTE_DIFF_PAIR ) );
  1895. TOOL_ACTION PCB_ACTIONS::routerSettingsDialog( TOOL_ACTION_ARGS()
  1896. .Name( "pcbnew.InteractiveRouter.SettingsDialog" )
  1897. .Scope( AS_GLOBAL )
  1898. .DefaultHotkey( MD_CTRL + '<' )
  1899. .LegacyHotkeyName( "Routing Options" )
  1900. .MenuText( _( "Interactive Router Settings..." ) )
  1901. .Tooltip( _( "Open Interactive Router settings" ) )
  1902. .Icon( BITMAPS::tools ) );
  1903. TOOL_ACTION PCB_ACTIONS::routerDiffPairDialog( TOOL_ACTION_ARGS()
  1904. .Name( "pcbnew.InteractiveRouter.DiffPairDialog" )
  1905. .Scope( AS_GLOBAL )
  1906. .MenuText( _( "Differential Pair Dimensions..." ) )
  1907. .Tooltip( _( "Open Differential Pair Dimension settings" ) )
  1908. .Icon( BITMAPS::ps_diff_pair_gap ) );
  1909. TOOL_ACTION PCB_ACTIONS::routerHighlightMode( TOOL_ACTION_ARGS()
  1910. .Name( "pcbnew.InteractiveRouter.HighlightMode" )
  1911. .Scope( AS_GLOBAL )
  1912. .MenuText( _( "Router Highlight Mode" ) )
  1913. .Tooltip( _( "Switch router to highlight mode" ) )
  1914. .Flags( AF_NONE )
  1915. .Parameter( PNS::RM_MarkObstacles ) );
  1916. TOOL_ACTION PCB_ACTIONS::routerShoveMode( TOOL_ACTION_ARGS()
  1917. .Name( "pcbnew.InteractiveRouter.ShoveMode" )
  1918. .Scope( AS_GLOBAL )
  1919. .MenuText( _( "Router Shove Mode" ) )
  1920. .Tooltip( _( "Switch router to shove mode" ) )
  1921. .Flags( AF_NONE )
  1922. .Parameter( PNS::RM_Shove ) );
  1923. TOOL_ACTION PCB_ACTIONS::routerWalkaroundMode( TOOL_ACTION_ARGS()
  1924. .Name( "pcbnew.InteractiveRouter.WalkaroundMode" )
  1925. .Scope( AS_GLOBAL )
  1926. .MenuText( _( "Router Walkaround Mode" ) )
  1927. .Tooltip( _( "Switch router to walkaround mode" ) )
  1928. .Flags( AF_NONE )
  1929. .Parameter( PNS::RM_Walkaround ) );
  1930. TOOL_ACTION PCB_ACTIONS::cycleRouterMode( TOOL_ACTION_ARGS()
  1931. .Name( "pcbnew.InteractiveRouter.CycleRouterMode" )
  1932. .Scope( AS_GLOBAL )
  1933. .MenuText( _( "Cycle Router Mode" ) )
  1934. .Tooltip( _( "Cycle router to the next mode" ) ) );
  1935. TOOL_ACTION PCB_ACTIONS::selectLayerPair( TOOL_ACTION_ARGS()
  1936. .Name( "pcbnew.InteractiveRouter.SelectLayerPair" )
  1937. .Scope( AS_GLOBAL )
  1938. .MenuText( _( "Set Layer Pair..." ) )
  1939. .Tooltip( _( "Change active layer pair for routing" ) )
  1940. .Icon( BITMAPS::select_layer_pair )
  1941. .Flags( AF_ACTIVATE ) );
  1942. TOOL_ACTION PCB_ACTIONS::routerTuneSingleTrace( TOOL_ACTION_ARGS()
  1943. .Name( "pcbnew.LengthTuner.TuneSingleTrack" )
  1944. .Scope( AS_GLOBAL )
  1945. .DefaultHotkey( '7' )
  1946. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1947. .LegacyHotkeyName( "Tune Single Track (Modern Toolset only)" )
  1948. .MenuText( _( "Tune length of a single track" ) )
  1949. .Tooltip( _( "Tune length of a single track" ) )
  1950. .Icon( BITMAPS::ps_tune_length )
  1951. .Flags( AF_ACTIVATE )
  1952. .Parameter( PNS::PNS_MODE_TUNE_SINGLE ) );
  1953. TOOL_ACTION PCB_ACTIONS::routerTuneDiffPair( TOOL_ACTION_ARGS()
  1954. .Name( "pcbnew.LengthTuner.TuneDiffPair" )
  1955. .Scope( AS_GLOBAL )
  1956. .DefaultHotkey( '8' )
  1957. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1958. .LegacyHotkeyName( "Tune Differential Pair Length (Modern Toolset only)" )
  1959. .MenuText( _( "Tune length of a differential pair" ) )
  1960. .Tooltip( _( "Tune length of a differential pair" ) )
  1961. .Icon( BITMAPS::ps_diff_pair_tune_length )
  1962. .Flags( AF_ACTIVATE )
  1963. .Parameter( PNS::PNS_MODE_TUNE_DIFF_PAIR ) );
  1964. TOOL_ACTION PCB_ACTIONS::routerTuneDiffPairSkew( TOOL_ACTION_ARGS()
  1965. .Name( "pcbnew.LengthTuner.TuneDiffPairSkew" )
  1966. .Scope( AS_GLOBAL )
  1967. .DefaultHotkey( '9' )
  1968. // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
  1969. .LegacyHotkeyName( "Tune Differential Pair Skew (Modern Toolset only)" )
  1970. .MenuText( _( "Tune skew of a differential pair" ) )
  1971. .Tooltip( _( "Tune skew of a differential pair" ) )
  1972. .Icon( BITMAPS::ps_diff_pair_tune_phase )
  1973. .Flags( AF_ACTIVATE )
  1974. .Parameter( PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW ) );
  1975. TOOL_ACTION PCB_ACTIONS::routerInlineDrag( TOOL_ACTION_ARGS()
  1976. .Name( "pcbnew.InteractiveRouter.InlineDrag" )
  1977. .Scope( AS_CONTEXT )
  1978. .Parameter<int>( PNS::DM_ANY ) );
  1979. TOOL_ACTION PCB_ACTIONS::routerUndoLastSegment( TOOL_ACTION_ARGS()
  1980. .Name( "pcbnew.InteractiveRouter.UndoLastSegment" )
  1981. .Scope( AS_CONTEXT )
  1982. .DefaultHotkey( WXK_BACK )
  1983. .MenuText( _( "Undo Last Segment" ) )
  1984. .Tooltip( _( "Walks the current track back one segment." ) ) );
  1985. TOOL_ACTION PCB_ACTIONS::routerContinueFromEnd( TOOL_ACTION_ARGS()
  1986. .Name( "pcbnew.InteractiveRouter.ContinueFromEnd" )
  1987. .Scope( AS_CONTEXT )
  1988. .DefaultHotkey( 'E' )
  1989. .MenuText( _( "Route From Other End" ) )
  1990. .Tooltip( _( "Commits current segments and starts next segment from nearest ratsnest end." ) ) );
  1991. TOOL_ACTION PCB_ACTIONS::routerAttemptFinish( TOOL_ACTION_ARGS()
  1992. .Name( "pcbnew.InteractiveRouter.AttemptFinish" )
  1993. .Scope( AS_CONTEXT )
  1994. .DefaultHotkey( 'F' )
  1995. .MenuText( _( "Attempt Finish" ) )
  1996. .Tooltip( _( "Attempts to complete current route to nearest ratsnest end." ) )
  1997. .Parameter<bool*>( nullptr ) );
  1998. TOOL_ACTION PCB_ACTIONS::routerRouteSelected( TOOL_ACTION_ARGS()
  1999. .Name( "pcbnew.InteractiveRouter.RouteSelected" )
  2000. .Scope( AS_GLOBAL )
  2001. .DefaultHotkey( MD_SHIFT + 'X' )
  2002. .MenuText( _( "Route Selected" ) )
  2003. .Tooltip( _( "Sequentially route selected items from ratsnest anchor." ) )
  2004. .Flags( AF_ACTIVATE )
  2005. .Parameter( PNS::PNS_MODE_ROUTE_SINGLE ) );
  2006. TOOL_ACTION PCB_ACTIONS::routerRouteSelectedFromEnd( TOOL_ACTION_ARGS()
  2007. .Name( "pcbnew.InteractiveRouter.RouteSelectedFromEnd" )
  2008. .Scope( AS_GLOBAL )
  2009. .DefaultHotkey( MD_SHIFT + 'E' )
  2010. .MenuText( _( "Route Selected From Other End" ) )
  2011. .Tooltip( _( "Sequentially route selected items from other end of ratsnest anchor." ) )
  2012. .Flags( AF_ACTIVATE )
  2013. .Parameter( PNS::PNS_MODE_ROUTE_SINGLE ) );
  2014. TOOL_ACTION PCB_ACTIONS::routerAutorouteSelected( TOOL_ACTION_ARGS()
  2015. .Name( "pcbnew.InteractiveRouter.Autoroute" )
  2016. .Scope( AS_GLOBAL )
  2017. .DefaultHotkey( MD_SHIFT + 'F' )
  2018. .MenuText( _( "Attempt Finish Selected (Autoroute)" ) )
  2019. .Tooltip( _( "Sequentially attempt to automatically route all selected pads." ) )
  2020. .Flags( AF_ACTIVATE )
  2021. .Parameter( PNS::PNS_MODE_ROUTE_SINGLE ) );
  2022. TOOL_ACTION PCB_ACTIONS::breakTrack( TOOL_ACTION_ARGS()
  2023. .Name( "pcbnew.InteractiveRouter.BreakTrack" )
  2024. .Scope( AS_GLOBAL )
  2025. .MenuText( _( "Break Track" ) )
  2026. .Tooltip( _( "Splits the track segment into two segments connected at the cursor position." ) )
  2027. .Icon( BITMAPS::break_line ) );
  2028. TOOL_ACTION PCB_ACTIONS::drag45Degree( TOOL_ACTION_ARGS()
  2029. .Name( "pcbnew.InteractiveRouter.Drag45Degree" )
  2030. .Scope( AS_GLOBAL )
  2031. .DefaultHotkey( 'D' )
  2032. .LegacyHotkeyName( "Drag Track Keep Slope" )
  2033. .MenuText( _( "Drag (45 degree mode)" ) )
  2034. .Tooltip( _( "Drags the track segment while keeping connected tracks at 45 degrees." ) )
  2035. .Icon( BITMAPS::drag_segment_withslope ) );
  2036. TOOL_ACTION PCB_ACTIONS::dragFreeAngle( TOOL_ACTION_ARGS()
  2037. .Name( "pcbnew.InteractiveRouter.DragFreeAngle" )
  2038. .Scope( AS_GLOBAL )
  2039. .DefaultHotkey( 'G' )
  2040. .LegacyHotkeyName( "Drag Item" )
  2041. .MenuText( _( "Drag (free angle)" ) )
  2042. .Tooltip( _( "Drags the nearest joint in the track without restricting the track angle." ) )
  2043. .Icon( BITMAPS::drag ) );
  2044. // LENGTH_TUNER_TOOL
  2045. //
  2046. TOOL_ACTION PCB_ACTIONS::ddAppendBoard( TOOL_ACTION_ARGS()
  2047. .Name( "pcbnew.Control.DdAppendBoard" )
  2048. .Scope( AS_GLOBAL ) );
  2049. TOOL_ACTION PCB_ACTIONS::ddImportFootprint( TOOL_ACTION_ARGS()
  2050. .Name( "pcbnew.Control.ddImportFootprint" )
  2051. .Scope( AS_GLOBAL ) );
  2052. const TOOL_EVENT PCB_EVENTS::SnappingModeChangedByKeyEvent( TC_MESSAGE, TA_ACTION,
  2053. "common.Interactive.snappingModeChangedByKey" );