KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kicad_manager_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-2023 CERN
5 * Copyright The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#include <tool/tool_action.h>
22#include <bitmaps.h>
24#include <frame_type.h>
25
26
27// Actions, being statically-defined, require specialized I18N handling. We continue to
28// use the _() macro so that string harvesting by the I18N framework doesn't have to be
29// specialized, but we don't translate on initialization and instead do it in the getters.
30
31#undef _
32#define _(s) s
33
35 .Name( "kicad.Control.newProject" )
36 .Scope( AS_GLOBAL )
37 .DefaultHotkey( MD_CTRL + 'N' )
38 .LegacyHotkeyName( "New Project" )
39 .FriendlyName( _( "New Project..." ) )
40 .Tooltip( _( "Create a new project based on an existing project" ) )
42
44 .Name( "kicad.Control.newFromRepository" )
45 .Scope( AS_GLOBAL )
46 .LegacyHotkeyName( "Clone Project From Repository" )
47 .FriendlyName( _( "Clone Project from Repository..." ) )
48 .Icon( BITMAPS::project_clone ) );
49
51 .Name( "kicad.Control.newJobs" )
52 .Scope( AS_GLOBAL )
53 .LegacyHotkeyName( "New Jobset File" )
54 .FriendlyName( _( "New Jobset File..." ) )
55 .Icon( BITMAPS::jobset ) );
56
58 .Name( "kicad.Control.openDemoProject" )
59 .Scope( AS_GLOBAL )
60 .LegacyHotkeyName( "Open Demo Project" )
61 .FriendlyName( _( "Open Demo Project..." ) )
63
65 .Name( "kicad.Control.openProject" )
66 .Scope( AS_GLOBAL )
67 .DefaultHotkey( MD_CTRL + 'O' )
68 .LegacyHotkeyName( "Open Project" )
69 .FriendlyName( _( "Open Project..." ) )
70 .Icon( BITMAPS::open_project ) );
71
73 .Name( "kicad.Control.openJobset" )
74 .Scope( AS_GLOBAL )
75 .LegacyHotkeyName( "Open Jobset File" )
76 .FriendlyName( _( "Open Jobset File..." ) )
77 .Icon( BITMAPS::jobset_open ) );
78
80 .Name( "kicad.Control.closeProject" )
81 .Scope( AS_GLOBAL )
82 .LegacyHotkeyName( "Close Project" )
83 .FriendlyName( _( "Close Project" ) )
84 .Icon( BITMAPS::project_close ) );
85
87 .Name( "kicad.Control.loadProject" )
88 .Scope( AS_GLOBAL )
89 .Parameter<wxString*>( nullptr ) ); // Default to no filename
90
92 .Name( "kicad.Control.viewDroppedGerbers" )
93 .Scope( AS_GLOBAL )
94 .Parameter<wxString*>( nullptr ) ); // Default to no filename
95
97 .Name( "kicad.Control.editSchematic" )
98 .Scope( AS_GLOBAL )
99 .DefaultHotkey( MD_CTRL + 'E' )
100 .LegacyHotkeyName( "Run Eeschema" )
101 .FriendlyName( _( "Schematic Editor" ) )
102 .Tooltip( _( "Edit schematic in schematic editor" ) )
104 .Flags( AF_NONE )
105 .Parameter( FRAME_SCH ) );
106
108 .Name( "kicad.Control.editSymbols" )
109 .Scope( AS_GLOBAL )
110 .DefaultHotkey( MD_CTRL + 'L' )
111 .LegacyHotkeyName( "Run LibEdit" )
112 .FriendlyName( _( "Symbol Editor" ) )
113 .Tooltip( _( "Create, delete and edit schematic symbols" ) )
115 .Flags( AF_NONE )
116 .Parameter( FRAME_SCH_SYMBOL_EDITOR ) );
117
119 .Name( "kicad.Control.editPCB" )
120 .Scope( AS_GLOBAL )
121 .DefaultHotkey( MD_CTRL + 'P' )
122 .LegacyHotkeyName( "Run Pcbnew" )
123 .FriendlyName( _( "PCB Editor" ) )
124 .Tooltip( _( "Edit PCB in PCB editor" ) )
126 .Flags( AF_NONE )
127 .Parameter( FRAME_PCB_EDITOR ) );
128
130 .Name( "kicad.Control.editFootprints" )
131 .Scope( AS_GLOBAL )
132 .DefaultHotkey( MD_CTRL + 'F' )
133 .LegacyHotkeyName( "Run FpEditor" )
134 .FriendlyName( _( "Footprint Editor" ) )
135 .Tooltip( _( "Create, delete and edit PCB footprints" ) )
137 .Flags( AF_NONE )
138 .Parameter( FRAME_FOOTPRINT_EDITOR ) );
139
141 .Name( "kicad.Control.viewGerbers" )
142 .Scope( AS_GLOBAL )
143 .DefaultHotkey( MD_CTRL + 'G' )
144 .LegacyHotkeyName( "Run Gerbview" )
145 .FriendlyName( _( "Gerber Viewer" ) )
146 .Tooltip( _( "Preview Gerber output files" ) )
148 .Parameter<wxString*>( nullptr ) ); // Default to no filename
149
151 .Name( "kicad.Control.convertImage" )
152 .Scope( AS_GLOBAL )
153 .DefaultHotkey( MD_CTRL + 'B' )
154 .LegacyHotkeyName( "Run Bitmap2Component" )
155 .FriendlyName( _( "Image Converter" ) )
156 .Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
158 .Parameter<wxString*>( nullptr ) ); // Default to no filename
159
161 .Name( "kicad.Control.showCalculator" )
162 .Scope( AS_GLOBAL )
163 .LegacyHotkeyName( "Run PcbCalculator" )
164 .FriendlyName( _( "Calculator Tools" ) )
165 .Tooltip( _( "Run component calculations, track width calculations, etc." ) )
167 .Parameter<wxString*>( nullptr ) ); // Default to no filename
168
170 .Name( "kicad.Control.editDrawingSheet" )
171 .Scope( AS_GLOBAL )
172 .DefaultHotkey( MD_CTRL + 'Y' )
173 .LegacyHotkeyName( "Run PlEditor" )
174 .FriendlyName( _( "Drawing Sheet Editor" ) )
175 .Tooltip( _( "Edit drawing sheet borders and title block" ) )
177 .Parameter<wxString*>( nullptr ) ); // Default to no filename
178
180 .Name( "kicad.Control.pluginContentManager" )
181 .Scope( AS_GLOBAL )
182 .DefaultHotkey( MD_CTRL + 'M' )
183 .FriendlyName( _( "Plugin and Content Manager" ) )
184 .Tooltip( _( "Run Plugin and Content Manager" ) )
185 .Icon( BITMAPS::icon_pcm_24 ) );
186
188 .Name( "kicad.Control.openTextEditor" )
189 .Scope( AS_GLOBAL )
190 .FriendlyName( _( "Open Text Editor" ) )
191 .Tooltip( _( "Launch preferred text editor" ) )
192 .Icon( BITMAPS::editor )
193 .Parameter<wxString*>( nullptr ) ); // Default to no filename
194
196 .Name( "kicad.Control.editOtherSch" )
197 .Scope( AS_GLOBAL )
198 .Parameter<wxString*>( nullptr ) ); // Default to no filename
199
201 .Name( "kicad.Control.editOtherPCB" )
202 .Scope( AS_GLOBAL )
203 .Parameter<wxString*>( nullptr ) ); // Default to no filename
204
206 .Name( "kicad.Control.archiveProject" )
207 .Scope( AS_GLOBAL )
208 .FriendlyName( _( "Archive Project..." ) )
209 .Tooltip( _( "Archive all project files" ) )
210 .Icon( BITMAPS::zip ) );
211
213 .Name( "kicad.Control.unarchiveProject" )
214 .Scope( AS_GLOBAL )
215 .FriendlyName( _( "Unarchive Project..." ) )
216 .Tooltip( _( "Unarchive project files from zip archive" ) )
217 .Icon( BITMAPS::unzip ) );
218
220 .Name( "kicad.Control.OpenProjectDirectory" )
221 .Scope( AS_GLOBAL )
222#ifdef __APPLE__
223 .FriendlyName( _( "Reveal Project in Finder" ) )
224 .Tooltip( _( "Open project folder in Finder" ) )
225#else
226 .FriendlyName( _( "Browse Project Files" ) )
227 .Tooltip( _( "Open project directory in file explorer" ) )
228#endif
230
232 .Name( "kicad.Control.restoreLocalHistory" )
233 .Scope( AS_GLOBAL )
234 .FriendlyName( _( "Restore Project from Local History..." ) )
235 .Tooltip( _( "Restore project files from local history" ) )
237
239 .Name( "kicad.Control.showLocalHistory" )
240 .Scope( AS_GLOBAL )
241 .FriendlyName( _( "Local History" ) )
242 .Tooltip( _( "Show or hide local history panel" ) )
243 .Icon( BITMAPS::recent ) );
@ icon_bitmap2component_24
@ directory_browser
@ icon_modedit_24
@ new_project_from_template
@ icon_pcbcalculator_24
@ open_project_demo
@ icon_eeschema_24
@ icon_pagelayout_editor_24
@ restore_from_file
@ icon_gerbview_24
@ icon_libedit_24
static TOOL_ACTION viewDroppedGerbers
static TOOL_ACTION openDemoProject
static TOOL_ACTION unarchiveProject
static TOOL_ACTION loadProject
static TOOL_ACTION editOtherPCB
static TOOL_ACTION restoreLocalHistory
static TOOL_ACTION newProject
static TOOL_ACTION editOtherSch
static TOOL_ACTION showLocalHistory
static TOOL_ACTION editSchematic
static TOOL_ACTION openTextEditor
static TOOL_ACTION archiveProject
static TOOL_ACTION openProject
static TOOL_ACTION closeProject
static TOOL_ACTION convertImage
static TOOL_ACTION editDrawingSheet
static TOOL_ACTION openProjectDirectory
static TOOL_ACTION openJobsetFile
static TOOL_ACTION newJobsetFile
static TOOL_ACTION editFootprints
static TOOL_ACTION showPluginManager
static TOOL_ACTION showCalculator
static TOOL_ACTION viewGerbers
static TOOL_ACTION newFromRepository
static TOOL_ACTION editSymbols
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe.
Represent a single user action.
@ FRAME_PCB_EDITOR
Definition frame_type.h:38
@ FRAME_SCH_SYMBOL_EDITOR
Definition frame_type.h:31
@ FRAME_SCH
Definition frame_type.h:30
@ FRAME_FOOTPRINT_EDITOR
Definition frame_type.h:39
#define _(s)
@ AS_GLOBAL
Global action (toolbar/main menu event, global shortcut)
Definition tool_action.h:45
@ AF_NONE
Definition tool_action.h:51
@ MD_CTRL
Definition tool_event.h:140