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, 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 <tool/tool_action.h>
26#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
39 .Name( "kicad.Control.newProject" )
40 .Scope( AS_GLOBAL )
41 .DefaultHotkey( MD_CTRL + 'N' )
42 .LegacyHotkeyName( "New Project" )
43 .FriendlyName( _( "New Project..." ) )
44 .Tooltip( _( "Create a new project based on an existing project" ) )
46
48 .Name( "kicad.Control.newFromRepository" )
49 .Scope( AS_GLOBAL )
50 .LegacyHotkeyName( "Clone Project From Repository" )
51 .FriendlyName( _( "Clone Project from Repository..." ) )
52 .Icon( BITMAPS::project_clone ) );
53
55 .Name( "kicad.Control.newJobs" )
56 .Scope( AS_GLOBAL )
57 .LegacyHotkeyName( "New Jobset File" )
58 .FriendlyName( _( "New Jobset File..." ) )
59 .Icon( BITMAPS::jobset ) );
60
62 .Name( "kicad.Control.openDemoProject" )
63 .Scope( AS_GLOBAL )
64 .LegacyHotkeyName( "Open Demo Project" )
65 .FriendlyName( _( "Open Demo Project..." ) )
67
69 .Name( "kicad.Control.openProject" )
70 .Scope( AS_GLOBAL )
71 .DefaultHotkey( MD_CTRL + 'O' )
72 .LegacyHotkeyName( "Open Project" )
73 .FriendlyName( _( "Open Project..." ) )
74 .Icon( BITMAPS::open_project ) );
75
77 .Name( "kicad.Control.openJobset" )
78 .Scope( AS_GLOBAL )
79 .LegacyHotkeyName( "Open Jobset File" )
80 .FriendlyName( _( "Open Jobset File..." ) )
81 .Icon( BITMAPS::jobset_open ) );
82
84 .Name( "kicad.Control.closeProject" )
85 .Scope( AS_GLOBAL )
86 .LegacyHotkeyName( "Close Project" )
87 .FriendlyName( _( "Close Project" ) )
88 .Icon( BITMAPS::project_close ) );
89
91 .Name( "kicad.Control.loadProject" )
92 .Scope( AS_GLOBAL )
93 .Parameter<wxString*>( nullptr ) ); // Default to no filename
94
96 .Name( "kicad.Control.viewDroppedGerbers" )
97 .Scope( AS_GLOBAL )
98 .Parameter<wxString*>( nullptr ) ); // Default to no filename
99
101 .Name( "kicad.Control.editSchematic" )
102 .Scope( AS_GLOBAL )
103 .DefaultHotkey( MD_CTRL + 'E' )
104 .LegacyHotkeyName( "Run Eeschema" )
105 .FriendlyName( _( "Schematic Editor" ) )
106 .Tooltip( _( "Edit schematic in schematic editor" ) )
108 .Flags( AF_NONE )
109 .Parameter( FRAME_SCH ) );
110
112 .Name( "kicad.Control.editSymbols" )
113 .Scope( AS_GLOBAL )
114 .DefaultHotkey( MD_CTRL + 'L' )
115 .LegacyHotkeyName( "Run LibEdit" )
116 .FriendlyName( _( "Symbol Editor" ) )
117 .Tooltip( _( "Create, delete and edit schematic symbols" ) )
119 .Flags( AF_NONE )
120 .Parameter( FRAME_SCH_SYMBOL_EDITOR ) );
121
123 .Name( "kicad.Control.editPCB" )
124 .Scope( AS_GLOBAL )
125 .DefaultHotkey( MD_CTRL + 'P' )
126 .LegacyHotkeyName( "Run Pcbnew" )
127 .FriendlyName( _( "PCB Editor" ) )
128 .Tooltip( _( "Edit PCB in PCB editor" ) )
130 .Flags( AF_NONE )
131 .Parameter( FRAME_PCB_EDITOR ) );
132
134 .Name( "kicad.Control.editFootprints" )
135 .Scope( AS_GLOBAL )
136 .DefaultHotkey( MD_CTRL + 'F' )
137 .LegacyHotkeyName( "Run FpEditor" )
138 .FriendlyName( _( "Footprint Editor" ) )
139 .Tooltip( _( "Create, delete and edit PCB footprints" ) )
141 .Flags( AF_NONE )
142 .Parameter( FRAME_FOOTPRINT_EDITOR ) );
143
145 .Name( "kicad.Control.viewGerbers" )
146 .Scope( AS_GLOBAL )
147 .DefaultHotkey( MD_CTRL + 'G' )
148 .LegacyHotkeyName( "Run Gerbview" )
149 .FriendlyName( _( "Gerber Viewer" ) )
150 .Tooltip( _( "Preview Gerber output files" ) )
152 .Parameter<wxString*>( nullptr ) ); // Default to no filename
153
155 .Name( "kicad.Control.convertImage" )
156 .Scope( AS_GLOBAL )
157 .DefaultHotkey( MD_CTRL + 'B' )
158 .LegacyHotkeyName( "Run Bitmap2Component" )
159 .FriendlyName( _( "Image Converter" ) )
160 .Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
162 .Parameter<wxString*>( nullptr ) ); // Default to no filename
163
165 .Name( "kicad.Control.showCalculator" )
166 .Scope( AS_GLOBAL )
167 .LegacyHotkeyName( "Run PcbCalculator" )
168 .FriendlyName( _( "Calculator Tools" ) )
169 .Tooltip( _( "Run component calculations, track width calculations, etc." ) )
171 .Parameter<wxString*>( nullptr ) ); // Default to no filename
172
174 .Name( "kicad.Control.editDrawingSheet" )
175 .Scope( AS_GLOBAL )
176 .DefaultHotkey( MD_CTRL + 'Y' )
177 .LegacyHotkeyName( "Run PlEditor" )
178 .FriendlyName( _( "Drawing Sheet Editor" ) )
179 .Tooltip( _( "Edit drawing sheet borders and title block" ) )
181 .Parameter<wxString*>( nullptr ) ); // Default to no filename
182
184 .Name( "kicad.Control.pluginContentManager" )
185 .Scope( AS_GLOBAL )
186 .DefaultHotkey( MD_CTRL + 'M' )
187 .FriendlyName( _( "Plugin and Content Manager" ) )
188 .Tooltip( _( "Run Plugin and Content Manager" ) )
189 .Icon( BITMAPS::icon_pcm_24 ) );
190
192 .Name( "kicad.Control.openTextEditor" )
193 .Scope( AS_GLOBAL )
194 .FriendlyName( _( "Open Text Editor" ) )
195 .Tooltip( _( "Launch preferred text editor" ) )
196 .Icon( BITMAPS::editor )
197 .Parameter<wxString*>( nullptr ) ); // Default to no filename
198
200 .Name( "kicad.Control.editOtherSch" )
201 .Scope( AS_GLOBAL )
202 .Parameter<wxString*>( nullptr ) ); // Default to no filename
203
205 .Name( "kicad.Control.editOtherPCB" )
206 .Scope( AS_GLOBAL )
207 .Parameter<wxString*>( nullptr ) ); // Default to no filename
208
210 .Name( "kicad.Control.archiveProject" )
211 .Scope( AS_GLOBAL )
212 .FriendlyName( _( "Archive Project..." ) )
213 .Tooltip( _( "Archive all project files" ) )
214 .Icon( BITMAPS::zip ) );
215
217 .Name( "kicad.Control.unarchiveProject" )
218 .Scope( AS_GLOBAL )
219 .FriendlyName( _( "Unarchive Project..." ) )
220 .Tooltip( _( "Unarchive project files from zip archive" ) )
221 .Icon( BITMAPS::unzip ) );
222
224 .Name( "kicad.Control.OpenProjectDirectory" )
225 .Scope( AS_GLOBAL )
226 .FriendlyName( _( "Browse Project Files" ) )
227#ifdef __APPLE__
228 .Tooltip( _( "Reveal project folder in Finder" ) )
229#else
230 .Tooltip( _( "Open project directory in file explorer" ) )
231#endif
@ 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
@ 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 newProject
static TOOL_ACTION editOtherSch
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:42
@ FRAME_SCH_SYMBOL_EDITOR
Definition frame_type.h:35
@ FRAME_SCH
Definition frame_type.h:34
@ FRAME_FOOTPRINT_EDITOR
Definition frame_type.h:43
#define _(s)
@ AS_GLOBAL
Global action (toolbar/main menu event, global shortcut)
Definition tool_action.h:49
@ AF_NONE
Definition tool_action.h:55
@ MD_CTRL
Definition tool_event.h:144