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 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 new project from template" ) )
55
57 .Name( "kicad.Control.newFromRepository" )
58 .Scope( AS_GLOBAL )
59 .LegacyHotkeyName( "Clone Project From Repository" )
60 .FriendlyName( _( "Clone Project from Repository..." ) )
61 .Tooltip( _( "Clone a project from an existing repository" ) )
63
65 .Name( "kicad.Control.openDemoProject" )
66 .Scope( AS_GLOBAL )
67 .LegacyHotkeyName( "Open Demo Project" )
68 .FriendlyName( _( "Open Demo Project..." ) )
69 .Tooltip( _( "Open a demo project" ) )
71
73 .Name( "kicad.Control.openProject" )
74 .Scope( AS_GLOBAL )
75 .DefaultHotkey( MD_CTRL + 'O' )
76 .LegacyHotkeyName( "Open Project" )
77 .FriendlyName( _( "Open Project..." ) )
78 .Tooltip( _( "Open an existing project" ) )
79 .Icon( BITMAPS::open_project ) );
80
82 .Name( "kicad.Control.closeProject" )
83 .Scope( AS_GLOBAL )
84 .LegacyHotkeyName( "Close Project" )
85 .FriendlyName( _( "Close Project" ) )
86 .Tooltip( _( "Close the current project" ) )
87 .Icon( BITMAPS::project_close ) );
88
90 .Name( "kicad.Control.loadProject" )
91 .Scope( AS_GLOBAL )
92 .Parameter<wxString*>( nullptr ) ); // Default to no filename
93
95 .Name( "kicad.Control.viewDroppedGerbers" )
96 .Scope( AS_GLOBAL )
97 .Parameter<wxString*>( nullptr ) ); // Default to no filename
98
100 .Name( "kicad.Control.editSchematic" )
101 .Scope( AS_GLOBAL )
102 .DefaultHotkey( MD_CTRL + 'E' )
103 .LegacyHotkeyName( "Run Eeschema" )
104 .FriendlyName( _( "Schematic Editor" ) )
105 .Tooltip( _( "Edit schematic" ) )
107 .Flags( AF_NONE )
108 .Parameter( FRAME_SCH ) );
109
111 .Name( "kicad.Control.editSymbols" )
112 .Scope( AS_GLOBAL )
113 .DefaultHotkey( MD_CTRL + 'L' )
114 .LegacyHotkeyName( "Run LibEdit" )
115 .FriendlyName( _( "Symbol Editor" ) )
116 .Tooltip( _( "Edit schematic symbols" ) )
118 .Flags( AF_NONE )
119 .Parameter( FRAME_SCH_SYMBOL_EDITOR ) );
120
122 .Name( "kicad.Control.editPCB" )
123 .Scope( AS_GLOBAL )
124 .DefaultHotkey( MD_CTRL + 'P' )
125 .LegacyHotkeyName( "Run Pcbnew" )
126 .FriendlyName( _( "PCB Editor" ) )
127 .Tooltip( _( "Edit PCB" ) )
129 .Flags( AF_NONE )
130 .Parameter( FRAME_PCB_EDITOR ) );
131
133 .Name( "kicad.Control.editFootprints" )
134 .Scope( AS_GLOBAL )
135 .DefaultHotkey( MD_CTRL + 'F' )
136 .LegacyHotkeyName( "Run FpEditor" )
137 .FriendlyName( _( "Footprint Editor" ) )
138 .Tooltip( _( "Edit PCB footprints" ) )
140 .Flags( AF_NONE )
141 .Parameter( FRAME_FOOTPRINT_EDITOR ) );
142
144 .Name( "kicad.Control.viewGerbers" )
145 .Scope( AS_GLOBAL )
146 .DefaultHotkey( MD_CTRL + 'G' )
147 .LegacyHotkeyName( "Run Gerbview" )
148 .FriendlyName( _( "Gerber Viewer" ) )
149 .Tooltip( _( "Preview Gerber output files" ) )
151 .Parameter<wxString*>( nullptr ) ); // Default to no filename
152
154 .Name( "kicad.Control.convertImage" )
155 .Scope( AS_GLOBAL )
156 .DefaultHotkey( MD_CTRL + 'B' )
157 .LegacyHotkeyName( "Run Bitmap2Component" )
158 .FriendlyName( _( "Image Converter" ) )
159 .Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
161 .Parameter<wxString*>( nullptr ) ); // Default to no filename
162
164 .Name( "kicad.Control.showCalculator" )
165 .Scope( AS_GLOBAL )
166 .LegacyHotkeyName( "Run PcbCalculator" )
167 .FriendlyName( _( "Calculator Tools" ) )
168 .Tooltip( _( "Run component calculations, track width calculations, etc." ) )
170 .Parameter<wxString*>( nullptr ) ); // Default to no filename
171
173 .Name( "kicad.Control.editDrawingSheet" )
174 .Scope( AS_GLOBAL )
175 .DefaultHotkey( MD_CTRL + 'Y' )
176 .LegacyHotkeyName( "Run PlEditor" )
177 .FriendlyName( _( "Drawing Sheet Editor" ) )
178 .Tooltip( _( "Edit drawing sheet borders and title block" ) )
180 .Parameter<wxString*>( nullptr ) ); // Default to no filename
181
183 .Name( "kicad.Control.pluginContentManager" )
184 .Scope( AS_GLOBAL )
185 .DefaultHotkey( MD_CTRL + 'M' )
186 .FriendlyName( _( "Plugin and Content Manager" ) )
187 .Tooltip( _( "Run Plugin and Content Manager" ) )
188 .Icon( BITMAPS::icon_pcm_24 ) );
189
191 .Name( "kicad.Control.openTextEditor" )
192 .Scope( AS_GLOBAL )
193 .FriendlyName( _( "Open Text Editor" ) )
194 .Tooltip( _( "Launch preferred text editor" ) )
195 .Icon( BITMAPS::editor )
196 .Parameter<wxString*>( nullptr ) ); // Default to no filename
197
199 .Name( "kicad.Control.editOtherSch" )
200 .Scope( AS_GLOBAL )
201 .Parameter<wxString*>( nullptr ) ); // Default to no filename
202
204 .Name( "kicad.Control.editOtherPCB" )
205 .Scope( AS_GLOBAL )
206 .Parameter<wxString*>( nullptr ) ); // Default to no filename
@ icon_bitmap2component_24
@ icon_modedit_24
@ new_project_from_template
@ icon_pcbcalculator_24
@ 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 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