2019-06-17 01:34:21 +01:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2023-11-08 21:34:14 +00:00
|
|
|
* Copyright (C) 2019-2023 CERN
|
2019-06-17 01:34:21 +01:00
|
|
|
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <tool/tool_action.h>
|
|
|
|
#include <bitmaps.h>
|
|
|
|
#include <tools/kicad_manager_actions.h>
|
2019-06-17 23:02:30 +01:00
|
|
|
#include <frame_type.h>
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
// Actions, being statically-defined, require specialized I18N handling. We continue to
|
|
|
|
// use the _() macro so that string harvesting by the I18N framework doesn't have to be
|
|
|
|
// specialized, but we don't translate on initialization and instead do it in the getters.
|
|
|
|
|
|
|
|
#undef _
|
|
|
|
#define _(s) s
|
|
|
|
|
2022-09-26 23:57:17 +01:00
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.newProject" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'N' )
|
|
|
|
.LegacyHotkeyName( "New Project" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "New Project..." ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Create new blank project" ) )
|
|
|
|
.Icon( BITMAPS::new_project ) );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.newFromTemplate" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'T' )
|
|
|
|
.LegacyHotkeyName( "New Project From Template" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "New Project from Template..." ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Create new project from template" ) )
|
|
|
|
.Icon( BITMAPS::new_project_from_template ) );
|
|
|
|
|
2023-09-14 14:39:42 -07:00
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromRepository( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.newFromRepository" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.LegacyHotkeyName( "Clone Project From Repository" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Clone Project from Repository..." ) )
|
2023-09-14 14:39:42 -07:00
|
|
|
.Tooltip( _( "Clone a project from an existing repository" ) )
|
|
|
|
.Icon( BITMAPS::new_project_from_template ) );
|
|
|
|
|
2022-09-26 23:57:17 +01:00
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::openDemoProject( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.openDemoProject" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.LegacyHotkeyName( "Open Demo Project" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Open Demo Project..." ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Open a demo project" ) )
|
|
|
|
.Icon( BITMAPS::open_project_demo ) );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.openProject" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'O' )
|
|
|
|
.LegacyHotkeyName( "Open Project" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Open Project..." ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Open an existing project" ) )
|
|
|
|
.Icon( BITMAPS::open_project ) );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::closeProject( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.closeProject" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.LegacyHotkeyName( "Close Project" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Close Project" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Close the current project" ) )
|
|
|
|
.Icon( BITMAPS::project_close ) );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::loadProject( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.loadProject" )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewDroppedGerbers( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.viewDroppedGerbers" )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editSchematic" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'E' )
|
|
|
|
.LegacyHotkeyName( "Run Eeschema" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Schematic Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Edit schematic" ) )
|
|
|
|
.Icon( BITMAPS::icon_eeschema_24 )
|
|
|
|
.Flags( AF_NONE )
|
2022-09-28 03:09:03 +01:00
|
|
|
.Parameter( FRAME_SCH ) );
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editSymbols" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'L' )
|
|
|
|
.LegacyHotkeyName( "Run LibEdit" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Symbol Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Edit schematic symbols" ) )
|
|
|
|
.Icon( BITMAPS::icon_libedit_24 )
|
|
|
|
.Flags( AF_NONE )
|
2022-09-28 03:09:03 +01:00
|
|
|
.Parameter( FRAME_SCH_SYMBOL_EDITOR ) );
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editPCB" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'P' )
|
|
|
|
.LegacyHotkeyName( "Run Pcbnew" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "PCB Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Edit PCB" ) )
|
|
|
|
.Icon( BITMAPS::icon_pcbnew_24 )
|
|
|
|
.Flags( AF_NONE )
|
2022-09-28 03:09:03 +01:00
|
|
|
.Parameter( FRAME_PCB_EDITOR ) );
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editFootprints" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'F' )
|
|
|
|
.LegacyHotkeyName( "Run FpEditor" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Footprint Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Edit PCB footprints" ) )
|
|
|
|
.Icon( BITMAPS::icon_modedit_24 )
|
|
|
|
.Flags( AF_NONE )
|
2022-09-28 03:09:03 +01:00
|
|
|
.Parameter( FRAME_FOOTPRINT_EDITOR ) );
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.viewGerbers" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'G' )
|
|
|
|
.LegacyHotkeyName( "Run Gerbview" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Gerber Viewer" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Preview Gerber output files" ) )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Icon( BITMAPS::icon_gerbview_24 )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.convertImage" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'B' )
|
|
|
|
.LegacyHotkeyName( "Run Bitmap2Component" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Image Converter" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Convert bitmap images to schematic or PCB components" ) )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Icon( BITMAPS::icon_bitmap2component_24 )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.showCalculator" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.LegacyHotkeyName( "Run PcbCalculator" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Calculator Tools" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Run component calculations, track width calculations, etc." ) )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Icon( BITMAPS::icon_pcbcalculator_24 )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editDrawingSheet( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editDrawingSheet" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'Y' )
|
|
|
|
.LegacyHotkeyName( "Run PlEditor" )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Drawing Sheet Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Edit drawing sheet borders and title block" ) )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Icon( BITMAPS::icon_pagelayout_editor_24 )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::showPluginManager( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.pluginContentManager" )
|
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.DefaultHotkey( MD_CTRL + 'M' )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Plugin and Content Manager" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Run Plugin and Content Manager" ) )
|
|
|
|
.Icon( BITMAPS::icon_pcm_24 ) );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.openTextEditor" )
|
|
|
|
.Scope( AS_GLOBAL )
|
2023-10-27 23:40:35 +01:00
|
|
|
.FriendlyName( _( "Open Text Editor" ) )
|
2022-09-26 23:57:17 +01:00
|
|
|
.Tooltip( _( "Launch preferred text editor" ) )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Icon( BITMAPS::editor )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editOtherSch" )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|
2022-09-26 23:57:17 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( TOOL_ACTION_ARGS()
|
|
|
|
.Name( "kicad.Control.editOtherPCB" )
|
2022-09-29 03:16:00 +01:00
|
|
|
.Scope( AS_GLOBAL )
|
|
|
|
.Parameter<wxString*>( nullptr ) ); // Default to no filename
|