KiCad PCB EDA Suite
actions.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2019 CERN
5  * Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #include <bitmaps.h>
26 #include <common.h>
27 #include <eda_units.h>
28 #include <frame_type.h>
29 #include <tool/actions.h>
30 
31 // Actions, being statically-defined, require specialized I18N handling. We continue to
32 // use the _() macro so that string harvesting by the I18N framework doesn't have to be
33 // specialized, but we don't translate on initialization and instead do it in the getters.
34 
35 #undef _
36 #define _(s) s
37 
38 TOOL_ACTION ACTIONS::doNew( "common.Control.new",
39  AS_GLOBAL,
40  MD_CTRL + 'N', LEGACY_HK_NAME( "New" ),
41  _( "New..." ), _( "Create a new document in the editor" ),
43 
44 TOOL_ACTION ACTIONS::newLibrary( "common.Control.newLibrary",
45  AS_GLOBAL,
46  0, "",
47  _( "New Library..." ), _( "Create a new library folder" ),
49 
50 TOOL_ACTION ACTIONS::addLibrary( "common.Control.addLibrary",
51  AS_GLOBAL,
52  0, "",
53  _( "Add Library..." ), _( "Add an existing library folder" ),
55 
56 TOOL_ACTION ACTIONS::open( "common.Control.open",
57  AS_GLOBAL,
58  MD_CTRL + 'O', LEGACY_HK_NAME( "Open" ),
59  _( "Open..." ), _( "Open existing document" ),
61 
62 TOOL_ACTION ACTIONS::save( "common.Control.save",
63  AS_GLOBAL,
64  MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
65  _( "Save" ), _( "Save changes" ),
66  BITMAPS::save );
67 
68 TOOL_ACTION ACTIONS::saveAs( "common.Control.saveAs",
69  AS_GLOBAL,
70  MD_SHIFT + MD_CTRL + 'S', LEGACY_HK_NAME( "Save As" ),
71  _( "Save As..." ), _( "Save current document to another location" ),
73 
74 TOOL_ACTION ACTIONS::saveCopyAs( "common.Control.saveCopyAs",
75  AS_GLOBAL,
76  0, "",
77  _( "Save Copy As..." ), _( "Save a copy of the current document to another location" ),
79 
80 TOOL_ACTION ACTIONS::saveAll( "common.Control.saveAll",
81  AS_GLOBAL,
82  0, "",
83  _( "Save All" ), _( "Save all changes" ),
84  BITMAPS::save );
85 
86 TOOL_ACTION ACTIONS::revert( "common.Control.revert",
87  AS_GLOBAL,
88  0, "",
89  _( "Revert" ), _( "Throw away changes" ),
90  BITMAPS::undo );
91 
92 TOOL_ACTION ACTIONS::pageSettings( "common.Control.pageSettings",
93  AS_GLOBAL,
94  0, "",
95  _( "Page Settings..." ), _( "Settings for paper size and title block info" ),
97 
98 TOOL_ACTION ACTIONS::print( "common.Control.print",
99  AS_GLOBAL,
100  MD_CTRL + 'P', LEGACY_HK_NAME( "Print" ),
101  _( "Print..." ), _( "Print" ),
103 
104 TOOL_ACTION ACTIONS::plot( "common.Control.plot",
105  AS_GLOBAL,
106  0, "",
107  _( "Plot..." ), _( "Plot" ),
108  BITMAPS::plot );
109 
110 TOOL_ACTION ACTIONS::quit( "common.Control.quit",
111  AS_GLOBAL,
112  0, "", // Not currently in use due to wxWidgets crankiness
113  _( "Quit" ), _( "Close the current editor" ),
114  BITMAPS::exit );
115 
116 // Generic Edit Actions
117 TOOL_ACTION ACTIONS::cancelInteractive( "common.Interactive.cancel",
118  AS_GLOBAL,
119  0, "", // ESC key is handled in the dispatcher
120  _( "Cancel" ), _( "Cancel current tool" ),
122 
123 TOOL_ACTION ACTIONS::showContextMenu( "common.Control.showContextMenu",
124  AS_GLOBAL,
125  0, "",
126  _( "Show Context Menu" ), _( "Perform the right-mouse-button action" ),
127  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_RIGHT_CLICK );
128 
129 TOOL_ACTION ACTIONS::updateMenu( "common.Interactive.updateMenu",
130  AS_GLOBAL );
131 
132 TOOL_ACTION ACTIONS::undo( "common.Interactive.undo",
133  AS_GLOBAL,
134  MD_CTRL + 'Z', LEGACY_HK_NAME( "Undo" ),
135  _( "Undo" ), _( "Undo last edit" ),
136  BITMAPS::undo );
137 
138 TOOL_ACTION ACTIONS::redo( "common.Interactive.redo",
139  AS_GLOBAL,
140 #if defined( __WXMAC__ )
141  MD_SHIFT + MD_CTRL + 'Z',
142 #else
143  MD_CTRL + 'Y',
144 #endif
145  LEGACY_HK_NAME( "Redo" ),
146  _( "Redo" ), _( "Redo last edit" ),
147  BITMAPS::redo );
148 
149 TOOL_ACTION ACTIONS::cut( "common.Interactive.cut",
150  AS_GLOBAL,
151  MD_CTRL + 'X', LEGACY_HK_NAME( "Cut" ),
152  _( "Cut" ), _( "Cut selected item(s) to clipboard" ),
153  BITMAPS::cut );
154 
155 TOOL_ACTION ACTIONS::copy( "common.Interactive.copy",
156  AS_GLOBAL,
157  MD_CTRL + 'C', LEGACY_HK_NAME( "Copy" ),
158  _( "Copy" ), _( "Copy selected item(s) to clipboard" ),
159  BITMAPS::copy );
160 
161 TOOL_ACTION ACTIONS::paste( "common.Interactive.paste",
162  AS_GLOBAL,
163  MD_CTRL + 'V', LEGACY_HK_NAME( "Paste" ),
164  _( "Paste" ), _( "Paste items(s) from clipboard" ),
165  BITMAPS::paste );
166 
167 TOOL_ACTION ACTIONS::selectAll( "common.Interactive.selectAll",
168  AS_GLOBAL,
169  MD_CTRL + 'A', "",
170  _( "Select All" ), _( "Select all items on screen" ) );
171 
172 TOOL_ACTION ACTIONS::pasteSpecial( "common.Interactive.pasteSpecial",
173  AS_GLOBAL, 0, "",
174  _( "Paste Special..." ), _( "Paste item(s) from clipboard with options" ) );
175 
176 TOOL_ACTION ACTIONS::duplicate( "common.Interactive.duplicate",
177  AS_GLOBAL,
178  MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate" ),
179  _( "Duplicate" ), _( "Duplicates the selected item(s)" ),
181 
182 TOOL_ACTION ACTIONS::doDelete( "common.Interactive.delete",
183  AS_GLOBAL,
184 #if defined( __WXMAC__ )
185  WXK_BACK,
186 #else
187  WXK_DELETE,
188 #endif
189  LEGACY_HK_NAME( "Delete Item" ),
190  _( "Delete" ), _( "Deletes selected item(s)" ),
191  BITMAPS::trash );
192 
193 TOOL_ACTION ACTIONS::deleteTool( "common.Interactive.deleteTool",
194  AS_GLOBAL, 0, "",
195  _( "Interactive Delete Tool" ), _( "Delete clicked items" ),
197 
198 TOOL_ACTION ACTIONS::activatePointEditor( "common.Control.activatePointEditor",
199  AS_GLOBAL );
200 
201 TOOL_ACTION ACTIONS::changeEditMethod( "common.Interactive.changeEditMethod", AS_GLOBAL,
202  MD_CTRL + ' ', "", _( "Change Edit Method" ), _( "Change edit method constraints" ) );
203 
204 TOOL_ACTION ACTIONS::find( "common.Interactive.find",
205  AS_GLOBAL,
206  MD_CTRL + 'F', LEGACY_HK_NAME( "Find" ),
207  _( "Find" ), _( "Find text" ),
208  BITMAPS::find );
209 
210 TOOL_ACTION ACTIONS::findAndReplace( "common.Interactive.findAndReplace",
211  AS_GLOBAL,
212  MD_CTRL + MD_ALT + 'F', LEGACY_HK_NAME( "Find and Replace" ),
213  _( "Find and Replace" ), _( "Find and replace text" ),
215 
216 TOOL_ACTION ACTIONS::findNext( "common.Interactive.findNext",
217  AS_GLOBAL,
218  WXK_F3, LEGACY_HK_NAME( "Find Next" ),
219  _( "Find Next" ), _( "Find next match" ),
220  BITMAPS::find );
221 
222 TOOL_ACTION ACTIONS::findNextMarker( "common.Interactive.findNextMarker",
223  AS_GLOBAL,
224  MD_SHIFT + WXK_F3, LEGACY_HK_NAME( "Find Next Marker" ),
225  _( "Find Next Marker" ), "",
226  BITMAPS::find );
227 
228 TOOL_ACTION ACTIONS::replaceAndFindNext( "common.Interactive.replaceAndFindNext",
229  AS_GLOBAL,
230  0, "",
231  _( "Replace and Find Next" ), _( "Replace current match and find next" ),
233 
234 TOOL_ACTION ACTIONS::replaceAll( "common.Interactive.replaceAll",
235  AS_GLOBAL,
236  0, "",
237  _( "Replace All" ), _( "Replace all matches" ),
239 
240 TOOL_ACTION ACTIONS::updateFind( "common.Control.updateFind",
241  AS_GLOBAL );
242 
243 
244 // Marker Controls
245 TOOL_ACTION ACTIONS::prevMarker( "common.Checker.prevMarker",
246  AS_GLOBAL,
247  0, "",
248  _( "Previous Marker" ), _( "Go to previous marker in Checker window" ) );
249 
250 TOOL_ACTION ACTIONS::nextMarker( "common.Checker.nextMarker",
251  AS_GLOBAL,
252  0, "",
253  _( "Next Marker" ), _( "Go to next marker in Checker window" ) );
254 
255 TOOL_ACTION ACTIONS::excludeMarker( "common.Checker.excludeMarker",
256  AS_GLOBAL,
257  0, "",
258  _( "Exclude Marker" ), _( "Mark current violation in Checker window as an exclusion" ) );
259 
260 // View Controls
261 TOOL_ACTION ACTIONS::zoomRedraw( "common.Control.zoomRedraw",
262  AS_GLOBAL,
263 #if defined( __WXMAC__ )
264  MD_CTRL + 'R',
265 #else
266  WXK_F5,
267 #endif
268  LEGACY_HK_NAME( "Zoom Redraw" ),
269  _( "Refresh" ), _( "Refresh" ),
271 
272 TOOL_ACTION ACTIONS::zoomFitScreen( "common.Control.zoomFitScreen",
273  AS_GLOBAL,
274 #if defined( __WXMAC__ )
275  MD_CTRL + '0',
276 #else
277  WXK_HOME,
278 #endif
279  LEGACY_HK_NAME( "Zoom Auto" ),
280  _( "Zoom to Fit" ), _( "Zoom to Fit" ),
282 
283 TOOL_ACTION ACTIONS::zoomFitObjects( "common.Control.zoomFitObjects",
284  AS_GLOBAL, MD_CTRL + WXK_HOME, "",
285  _( "Zoom to Objects" ), _( "Zoom to Objects" ),
287 
288 TOOL_ACTION ACTIONS::zoomIn( "common.Control.zoomIn",
289  AS_GLOBAL,
290 #if defined( __WXMAC__ )
291  MD_CTRL + '+',
292 #else
293  WXK_F1,
294 #endif
295  LEGACY_HK_NAME( "Zoom In" ),
296  _( "Zoom In at Cursor" ), _( "Zoom In at Cursor" ),
298 
299 TOOL_ACTION ACTIONS::zoomOut( "common.Control.zoomOut",
300  AS_GLOBAL,
301 #if defined( __WXMAC__ )
302  MD_CTRL + '-',
303 #else
304  WXK_F2,
305 #endif
306  LEGACY_HK_NAME( "Zoom Out" ),
307  _( "Zoom Out at Cursor" ), _( "Zoom Out at Cursor" ),
309 
310 TOOL_ACTION ACTIONS::zoomInCenter( "common.Control.zoomInCenter",
311  AS_GLOBAL,
312  0, "",
313  _( "Zoom In" ), _( "Zoom In" ),
315 
316 TOOL_ACTION ACTIONS::zoomOutCenter( "common.Control.zoomOutCenter",
317  AS_GLOBAL,
318  0, "",
319  _( "Zoom Out" ), _( "Zoom Out" ),
321 
322 TOOL_ACTION ACTIONS::zoomCenter( "common.Control.zoomCenter",
323  AS_GLOBAL,
324  WXK_F4, LEGACY_HK_NAME( "Zoom Center" ),
325  _( "Center" ), _( "Center" ),
327 
328 TOOL_ACTION ACTIONS::zoomTool( "common.Control.zoomTool",
329  AS_GLOBAL,
330  MD_CTRL + WXK_F5, LEGACY_HK_NAME( "Zoom to Selection" ),
331  _( "Zoom to Selection" ), _( "Zoom to Selection" ),
333 
334 TOOL_ACTION ACTIONS::zoomPreset( "common.Control.zoomPreset",
335  AS_GLOBAL );
336 
337 TOOL_ACTION ACTIONS::centerContents( "common.Control.centerContents",
338  AS_GLOBAL );
339 
340 // Cursor control
341 TOOL_ACTION ACTIONS::cursorUp( "common.Control.cursorUp",
342  AS_GLOBAL,
343  WXK_UP, "",
344  _( "Cursor Up" ), "",
345  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_UP );
346 
347 TOOL_ACTION ACTIONS::cursorDown( "common.Control.cursorDown",
348  AS_GLOBAL,
349  WXK_DOWN, "",
350  _( "Cursor Down" ), "" ,
351  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_DOWN );
352 
353 TOOL_ACTION ACTIONS::cursorLeft( "common.Control.cursorLeft",
354  AS_GLOBAL,
355  WXK_LEFT, "",
356  _( "Cursor Left" ), "" ,
357  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_LEFT );
358 
359 TOOL_ACTION ACTIONS::cursorRight( "common.Control.cursorRight",
360  AS_GLOBAL,
361  WXK_RIGHT, "",
362  _( "Cursor Right" ), "" ,
363  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_RIGHT );
364 
365 
366 TOOL_ACTION ACTIONS::cursorUpFast( "common.Control.cursorUpFast",
367  AS_GLOBAL,
368  MD_CTRL + WXK_UP, "",
369  _( "Cursor Up Fast" ), "",
370  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) ( CURSOR_UP | CURSOR_FAST_MOVE ) );
371 
372 TOOL_ACTION ACTIONS::cursorDownFast( "common.Control.cursorDownFast",
373  AS_GLOBAL,
374  MD_CTRL + WXK_DOWN, "",
375  _( "Cursor Down Fast" ), "" ,
376  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) ( CURSOR_DOWN | CURSOR_FAST_MOVE ) );
377 
378 TOOL_ACTION ACTIONS::cursorLeftFast( "common.Control.cursorLeftFast",
379  AS_GLOBAL,
380  MD_CTRL + WXK_LEFT, "",
381  _( "Cursor Left Fast" ), "" ,
382  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) ( CURSOR_LEFT | CURSOR_FAST_MOVE ) );
383 
384 TOOL_ACTION ACTIONS::cursorRightFast( "common.Control.cursorRightFast",
385  AS_GLOBAL,
386  MD_CTRL + WXK_RIGHT, "",
387  _( "Cursor Right Fast" ), "" ,
388  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) ( CURSOR_RIGHT | CURSOR_FAST_MOVE ) );
389 
390 TOOL_ACTION ACTIONS::cursorClick( "common.Control.cursorClick",
391  AS_GLOBAL,
392  WXK_RETURN, LEGACY_HK_NAME( "Mouse Left Click" ),
393  _( "Click" ), _( "Performs left mouse button click" ),
394  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_CLICK );
395 
396 TOOL_ACTION ACTIONS::cursorDblClick( "common.Control.cursorDblClick",
397  AS_GLOBAL,
398  WXK_END, LEGACY_HK_NAME( "Mouse Left Double Click" ),
399  _( "Double-click" ), _( "Performs left mouse button double-click" ),
400  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_DBL_CLICK );
401 
402 TOOL_ACTION ACTIONS::refreshPreview( "common.Control.refreshPreview",
403  AS_GLOBAL );
404 
405 TOOL_ACTION ACTIONS::pinLibrary( "common.Control.pinLibrary", AS_GLOBAL, 0, "", _( "Pin Library" ),
406  _( "Keep the library at the top of the list" ) );
407 
408 TOOL_ACTION ACTIONS::unpinLibrary( "common.Control.unpinLibrary", AS_GLOBAL, 0, "",
409  _( "Unpin Library" ),
410  _( "No longer keep the library at the top of the list" ) );
411 
412 TOOL_ACTION ACTIONS::panUp( "common.Control.panUp",
413  AS_GLOBAL,
414  MD_SHIFT + WXK_UP, "",
415  _( "Pan Up" ), "",
416  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_UP );
417 
418 TOOL_ACTION ACTIONS::panDown( "common.Control.panDown",
419  AS_GLOBAL,
420  MD_SHIFT + WXK_DOWN, "",
421  _( "Pan Down" ), "" ,
422  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_DOWN );
423 
424 TOOL_ACTION ACTIONS::panLeft( "common.Control.panLeft",
425  AS_GLOBAL,
426  MD_SHIFT + WXK_LEFT, "",
427  _( "Pan Left" ), "" ,
428  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_LEFT );
429 
430 TOOL_ACTION ACTIONS::panRight( "common.Control.panRight",
431  AS_GLOBAL,
432  MD_SHIFT + WXK_RIGHT, "",
433  _( "Pan Right" ), "" ,
434  BITMAPS::INVALID_BITMAP, AF_NONE, (void*) CURSOR_RIGHT );
435 
436 // Grid control
437 TOOL_ACTION ACTIONS::gridFast1( "common.Control.gridFast1",
438  AS_GLOBAL,
439  MD_ALT + '1', LEGACY_HK_NAME( "Switch Grid To Fast Grid1" ),
440  _( "Switch to Fast Grid 1" ), "" );
441 
442 TOOL_ACTION ACTIONS::gridFast2( "common.Control.gridFast2",
443  AS_GLOBAL,
444  MD_ALT + '2', LEGACY_HK_NAME( "Switch Grid To Fast Grid2" ),
445  _( "Switch to Fast Grid 2" ), "" );
446 
447 TOOL_ACTION ACTIONS::gridNext( "common.Control.gridNext",
448  AS_GLOBAL,
449  'N', LEGACY_HK_NAME( "Switch Grid To Next" ),
450  _("Switch to Next Grid" ), "" );
451 
452 TOOL_ACTION ACTIONS::gridPrev( "common.Control.gridPrev",
453  AS_GLOBAL, MD_SHIFT + 'N', LEGACY_HK_NAME( "Switch Grid To Previous" ),
454  _( "Switch to Previous Grid" ), "" );
455 
456 TOOL_ACTION ACTIONS::gridSetOrigin( "common.Control.gridSetOrigin",
457  AS_GLOBAL,
458  'S', LEGACY_HK_NAME( "Set Grid Origin" ),
459  _( "Grid Origin" ), _( "Set the grid origin point" ),
461 
462 TOOL_ACTION ACTIONS::gridResetOrigin( "common.Control.gridResetOrigin",
463  AS_GLOBAL,
464  'Z', LEGACY_HK_NAME( "Reset Grid Origin" ),
465  _( "Reset Grid Origin" ), "" );
466 
467 TOOL_ACTION ACTIONS::gridPreset( "common.Control.gridPreset",
468  AS_GLOBAL );
469 
470 TOOL_ACTION ACTIONS::toggleGrid( "common.Control.toggleGrid",
471  AS_GLOBAL, 0, "",
472  _( "Show Grid" ), _( "Display grid dots or lines in the edit window" ),
473  BITMAPS::grid );
474 
475 TOOL_ACTION ACTIONS::gridProperties( "common.Control.gridProperties",
476  AS_GLOBAL, 0, "",
477  _( "Grid Properties..." ), _( "Set grid dimensions" ),
479 
480 TOOL_ACTION ACTIONS::inchesUnits( "common.Control.imperialUnits",
481  AS_GLOBAL, 0, "",
482  _( "Inches" ), _( "Use inches" ),
484 
485 TOOL_ACTION ACTIONS::milsUnits( "common.Control.mils",
486  AS_GLOBAL, 0, "",
487  _( "Mils" ), _( "Use mils" ),
489 
490 TOOL_ACTION ACTIONS::millimetersUnits( "common.Control.metricUnits",
491  AS_GLOBAL, 0, "",
492  _( "Millimeters" ), _( "Use millimeters" ),
494 
495 TOOL_ACTION ACTIONS::updateUnits( "common.Control.updateUnits",
496  AS_GLOBAL );
497 
498 TOOL_ACTION ACTIONS::toggleUnits( "common.Control.toggleUnits",
499  AS_GLOBAL,
500  MD_CTRL + 'U', LEGACY_HK_NAME( "Switch Units" ),
501  _( "Switch units" ), _( "Switch between imperial and metric units" ),
503 
504 TOOL_ACTION ACTIONS::togglePolarCoords( "common.Control.togglePolarCoords",
505  AS_GLOBAL, 0, "",
506  _( "Polar Coordinates" ), _( "Switch between polar and cartesian coordinate systems" ),
508 
509 TOOL_ACTION ACTIONS::resetLocalCoords( "common.Control.resetLocalCoords",
510  AS_GLOBAL,
511  ' ', LEGACY_HK_NAME( "Reset Local Coordinates" ),
512  _( "Reset Local Coordinates" ), "" );
513 
514 TOOL_ACTION ACTIONS::toggleCursor( "common.Control.toggleCursor",
515  AS_GLOBAL,
516  // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
517  MD_CTRL + MD_SHIFT + 'X', LEGACY_HK_NAME( "Toggle Cursor Display (Modern Toolset only)" ),
518  _( "Always Show Cursor" ), _( "Display crosshairs even in selection tool" ),
519  BITMAPS::cursor );
520 
521 TOOL_ACTION ACTIONS::toggleCursorStyle( "common.Control.toggleCursorStyle",
522  AS_GLOBAL, 0, "",
523  _( "Full-Window Crosshairs" ), _( "Switch display of full-window crosshairs" ),
525 
526 TOOL_ACTION ACTIONS::highContrastMode( "common.Control.highContrastMode",
527  AS_GLOBAL, 0, LEGACY_HK_NAME( "Toggle High Contrast Mode" ),
528  _( "Single Layer View Mode" ), _( "Toggle inactive layers between normal and dimmed" ),
530 
531 TOOL_ACTION ACTIONS::highContrastModeCycle( "common.Control.highContrastModeCycle",
532  AS_GLOBAL, MD_CTRL + 'H', "", _( "Single Layer View Mode (3-state)" ),
533  _( "Toggle inactive layers between normal, dimmed, and hidden" ), BITMAPS::contrast_mode );
534 
535 TOOL_ACTION ACTIONS::selectionTool( "common.InteractiveSelection.selectionTool",
536  AS_GLOBAL, 0, "",
537  _( "Select item(s)" ), "",
539 
540 TOOL_ACTION ACTIONS::measureTool( "common.InteractiveEdit.measureTool",
541  AS_GLOBAL,
542  // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
543  MD_CTRL + MD_SHIFT + 'M', LEGACY_HK_NAME( "Measure Distance (Modern Toolset only)" ),
544  _( "Measure Tool" ), _( "Interactively measure distance between points" ),
546 
547 TOOL_ACTION ACTIONS::pickerTool( "common.InteractivePicker.pickerTool",
548  AS_GLOBAL, 0, "", "", "", BITMAPS::INVALID_BITMAP, AF_ACTIVATE );
549 
550 TOOL_ACTION ACTIONS::show3DViewer( "common.Control.show3DViewer",
551  AS_GLOBAL,
552  MD_ALT + '3', LEGACY_HK_NAME( "3D Viewer" ),
553  _( "3D Viewer" ), _( "Show 3D viewer window" ),
555 
556 TOOL_ACTION ACTIONS::showSymbolBrowser( "common.Control.showSymbolBrowser",
557  AS_GLOBAL, 0, "",
558  _( "Symbol Library Browser" ), _( "Browse symbol libraries" ),
560 
561 TOOL_ACTION ACTIONS::showSymbolEditor( "common.Control.showSymbolEditor",
562  AS_GLOBAL, 0, "",
563  _( "Symbol Editor" ), _( "Create, delete and edit symbols" ),
565 
566 TOOL_ACTION ACTIONS::showFootprintBrowser( "common.Control.showFootprintBrowser",
567  AS_GLOBAL, 0, "",
568  _( "Footprint Library Browser" ), _( "Browse footprint libraries" ),
570 
571 TOOL_ACTION ACTIONS::showFootprintEditor( "common.Control.showFootprintEditor",
572  AS_GLOBAL, 0, "",
573  _( "Footprint Editor" ), _( "Create, delete and edit footprints" ),
575 
576 TOOL_ACTION ACTIONS::updatePcbFromSchematic( "common.Control.updatePcbFromSchematic",
577  AS_GLOBAL,
578  WXK_F8, LEGACY_HK_NAME( "Update PCB from Schematic" ),
579  _( "Update PCB from Schematic..." ), _( "Update PCB with changes made to schematic" ),
581 
582 TOOL_ACTION ACTIONS::updateSchematicFromPcb( "common.Control.updateSchematicFromPCB",
583  AS_GLOBAL, 0, "",
584  _( "Update Schematic from PCB..." ), _( "Update schematic with changes made to PCB" ),
586 
587 TOOL_ACTION ACTIONS::configurePaths( "common.SuiteControl.configurePaths",
588  AS_GLOBAL, 0, "",
589  _( "Configure Paths..." ), _( "Edit path configuration environment variables" ),
590  BITMAPS::path );
591 
592 TOOL_ACTION ACTIONS::showSymbolLibTable( "common.SuiteControl.showSymbolLibTable",
593  AS_GLOBAL, 0, "",
594  _( "Manage Symbol Libraries..." ),
595  _( "Edit the global and project symbol library lists" ),
597 
598 TOOL_ACTION ACTIONS::showFootprintLibTable( "common.SuiteControl.showFootprintLibTable",
599  AS_GLOBAL, 0, "",
600  _( "Manage Footprint Libraries..." ),
601  _( "Edit the global and project footprint library lists" ),
603 
604 TOOL_ACTION ACTIONS::gettingStarted( "common.SuiteControl.gettingStarted",
605  AS_GLOBAL, 0, "",
606  _( "Getting Started with KiCad" ),
607  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
608  BITMAPS::help );
609 
610 TOOL_ACTION ACTIONS::help( "common.SuiteControl.help",
611  AS_GLOBAL, 0, "",
612  _( "Help" ),
613  _( "Open product documentation in a web browser" ),
615 
616 TOOL_ACTION ACTIONS::listHotKeys( "common.SuiteControl.listHotKeys",
617  AS_GLOBAL,
618  MD_CTRL + WXK_F1, LEGACY_HK_NAME( "List Hotkeys" ),
619  _( "List Hotkeys..." ),
620  _( "Displays current hotkeys table and corresponding commands" ),
622 
623 TOOL_ACTION ACTIONS::getInvolved( "common.SuiteControl.getInvolved",
624  AS_GLOBAL, 0, "",
625  _( "Get Involved" ),
626  _( "Open \"Contribute to KiCad\" in a web browser" ),
627  BITMAPS::info );
628 
629 TOOL_ACTION ACTIONS::donate( "common.SuiteControl.donate",
630  AS_GLOBAL, 0, "",
631  _( "Donate" ),
632  _( "Open \"Donate to KiCad\" in a web browser" ) );
633 
634 TOOL_ACTION ACTIONS::reportBug( "common.SuiteControl.reportBug",
635  AS_GLOBAL, 0, "",
636  _( "Report Bug" ),
637  _( "Report a problem with KiCad" ),
638  BITMAPS::bug );
639 
640 
641 // System-wide selection Events
642 
643 const TOOL_EVENT EVENTS::SelectedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.selected" );
644 const TOOL_EVENT EVENTS::UnselectedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.unselected" );
645 const TOOL_EVENT EVENTS::ClearedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.cleared" );
646 
647 const TOOL_EVENT EVENTS::SelectedItemsModified( TC_MESSAGE, TA_ACTION, "common.Interactive.modified" );
648 const TOOL_EVENT EVENTS::SelectedItemsMoved( TC_MESSAGE, TA_ACTION, "common.Interactive.moved" );
649 const TOOL_EVENT EVENTS::InhibitSelectionEditing( TC_MESSAGE, TA_ACTION, "common.Interactive.inhibit" );
650 const TOOL_EVENT EVENTS::UninhibitSelectionEditing( TC_MESSAGE, TA_ACTION, "common.Interactive.uninhibit" );
651 
static TOOL_ACTION listHotKeys
Definition: actions.h:180
static TOOL_ACTION pinLibrary
Definition: actions.h:112
static TOOL_ACTION show3DViewer
Definition: actions.h:161
static const TOOL_EVENT SelectedEvent
Definition: actions.h:201
static TOOL_ACTION zoomPreset
Definition: actions.h:101
static TOOL_ACTION findAndReplace
Definition: actions.h:80
static TOOL_ACTION zoomInCenter
Definition: actions.h:96
static TOOL_ACTION activatePointEditor
Definition: actions.h:171
#define LEGACY_HK_NAME(x)
Definition: actions.h:35
static TOOL_ACTION pageSettings
Definition: actions.h:59
static const TOOL_EVENT UnselectedEvent
Definition: actions.h:202
static TOOL_ACTION doDelete
Definition: actions.h:75
static TOOL_ACTION zoomTool
Definition: actions.h:102
static TOOL_ACTION gridResetOrigin
Definition: actions.h:141
static TOOL_ACTION changeEditMethod
Definition: actions.h:172
static TOOL_ACTION replaceAll
Definition: actions.h:84
static TOOL_ACTION cancelInteractive
Definition: actions.h:65
static TOOL_ACTION nextMarker
Definition: actions.h:89
static TOOL_ACTION cursorRight
Definition: actions.h:119
static TOOL_ACTION zoomFitScreen
Definition: actions.h:99
static TOOL_ACTION millimetersUnits
Definition: actions.h:149
static TOOL_ACTION reportBug
Cursor control event types.
Definition: actions.h:183
static TOOL_ACTION showSymbolLibTable
Definition: actions.h:176
static TOOL_ACTION cursorRightFast
Definition: actions.h:124
static TOOL_ACTION gridFast1
Definition: actions.h:136
static TOOL_ACTION unpinLibrary
Definition: actions.h:113
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:166
static TOOL_ACTION donate
Definition: actions.h:181
static TOOL_ACTION zoomFitObjects
Definition: actions.h:100
static TOOL_ACTION print
Definition: actions.h:60
static TOOL_ACTION excludeMarker
Definition: actions.h:90
static TOOL_ACTION panLeft
Definition: actions.h:132
static TOOL_ACTION find
Definition: actions.h:79
#define _(s)
Definition: actions.cpp:36
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Definition: actions.h:206
static TOOL_ACTION zoomOutCenter
Definition: actions.h:97
static TOOL_ACTION saveCopyAs
Definition: actions.h:56
static TOOL_ACTION pickerTool
Definition: actions.h:158
static TOOL_ACTION updateFind
Definition: actions.h:85
static TOOL_ACTION measureTool
Definition: actions.h:157
static TOOL_ACTION copy
Definition: actions.h:70
Action activates a tool.
Definition: tool_event.h:158
static TOOL_ACTION centerContents
Definition: actions.h:103
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:167
static TOOL_ACTION gridFast2
Definition: actions.h:137
static TOOL_ACTION toggleCursor
Definition: actions.h:104
static TOOL_ACTION gridPreset
Definition: actions.h:142
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:177
static TOOL_ACTION gridPrev
Definition: actions.h:139
static TOOL_ACTION panDown
Definition: actions.h:131
static TOOL_ACTION toggleGrid
Definition: actions.h:143
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:164
static TOOL_ACTION inchesUnits
Definition: actions.h:147
static TOOL_ACTION save
Definition: actions.h:54
static TOOL_ACTION doNew
Definition: actions.h:47
Generic, UI-independent tool event.
Definition: tool_event.h:173
static TOOL_ACTION cursorUpFast
Definition: actions.h:121
static TOOL_ACTION cursorDownFast
Definition: actions.h:122
static TOOL_ACTION cursorLeft
Definition: actions.h:118
static TOOL_ACTION panRight
Definition: actions.h:133
static TOOL_ACTION togglePolarCoords
Definition: actions.h:152
static TOOL_ACTION cut
Definition: actions.h:69
static const TOOL_EVENT UninhibitSelectionEditing
Definition: actions.h:213
static TOOL_ACTION addLibrary
Definition: actions.h:52
static TOOL_ACTION quit
Definition: actions.h:62
static const TOOL_EVENT ClearedEvent
Selected item had a property changed (except movement)
Definition: actions.h:203
static TOOL_ACTION replaceAndFindNext
Definition: actions.h:83
static TOOL_ACTION plot
Definition: actions.h:61
static const TOOL_EVENT SelectedItemsMoved
Used to inform tools that the selection should temporarily be non-editable.
Definition: actions.h:209
static TOOL_ACTION cursorLeftFast
Definition: actions.h:123
static TOOL_ACTION updateMenu
Definition: actions.h:170
Global action (toolbar/main menu event, global shortcut)
Definition: tool_event.h:151
static TOOL_ACTION newLibrary
Definition: actions.h:51
static TOOL_ACTION milsUnits
Definition: actions.h:148
static TOOL_ACTION prevMarker
Definition: actions.h:88
static TOOL_ACTION pasteSpecial
Definition: actions.h:72
static TOOL_ACTION findNextMarker
Definition: actions.h:82
static TOOL_ACTION redo
Definition: actions.h:68
static TOOL_ACTION updateUnits
Definition: actions.h:150
static TOOL_ACTION showSymbolEditor
Definition: actions.h:163
static TOOL_ACTION zoomCenter
Definition: actions.h:98
static TOOL_ACTION saveAs
Definition: actions.h:55
static TOOL_ACTION cursorUp
Cursor control with keyboard.
Definition: actions.h:116
static TOOL_ACTION zoomRedraw
Definition: actions.h:93
static TOOL_ACTION cursorDblClick
Definition: actions.h:127
Represent a single user action.
Definition: tool_action.h:49
static TOOL_ACTION resetLocalCoords
Definition: actions.h:153
static TOOL_ACTION help
Definition: actions.h:179
static const TOOL_EVENT InhibitSelectionEditing
Definition: actions.h:212
The common library.
static TOOL_ACTION gridNext
Definition: actions.h:138
static TOOL_ACTION gridProperties
Definition: actions.h:144
static TOOL_ACTION panUp
Definition: actions.h:130
static TOOL_ACTION zoomIn
Definition: actions.h:94
static TOOL_ACTION deleteTool
Definition: actions.h:76
static TOOL_ACTION zoomOut
Definition: actions.h:95
static TOOL_ACTION highContrastModeCycle
Definition: actions.h:107
static TOOL_ACTION undo
Definition: actions.h:67
static TOOL_ACTION toggleCursorStyle
Definition: actions.h:105
static TOOL_ACTION saveAll
Definition: actions.h:57
static TOOL_ACTION gridSetOrigin
Definition: actions.h:140
static TOOL_ACTION showSymbolBrowser
Definition: actions.h:162
static TOOL_ACTION showContextMenu
Definition: actions.h:66
static TOOL_ACTION cursorDown
Definition: actions.h:117
static TOOL_ACTION getInvolved
Definition: actions.h:182
static TOOL_ACTION configurePaths
Definition: actions.h:175
static TOOL_ACTION highContrastMode
Definition: actions.h:106
static TOOL_ACTION toggleUnits
Definition: actions.h:151
static TOOL_ACTION selectAll
Definition: actions.h:73
static TOOL_ACTION findNext
Definition: actions.h:81
static TOOL_ACTION gettingStarted
Definition: actions.h:178
static TOOL_ACTION showFootprintEditor
Definition: actions.h:165
static TOOL_ACTION paste
Definition: actions.h:71
static TOOL_ACTION duplicate
Definition: actions.h:74
static TOOL_ACTION revert
Definition: actions.h:58
static TOOL_ACTION selectionTool
Definition: actions.h:156
static TOOL_ACTION refreshPreview
Definition: actions.h:109
static TOOL_ACTION cursorClick
Definition: actions.h:126