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 (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 <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, blank project" ) )
45 .Icon( BITMAPS::new_project ) );
46
48 .Name( "kicad.Control.newFromTemplate" )
49 .Scope( AS_GLOBAL )
50 .DefaultHotkey( MD_CTRL + 'T' )
51 .LegacyHotkeyName( "New Project From Template" )
52 .FriendlyName( _( "New Project from Template..." ) )
53 .Tooltip( _( "Create a new project based on an existing project" ) )
55
57 .Name( "kicad.Control.newFromRepository" )
58 .Scope( AS_GLOBAL )
59 .LegacyHotkeyName( "Clone Project From Repository" )
60 .FriendlyName( _( "Clone Project from Repository..." ) )
62
64 .Name( "kicad.Control.newJobs" )
65 .Scope( AS_GLOBAL )
66 .LegacyHotkeyName( "New Jobset File" )
67 .FriendlyName( _( "New Jobset File..." ) )
68 .Icon( BITMAPS::new_document ) );
69
71 .Name( "kicad.Control.openDemoProject" )
72 .Scope( AS_GLOBAL )
73 .LegacyHotkeyName( "Open Demo Project" )
74 .FriendlyName( _( "Open Demo Project..." ) )
76
78 .Name( "kicad.Control.openProject" )
79 .Scope( AS_GLOBAL )
80 .DefaultHotkey( MD_CTRL + 'O' )
81 .LegacyHotkeyName( "Open Project" )
82 .FriendlyName( _( "Open Project..." ) )
83 .Icon( BITMAPS::open_project ) );
84
86 .Name( "kicad.Control.closeProject" )
87 .Scope( AS_GLOBAL )
88 .LegacyHotkeyName( "Close Project" )
89 .FriendlyName( _( "Close Project" ) )
90 .Icon( BITMAPS::project_close ) );
91
93 .Name( "kicad.Control.loadProject" )
94 .Scope( AS_GLOBAL )
95 .Parameter<wxString*>( nullptr ) ); // Default to no filename
96
98 .Name( "kicad.Control.viewDroppedGerbers" )
99 .Scope( AS_GLOBAL )
100 .Parameter<wxString*>( nullptr ) ); // Default to no filename
101
103 .Name( "kicad.Control.editSchematic" )
104 .Scope( AS_GLOBAL )
105 .DefaultHotkey( MD_CTRL + 'E' )
106 .LegacyHotkeyName( "Run Eeschema" )
107 .FriendlyName( _( "Schematic Editor" ) )
108 .Tooltip( _( "Edit schematic in schematic editor" ) )
110 .Flags( AF_NONE )
111 .Parameter( FRAME_SCH ) );
112
114 .Name( "kicad.Control.editSymbols" )
115 .Scope( AS_GLOBAL )
116 .DefaultHotkey( MD_CTRL + 'L' )
117 .LegacyHotkeyName( "Run LibEdit" )
118 .FriendlyName( _( "Symbol Editor" ) )
119 .Tooltip( _( "Create, delete and edit schematic symbols" ) )
121 .Flags( AF_NONE )
122 .Parameter( FRAME_SCH_SYMBOL_EDITOR ) );
123
125 .Name( "kicad.Control.editPCB" )
126 .Scope( AS_GLOBAL )
127 .DefaultHotkey( MD_CTRL + 'P' )
128 .LegacyHotkeyName( "Run Pcbnew" )
129 .FriendlyName( _( "PCB Editor" ) )
130 .Tooltip( _( "Edit PCB in PCB editor" ) )
132 .Flags( AF_NONE )
133 .Parameter( FRAME_PCB_EDITOR ) );
134
136 .Name( "kicad.Control.editFootprints" )
137 .Scope( AS_GLOBAL )
138 .DefaultHotkey( MD_CTRL + 'F' )
139 .LegacyHotkeyName( "Run FpEditor" )
140 .FriendlyName( _( "Footprint Editor" ) )
141 .Tooltip( _( "Create, delete and edit PCB footprints" ) )
143 .Flags( AF_NONE )
144 .Parameter( FRAME_FOOTPRINT_EDITOR ) );
145
147 .Name( "kicad.Control.viewGerbers" )
148 .Scope( AS_GLOBAL )
149 .DefaultHotkey( MD_CTRL + 'G' )
150 .LegacyHotkeyName( "Run Gerbview" )
151 .FriendlyName( _( "Gerber Viewer" ) )
152 .Tooltip( _( "Preview Gerber output files" ) )
154 .Parameter<wxString*>( nullptr ) ); // Default to no filename
155
157 .Name( "kicad.Control.convertImage" )
158 .Scope( AS_GLOBAL )
159 .DefaultHotkey( MD_CTRL + 'B' )
160 .LegacyHotkeyName( "Run Bitmap2Component" )
161 .FriendlyName( _( "Image Converter" ) )
162 .Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
164 .Parameter<wxString*>( nullptr ) ); // Default to no filename
165
167 .Name( "kicad.Control.showCalculator" )
168 .Scope( AS_GLOBAL )
169 .LegacyHotkeyName( "Run PcbCalculator" )
170 .FriendlyName( _( "Calculator Tools" ) )
171 .Tooltip( _( "Run component calculations, track width calculations, etc." ) )
173 .Parameter<wxString*>( nullptr ) ); // Default to no filename
174
176 .Name( "kicad.Control.editDrawingSheet" )
177 .Scope( AS_GLOBAL )
178 .DefaultHotkey( MD_CTRL + 'Y' )
179 .LegacyHotkeyName( "Run PlEditor" )
180 .FriendlyName( _( "Drawing Sheet Editor" ) )
181 .Tooltip( _( "Edit drawing sheet borders and title block" ) )
183 .Parameter<wxString*>( nullptr ) ); // Default to no filename
184
186 .Name( "kicad.Control.pluginContentManager" )
187 .Scope( AS_GLOBAL )
188 .DefaultHotkey( MD_CTRL + 'M' )
189 .FriendlyName( _( "Plugin and Content Manager" ) )
190 .Tooltip( _( "Run Plugin and Content Manager" ) )
191 .Icon( BITMAPS::icon_pcm_24 ) );
192
194 .Name( "kicad.Control.openTextEditor" )
195 .Scope( AS_GLOBAL )
196 .FriendlyName( _( "Open Text Editor" ) )
197 .Tooltip( _( "Launch preferred text editor" ) )
198 .Icon( BITMAPS::editor )
199 .Parameter<wxString*>( nullptr ) ); // Default to no filename
200
202 .Name( "kicad.Control.editOtherSch" )
203 .Scope( AS_GLOBAL )
204 .Parameter<wxString*>( nullptr ) ); // Default to no filename
205
207 .Name( "kicad.Control.editOtherPCB" )
208 .Scope( AS_GLOBAL )
209 .Parameter<wxString*>( nullptr ) ); // Default to no filename
@ icon_bitmap2component_24
@ icon_modedit_24
@ new_project_from_template
@ icon_pcbcalculator_24
@ new_document
@ icon_pcbnew_24
@ open_project_demo
@ icon_eeschema_24
@ open_project
@ project_close
@ icon_pagelayout_editor_24
@ icon_gerbview_24
@ icon_libedit_24
static TOOL_ACTION viewDroppedGerbers
static TOOL_ACTION openDemoProject
static TOOL_ACTION editPCB
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 openProject
static TOOL_ACTION closeProject
static TOOL_ACTION convertImage
static TOOL_ACTION editDrawingSheet
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 newFromTemplate
static TOOL_ACTION editSymbols
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe.
Definition: tool_action.h:102
Represent a single user action.
Definition: tool_action.h:269
@ 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:48
@ AF_NONE
Definition: tool_action.h:54
@ MD_CTRL
Definition: tool_event.h:143