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 <fctsys.h>
26 #include <tool/actions.h>
27 #include <bitmaps.h>
28 #include <frame_type.h>
29 
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" ),
42  new_generic_xpm );
43 
44 TOOL_ACTION ACTIONS::newLibrary( "common.Control.newLibrary",
45  AS_GLOBAL,
46  0, "",
47  _( "New Library..." ), _( "Create a new library folder" ),
48  new_generic_xpm );
49 
50 TOOL_ACTION ACTIONS::addLibrary( "common.Control.addLibrary",
51  AS_GLOBAL,
52  0, "",
53  _( "Add Library..." ), _( "Add an existing library folder" ),
54  add_library_xpm );
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" ),
60  directory_xpm );
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  save_xpm );
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" ),
72  save_as_xpm );
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" ),
78  save_as_xpm );
79 
80 TOOL_ACTION ACTIONS::saveAll( "common.Control.saveAll",
81  AS_GLOBAL,
82  0, "",
83  _( "Save All" ), _( "Save all changes" ),
84  save_xpm );
85 
86 TOOL_ACTION ACTIONS::revert( "common.Control.revert",
87  AS_GLOBAL,
88  0, "",
89  _( "Revert" ), _( "Throw away changes" ),
90  undo_xpm );
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" ),
96  sheetset_xpm );
97 
98 TOOL_ACTION ACTIONS::print( "common.Control.print",
99  AS_GLOBAL,
100  MD_CTRL + 'P', LEGACY_HK_NAME( "Print" ),
101  _( "Print..." ), _( "Print" ),
102  print_button_xpm );
103 
104 TOOL_ACTION ACTIONS::plot( "common.Control.plot",
105  AS_GLOBAL,
106  0, "",
107  _( "Plot..." ), _( "Plot" ),
108  plot_xpm );
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  exit_xpm );
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" ),
121  cancel_xpm, AF_NONE );
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  nullptr, 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  undo_xpm );
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  redo_xpm );
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  cut_xpm );
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  copy_xpm );
160 
161 TOOL_ACTION ACTIONS::paste( "common.Interactive.paste",
162  AS_GLOBAL,
163  MD_CTRL + 'V', LEGACY_HK_NAME( "Paste" ),
164  _( "Paste" ), _( "Paste clipboard into schematic" ),
165  paste_xpm );
166 
167 TOOL_ACTION ACTIONS::duplicate( "common.Interactive.duplicate",
168  AS_GLOBAL,
169  MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate" ),
170  _( "Duplicate" ), _( "Duplicates the selected item(s)" ),
171  duplicate_xpm );
172 
173 TOOL_ACTION ACTIONS::doDelete( "common.Interactive.delete",
174  AS_GLOBAL,
175  WXK_DELETE, LEGACY_HK_NAME( "Delete Item" ),
176  _( "Delete" ), _( "Deletes selected item(s)" ),
177  delete_xpm );
178 
179 TOOL_ACTION ACTIONS::deleteTool( "common.Interactive.deleteTool",
180  AS_GLOBAL, 0, "",
181  _( "Interactive Delete Tool" ), _( "Delete clicked items" ),
182  delete_xpm, AF_ACTIVATE );
183 
184 TOOL_ACTION ACTIONS::activatePointEditor( "common.Control.activatePointEditor",
185  AS_GLOBAL );
186 
187 TOOL_ACTION ACTIONS::find( "common.Interactive.find",
188  AS_GLOBAL,
189  MD_CTRL + 'F', LEGACY_HK_NAME( "Find" ),
190  _( "Find" ), _( "Find text" ),
191  find_xpm );
192 
193 TOOL_ACTION ACTIONS::findAndReplace( "common.Interactive.findAndReplace",
194  AS_GLOBAL,
195  MD_CTRL + MD_ALT + 'F', LEGACY_HK_NAME( "Find and Replace" ),
196  _( "Find and Replace" ), _( "Find and replace text" ),
197  find_replace_xpm );
198 
199 TOOL_ACTION ACTIONS::findNext( "common.Interactive.findNext",
200  AS_GLOBAL,
201  WXK_F5, LEGACY_HK_NAME( "Find Next" ),
202  _( "Find Next" ), _( "Find next match" ),
203  find_xpm );
204 
205 TOOL_ACTION ACTIONS::findNextMarker( "common.Interactive.findNextMarker",
206  AS_GLOBAL,
207  MD_SHIFT + WXK_F5, LEGACY_HK_NAME( "Find Next Marker" ),
208  _( "Find Next Marker" ), "",
209  find_xpm );
210 
211 TOOL_ACTION ACTIONS::replaceAndFindNext( "common.Interactive.replaceAndFindNext",
212  AS_GLOBAL,
213  0, "",
214  _( "Replace and Find Next" ), _( "Replace current match and find next" ),
215  find_replace_xpm );
216 
217 TOOL_ACTION ACTIONS::replaceAll( "common.Interactive.replaceAll",
218  AS_GLOBAL,
219  0, "",
220  _( "Replace All" ), _( "Replace all matches" ),
221  find_replace_xpm );
222 
223 TOOL_ACTION ACTIONS::updateFind( "common.Control.updateFind",
224  AS_GLOBAL );
225 
226 // View Controls
227 TOOL_ACTION ACTIONS::zoomRedraw( "common.Control.zoomRedraw",
228  AS_GLOBAL,
229 #if defined( __WXMAC__ )
230  MD_CTRL + 'R',
231 #else
232  WXK_F3,
233 #endif
234  LEGACY_HK_NAME( "Zoom Redraw" ),
235  _( "Refresh" ), _( "Refresh" ),
236  zoom_redraw_xpm );
237 
238 TOOL_ACTION ACTIONS::zoomFitScreen( "common.Control.zoomFitScreen",
239  AS_GLOBAL,
240 #if defined( __WXMAC__ )
241  MD_CTRL + '0',
242 #else
243  WXK_HOME,
244 #endif
245  LEGACY_HK_NAME( "Zoom Auto" ),
246  _( "Zoom to Fit" ), _( "Zoom to Fit" ),
247  zoom_fit_in_page_xpm );
248 
249 TOOL_ACTION ACTIONS::zoomIn( "common.Control.zoomIn",
250  AS_GLOBAL,
251 #if defined( __WXMAC__ )
252  MD_CTRL + '+',
253 #else
254  WXK_F1,
255 #endif
256  LEGACY_HK_NAME( "Zoom In" ),
257  _( "Zoom In at Cursor" ), _( "Zoom In at Cursor" ),
258  zoom_in_xpm );
259 
260 TOOL_ACTION ACTIONS::zoomOut( "common.Control.zoomOut",
261  AS_GLOBAL,
262 #if defined( __WXMAC__ )
263  MD_CTRL + '-',
264 #else
265  WXK_F2,
266 #endif
267  LEGACY_HK_NAME( "Zoom Out" ),
268  _( "Zoom Out at Cursor" ), _( "Zoom Out at Cursor" ),
269  zoom_out_xpm );
270 
271 TOOL_ACTION ACTIONS::zoomInCenter( "common.Control.zoomInCenter",
272  AS_GLOBAL,
273  0, "",
274  _( "Zoom In" ), _( "Zoom In" ),
275  zoom_in_xpm );
276 
277 TOOL_ACTION ACTIONS::zoomOutCenter( "common.Control.zoomOutCenter",
278  AS_GLOBAL,
279  0, "",
280  _( "Zoom Out" ), _( "Zoom Out" ),
281  zoom_out_xpm );
282 
283 TOOL_ACTION ACTIONS::zoomCenter( "common.Control.zoomCenter",
284  AS_GLOBAL,
285  WXK_F4, LEGACY_HK_NAME( "Zoom Center" ),
286  _( "Center" ), _( "Center" ),
287  zoom_center_on_screen_xpm );
288 
289 TOOL_ACTION ACTIONS::zoomTool( "common.Control.zoomTool",
290  AS_GLOBAL,
291  MD_CTRL + WXK_F5, LEGACY_HK_NAME( "Zoom to Selection" ),
292  _( "Zoom to Selection" ), _( "Zoom to Selection" ),
293  zoom_area_xpm, AF_ACTIVATE );
294 
295 TOOL_ACTION ACTIONS::zoomPreset( "common.Control.zoomPreset",
296  AS_GLOBAL );
297 
298 TOOL_ACTION ACTIONS::centerContents( "common.Control.centerContents",
299  AS_GLOBAL );
300 
301 // Cursor control
302 TOOL_ACTION ACTIONS::cursorUp( "common.Control.cursorUp",
303  AS_GLOBAL,
304  WXK_UP, "",
305  _( "Cursor Up" ), "",
306  nullptr, AF_NONE, (void*) CURSOR_UP );
307 
308 TOOL_ACTION ACTIONS::cursorDown( "common.Control.cursorDown",
309  AS_GLOBAL,
310  WXK_DOWN, "",
311  _( "Cursor Down" ), "" ,
312  nullptr, AF_NONE, (void*) CURSOR_DOWN );
313 
314 TOOL_ACTION ACTIONS::cursorLeft( "common.Control.cursorLeft",
315  AS_GLOBAL,
316  WXK_LEFT, "",
317  _( "Cursor Left" ), "" ,
318  nullptr, AF_NONE, (void*) CURSOR_LEFT );
319 
320 TOOL_ACTION ACTIONS::cursorRight( "common.Control.cursorRight",
321  AS_GLOBAL,
322  WXK_RIGHT, "",
323  _( "Cursor Right" ), "" ,
324  nullptr, AF_NONE, (void*) CURSOR_RIGHT );
325 
326 
327 TOOL_ACTION ACTIONS::cursorUpFast( "common.Control.cursorUpFast",
328  AS_GLOBAL,
329  MD_CTRL + WXK_UP, "",
330  _( "Cursor Up Fast" ), "",
331  nullptr, AF_NONE, (void*) ( CURSOR_UP | CURSOR_FAST_MOVE ) );
332 
333 TOOL_ACTION ACTIONS::cursorDownFast( "common.Control.cursorDownFast",
334  AS_GLOBAL,
335  MD_CTRL + WXK_DOWN, "",
336  _( "Cursor Down Fast" ), "" ,
337  nullptr, AF_NONE, (void*) ( CURSOR_DOWN | CURSOR_FAST_MOVE ) );
338 
339 TOOL_ACTION ACTIONS::cursorLeftFast( "common.Control.cursorLeftFast",
340  AS_GLOBAL,
341  MD_CTRL + WXK_LEFT, "",
342  _( "Cursor Left Fast" ), "" ,
343  nullptr, AF_NONE, (void*) ( CURSOR_LEFT | CURSOR_FAST_MOVE ) );
344 
345 TOOL_ACTION ACTIONS::cursorRightFast( "common.Control.cursorRightFast",
346  AS_GLOBAL,
347  MD_CTRL + WXK_RIGHT, "",
348  _( "Cursor Right Fast" ), "" ,
349  nullptr, AF_NONE, (void*) ( CURSOR_RIGHT | CURSOR_FAST_MOVE ) );
350 
351 TOOL_ACTION ACTIONS::cursorClick( "common.Control.cursorClick",
352  AS_GLOBAL,
353  WXK_RETURN, LEGACY_HK_NAME( "Mouse Left Click" ),
354  _( "Click" ), "Performs left mouse button click",
355  nullptr, AF_NONE, (void*) CURSOR_CLICK );
356 
357 TOOL_ACTION ACTIONS::cursorDblClick( "common.Control.cursorDblClick",
358  AS_GLOBAL,
359  WXK_END, LEGACY_HK_NAME( "Mouse Left Double Click" ),
360  _( "Double-click" ), "Performs left mouse button double-click",
361  nullptr, AF_NONE, (void*) CURSOR_DBL_CLICK );
362 
363 TOOL_ACTION ACTIONS::refreshPreview( "common.Control.refreshPreview",
364  AS_GLOBAL );
365 
366 TOOL_ACTION ACTIONS::panUp( "common.Control.panUp",
367  AS_GLOBAL,
368  MD_SHIFT + WXK_UP, "",
369  _( "Pan Up" ), "",
370  nullptr, AF_NONE, (void*) CURSOR_UP );
371 
372 TOOL_ACTION ACTIONS::panDown( "common.Control.panDown",
373  AS_GLOBAL,
374  MD_SHIFT + WXK_DOWN, "",
375  _( "Pan Down" ), "" ,
376  nullptr, AF_NONE, (void*) CURSOR_DOWN );
377 
378 TOOL_ACTION ACTIONS::panLeft( "common.Control.panLeft",
379  AS_GLOBAL,
380  MD_SHIFT + WXK_LEFT, "",
381  _( "Pan Left" ), "" ,
382  nullptr, AF_NONE, (void*) CURSOR_LEFT );
383 
384 TOOL_ACTION ACTIONS::panRight( "common.Control.panRight",
385  AS_GLOBAL,
386  MD_SHIFT + WXK_RIGHT, "",
387  _( "Pan Right" ), "" ,
388  nullptr, AF_NONE, (void*) CURSOR_RIGHT );
389 
390 // Grid control
391 TOOL_ACTION ACTIONS::gridFast1( "common.Control.gridFast1",
392  AS_GLOBAL,
393  MD_ALT + '1', LEGACY_HK_NAME( "Switch Grid To Fast Grid1" ),
394  _( "Switch to Fast Grid 1" ), "" );
395 
396 TOOL_ACTION ACTIONS::gridFast2( "common.Control.gridFast2",
397  AS_GLOBAL,
398  MD_ALT + '2', LEGACY_HK_NAME( "Switch Grid To Fast Grid2" ),
399  _( "Switch to Fast Grid 2" ), "" );
400 
401 TOOL_ACTION ACTIONS::gridNext( "common.Control.gridNext",
402  AS_GLOBAL,
403  'N', LEGACY_HK_NAME( "Switch Grid To Next" ),
404  _("Switch to Next Grid" ), "" );
405 
406 TOOL_ACTION ACTIONS::gridPrev( "common.Control.gridPrev",
407  AS_GLOBAL, MD_SHIFT + 'N', LEGACY_HK_NAME( "Switch Grid To Previous" ),
408  _( "Switch to Previous Grid" ), "" );
409 
410 TOOL_ACTION ACTIONS::gridSetOrigin( "common.Control.gridSetOrigin",
411  AS_GLOBAL,
412  'S', LEGACY_HK_NAME( "Set Grid Origin" ),
413  _( "Grid Origin" ), _( "Set the grid origin point" ),
414  grid_select_axis_xpm );
415 
416 TOOL_ACTION ACTIONS::gridResetOrigin( "common.Control.gridResetOrigin",
417  AS_GLOBAL,
418  'Z', LEGACY_HK_NAME( "Reset Grid Origin" ),
419  _( "Reset Grid Origin" ), "" );
420 
421 TOOL_ACTION ACTIONS::gridPreset( "common.Control.gridPreset",
422  AS_GLOBAL );
423 
424 TOOL_ACTION ACTIONS::toggleGrid( "common.Control.toggleGrid",
425  AS_GLOBAL, 0, "",
426  _( "Show Grid" ), _( "Display grid dots or lines in the edit window" ),
427  grid_xpm );
428 
429 TOOL_ACTION ACTIONS::gridProperties( "common.Control.gridProperties",
430  AS_GLOBAL, 0, "",
431  _( "Grid Properties..." ), _( "Set grid dimensions" ),
432  grid_select_xpm );
433 
434 TOOL_ACTION ACTIONS::imperialUnits( "common.Control.imperialUnits",
435  AS_GLOBAL, 0, "",
436  _( "Imperial" ), _( "Use inches and mils" ),
437  unit_inch_xpm );
438 
439 TOOL_ACTION ACTIONS::metricUnits( "common.Control.metricUnits",
440  AS_GLOBAL, 0, "",
441  _( "Metric" ), _( "Use millimeters" ),
442  unit_mm_xpm );
443 
444 TOOL_ACTION ACTIONS::toggleUnits( "common.Control.toggleUnits",
445  AS_GLOBAL,
446  MD_CTRL + 'U', LEGACY_HK_NAME( "Switch Units" ),
447  _( "Switch units" ), _( "Switch between inches and millimeters" ),
448  unit_mm_xpm );
449 
450 TOOL_ACTION ACTIONS::togglePolarCoords( "common.Control.togglePolarCoords",
451  AS_GLOBAL, 0, "",
452  _( "Polar Coordinates" ), _( "Switch between polar and cartesian coordinate systems" ),
453  polar_coord_xpm );
454 
455 TOOL_ACTION ACTIONS::resetLocalCoords( "common.Control.resetLocalCoords",
456  AS_GLOBAL,
457  ' ', LEGACY_HK_NAME( "Reset Local Coordinates" ),
458  _( "Reset Local Coordinates" ), "" );
459 
460 TOOL_ACTION ACTIONS::toggleCursor( "common.Control.toggleCursor",
461  AS_GLOBAL,
462  // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
463  MD_CTRL + MD_SHIFT + 'X', LEGACY_HK_NAME( "Toggle Cursor Display (Modern Toolset only)" ),
464  _( "Always Show Cursor" ), _( "Display crosshairs even in selection tool" ),
465  cursor_xpm );
466 
467 TOOL_ACTION ACTIONS::toggleCursorStyle( "common.Control.toggleCursorStyle",
468  AS_GLOBAL, 0, "",
469  _( "Full-Window Crosshairs" ), _( "Switch display of full-window crosshairs" ),
470  cursor_shape_xpm );
471 
472 TOOL_ACTION ACTIONS::highContrastMode( "common.Control.highContrastMode",
473  AS_GLOBAL,
474  MD_CTRL + 'H', LEGACY_HK_NAME( "Toggle High Contrast Mode" ),
475  _( "High Contrast Mode" ), _( "Use high contrast display mode" ),
476  contrast_mode_xpm );
477 
478 TOOL_ACTION ACTIONS::selectionTool( "common.InteractiveSelection.selectionTool",
479  AS_GLOBAL, 0, "",
480  _( "Select item(s)" ), "",
481  cursor_xpm, AF_ACTIVATE );
482 
483 TOOL_ACTION ACTIONS::measureTool( "common.InteractiveEdit.measureTool",
484  AS_GLOBAL,
485  // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
486  MD_CTRL + MD_SHIFT + 'M', LEGACY_HK_NAME( "Measure Distance (Modern Toolset only)" ),
487  _( "Measure Tool" ), _( "Interactively measure distance between points" ),
488  measurement_xpm, AF_ACTIVATE );
489 
490 TOOL_ACTION ACTIONS::pickerTool( "common.InteractivePicker.pickerTool",
491  AS_GLOBAL, 0, "", "", "", NULL, AF_ACTIVATE );
492 
493 TOOL_ACTION ACTIONS::show3DViewer( "common.Control.show3DViewer",
494  AS_GLOBAL,
495  MD_ALT + '3', LEGACY_HK_NAME( "3D Viewer" ),
496  _( "3D Viewer" ), _( "Show 3D viewer window" ),
497  three_d_xpm );
498 
499 TOOL_ACTION ACTIONS::showSymbolBrowser( "common.Control.showSymbolBrowser",
500  AS_GLOBAL, 0, "",
501  _( "Symbol Library Browser" ), _( "Browse symbol libraries" ),
502  library_browse_xpm, AF_NONE, (void*) FRAME_SCH_VIEWER );
503 
504 TOOL_ACTION ACTIONS::showSymbolEditor( "common.Control.showSymbolEditor",
505  AS_GLOBAL, 0, "",
506  _( "Symbol Editor" ), _( "Create, delete and edit symbols" ),
507  libedit_xpm, AF_NONE, (void*) FRAME_SCH_LIB_EDITOR );
508 
509 TOOL_ACTION ACTIONS::showFootprintBrowser( "common.Control.showFootprintBrowser",
510  AS_GLOBAL, 0, "",
511  _( "Footprint Library Browser" ), _( "Browse footprint libraries" ),
512  modview_icon_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_VIEWER );
513 
514 TOOL_ACTION ACTIONS::showFootprintEditor( "common.Control.showFootprintEditor",
515  AS_GLOBAL, 0, "",
516  _( "Footprint Editor" ), _( "Create, delete and edit footprints" ),
517  module_editor_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_EDITOR );
518 
519 TOOL_ACTION ACTIONS::updatePcbFromSchematic( "common.Control.updatePcbFromSchematic",
520  AS_GLOBAL,
521  WXK_F8, LEGACY_HK_NAME( "Update PCB from Schematic" ),
522  _( "Update PCB from Schematic..." ), _( "Push changes from schematic to PCB" ),
523  update_pcb_from_sch_xpm );
524 
525 TOOL_ACTION ACTIONS::acceleratedGraphics( "common.Control.acceleratedGraphics",
526  AS_GLOBAL,
527 #ifdef __WXMAC__
528  MD_ALT + WXK_F11,
529 #else
530  WXK_F11,
531 #endif
532  LEGACY_HK_NAME( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
533  _( "Accelerated Graphics" ), _( "Use hardware-accelerated graphics (recommended)" ),
534  tools_xpm );
535 
536 TOOL_ACTION ACTIONS::standardGraphics( "common.Control.standardGraphics",
537  AS_GLOBAL,
538 #ifdef __WXMAC__
539  MD_ALT + WXK_F12,
540 #else
541  WXK_F12,
542 #endif
543  LEGACY_HK_NAME( "Switch to Modern Toolset with software graphics (fall-back)" ),
544  _( "Standard Graphics" ), _( "Use software graphics (fall-back)" ),
545  tools_xpm );
546 
547 TOOL_ACTION ACTIONS::configurePaths( "common.SuiteControl.configurePaths",
548  AS_GLOBAL, 0, "",
549  _( "Configure Paths..." ), _( "Edit path configuration environment variables" ),
550  path_xpm );
551 
552 TOOL_ACTION ACTIONS::showSymbolLibTable( "common.SuiteControl.showSymbolLibTable",
553  AS_GLOBAL, 0, "",
554  _( "Manage Symbol Libraries..." ),
555  _( "Edit the global and project symbol library lists" ),
556  library_table_xpm );
557 
558 TOOL_ACTION ACTIONS::showFootprintLibTable( "common.SuiteControl.showFootprintLibTable",
559  AS_GLOBAL, 0, "",
560  _( "Manage Footprint Libraries..." ),
561  _( "Edit the global and project footprint library lists" ),
562  library_table_xpm );
563 
564 TOOL_ACTION ACTIONS::gettingStarted( "common.SuiteControl.gettingStarted",
565  AS_GLOBAL, 0, "",
566  _( "Getting Started with KiCad" ),
567  _( "Open \"Getting Started in KiCad\" guide for beginners" ),
568  help_xpm );
569 
570 TOOL_ACTION ACTIONS::help( "common.SuiteControl.help",
571  AS_GLOBAL, 0, "",
572  _( "Help" ),
573  _( "Open product documentation in a web browser" ),
574  online_help_xpm );
575 
576 TOOL_ACTION ACTIONS::listHotKeys( "common.SuiteControl.listHotKeys",
577  AS_GLOBAL,
578  MD_CTRL + WXK_F1, LEGACY_HK_NAME( "List Hotkeys" ),
579  _( "List Hotkeys..." ),
580  _( "Displays current hotkeys table and corresponding commands" ),
581  hotkeys_xpm );
582 
583 TOOL_ACTION ACTIONS::getInvolved( "common.SuiteControl.getInvolved",
584  AS_GLOBAL, 0, "",
585  _( "Get Involved" ),
586  _( "Open \"Contribute to KiCad\" in a web browser" ),
587  info_xpm );
588 
589 
590 // System-wide selection Events
591 
592 const TOOL_EVENT EVENTS::SelectedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.selected" );
593 const TOOL_EVENT EVENTS::UnselectedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.unselected" );
594 const TOOL_EVENT EVENTS::ClearedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.cleared" );
595 
596 const TOOL_EVENT EVENTS::SelectedItemsModified( TC_MESSAGE, TA_ACTION, "common.Interactive.modified" );
597 
static TOOL_ACTION listHotKeys
Definition: actions.h:166
static TOOL_ACTION show3DViewer
Definition: actions.h:147
static const TOOL_EVENT SelectedEvent
Definition: actions.h:196
static TOOL_ACTION zoomPreset
Definition: actions.h:93
static TOOL_ACTION findAndReplace
Definition: actions.h:78
static TOOL_ACTION zoomInCenter
Definition: actions.h:89
static TOOL_ACTION activatePointEditor
Definition: actions.h:158
#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:197
static TOOL_ACTION doDelete
Definition: actions.h:73
static TOOL_ACTION zoomTool
Definition: actions.h:94
static TOOL_ACTION gridResetOrigin
Definition: actions.h:129
static TOOL_ACTION replaceAll
Definition: actions.h:82
static TOOL_ACTION cancelInteractive
Definition: actions.h:65
static TOOL_ACTION cursorRight
Definition: actions.h:107
static TOOL_ACTION zoomFitScreen
Definition: actions.h:92
static TOOL_ACTION showSymbolLibTable
Definition: actions.h:162
static TOOL_ACTION standardGraphics
Definition: actions.h:154
static TOOL_ACTION cursorRightFast
Definition: actions.h:112
static TOOL_ACTION gridFast1
Definition: actions.h:124
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:152
static TOOL_ACTION print
Definition: actions.h:60
static TOOL_ACTION panLeft
Definition: actions.h:120
static TOOL_ACTION find
Definition: actions.h:77
#define _(s)
Definition: actions.cpp:36
static TOOL_ACTION imperialUnits
Definition: actions.h:135
static const TOOL_EVENT SelectedItemsModified
Definition: actions.h:200
static TOOL_ACTION zoomOutCenter
Definition: actions.h:90
static TOOL_ACTION saveCopyAs
Definition: actions.h:56
static TOOL_ACTION pickerTool
Definition: actions.h:144
static TOOL_ACTION updateFind
Definition: actions.h:83
static TOOL_ACTION measureTool
Definition: actions.h:143
static TOOL_ACTION copy
Definition: actions.h:70
static TOOL_ACTION centerContents
Definition: actions.h:95
static TOOL_ACTION gridFast2
Definition: actions.h:125
static TOOL_ACTION toggleCursor
Definition: actions.h:96
static TOOL_ACTION gridPreset
Definition: actions.h:130
static TOOL_ACTION showFootprintLibTable
Definition: actions.h:163
static TOOL_ACTION gridPrev
Definition: actions.h:127
static TOOL_ACTION panDown
Definition: actions.h:119
static TOOL_ACTION toggleGrid
Definition: actions.h:131
static TOOL_ACTION open
Definition: actions.h:53
static TOOL_ACTION showFootprintBrowser
Definition: actions.h:150
static TOOL_ACTION save
Definition: actions.h:54
static TOOL_ACTION doNew
Definition: actions.h:47
Class TOOL_EVENT.
Definition: tool_event.h:168
static TOOL_ACTION cursorUpFast
Definition: actions.h:109
static TOOL_ACTION cursorDownFast
Definition: actions.h:110
static TOOL_ACTION cursorLeft
Definition: actions.h:106
static TOOL_ACTION panRight
Definition: actions.h:121
static TOOL_ACTION togglePolarCoords
Definition: actions.h:138
static TOOL_ACTION cut
Definition: actions.h:69
static TOOL_ACTION addLibrary
Definition: actions.h:52
static TOOL_ACTION quit
Definition: actions.h:62
static const TOOL_EVENT ClearedEvent
Definition: actions.h:198
static TOOL_ACTION replaceAndFindNext
Definition: actions.h:81
static TOOL_ACTION plot
Definition: actions.h:61
static TOOL_ACTION cursorLeftFast
Definition: actions.h:111
static TOOL_ACTION updateMenu
Definition: actions.h:157
All active tools
Definition: tool_event.h:144
static TOOL_ACTION newLibrary
Definition: actions.h:51
static TOOL_ACTION findNextMarker
Definition: actions.h:80
static TOOL_ACTION metricUnits
Definition: actions.h:136
static TOOL_ACTION redo
Definition: actions.h:68
static TOOL_ACTION showSymbolEditor
Definition: actions.h:149
static TOOL_ACTION zoomCenter
Definition: actions.h:91
static TOOL_ACTION saveAs
Definition: actions.h:55
static TOOL_ACTION cursorUp
Cursor control with keyboard.
Definition: actions.h:104
static TOOL_ACTION zoomRedraw
Definition: actions.h:86
static TOOL_ACTION cursorDblClick
Definition: actions.h:115
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION acceleratedGraphics
Definition: actions.h:153
static TOOL_ACTION resetLocalCoords
Definition: actions.h:139
static TOOL_ACTION help
Definition: actions.h:165
static TOOL_ACTION gridNext
Definition: actions.h:126
static TOOL_ACTION gridProperties
Definition: actions.h:132
static TOOL_ACTION panUp
Definition: actions.h:118
static TOOL_ACTION zoomIn
Definition: actions.h:87
static TOOL_ACTION deleteTool
Definition: actions.h:74
static TOOL_ACTION zoomOut
Definition: actions.h:88
static TOOL_ACTION undo
Definition: actions.h:67
static TOOL_ACTION toggleCursorStyle
Definition: actions.h:97
static TOOL_ACTION saveAll
Definition: actions.h:57
static TOOL_ACTION gridSetOrigin
Definition: actions.h:128
static TOOL_ACTION showSymbolBrowser
Definition: actions.h:148
static TOOL_ACTION showContextMenu
Definition: actions.h:66
static TOOL_ACTION cursorDown
Definition: actions.h:105
static TOOL_ACTION getInvolved
Definition: actions.h:167
static TOOL_ACTION configurePaths
Definition: actions.h:161
static TOOL_ACTION highContrastMode
Definition: actions.h:98
static TOOL_ACTION toggleUnits
Definition: actions.h:137
static TOOL_ACTION findNext
Definition: actions.h:79
static TOOL_ACTION gettingStarted
Definition: actions.h:164
static TOOL_ACTION showFootprintEditor
Definition: actions.h:151
static TOOL_ACTION paste
Definition: actions.h:71
static TOOL_ACTION duplicate
Definition: actions.h:72
static TOOL_ACTION revert
Definition: actions.h:58
static TOOL_ACTION selectionTool
Definition: actions.h:142
static TOOL_ACTION refreshPreview
Definition: actions.h:100
static TOOL_ACTION cursorClick
Definition: actions.h:114