Implement I18N for ACTIONs.

It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro.  We do still want it in the
code, however, because the string harvesting is based off of it.

Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
This commit is contained in:
Jeff Young 2019-06-17 01:34:21 +01:00
parent 418bd28347
commit e6d5110ccf
59 changed files with 2303 additions and 1992 deletions

View File

@ -0,0 +1,129 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2017-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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include <tool/tool_manager.h>
#include <bitmaps.h>
#include "3d_actions.h"
// 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
TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( "3DViewer.Control.pivotCenter",
AS_GLOBAL,
' ', "",
"Center pivot rotation (Middle mouse click)" );
TOOL_ACTION EDA_3D_ACTIONS::moveLeft( "3DViewer.Control.moveLeft",
AS_GLOBAL,
WXK_LEFT, "",
"Move board Left" );
TOOL_ACTION EDA_3D_ACTIONS::moveRight( "3DViewer.Control.moveRight",
AS_GLOBAL,
WXK_RIGHT, "",
"Move board Right" );
TOOL_ACTION EDA_3D_ACTIONS::moveUp( "3DViewer.Control.moveUp",
AS_GLOBAL,
WXK_UP, "",
"Move board Up" );
TOOL_ACTION EDA_3D_ACTIONS::moveDown( "3DViewer.Control.moveDown",
AS_GLOBAL,
WXK_DOWN, "",
"Move board Down" );
TOOL_ACTION EDA_3D_ACTIONS::homeView( "3DViewer.Control.homeView",
AS_GLOBAL,
WXK_HOME, "",
"Home view" );
TOOL_ACTION EDA_3D_ACTIONS::resetView( "3DViewer.Control.resetView",
AS_GLOBAL,
'R', "",
"Reset view" );
TOOL_ACTION EDA_3D_ACTIONS::viewFront( "3DViewer.Control.viewFront",
AS_GLOBAL,
'Y', "",
"View Front" );
TOOL_ACTION EDA_3D_ACTIONS::viewBack( "3DViewer.Control.viewBack",
AS_GLOBAL,
MD_SHIFT + 'Y', "",
"View Back" );
TOOL_ACTION EDA_3D_ACTIONS::viewLeft( "3DViewer.Control.viewLeft",
AS_GLOBAL,
MD_SHIFT + 'X', "",
"View Left" );
TOOL_ACTION EDA_3D_ACTIONS::viewRight( "3DViewer.Control.viewRight",
AS_GLOBAL,
'X', "",
"View Right" );
TOOL_ACTION EDA_3D_ACTIONS::viewTop( "3DViewer.Control.viewTop",
AS_GLOBAL,
'Z', "",
"View Top" );
TOOL_ACTION EDA_3D_ACTIONS::viewBottom( "3DViewer.Control.viewBottom",
AS_GLOBAL,
MD_SHIFT + 'Z', "",
"View Bottom" );
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
AS_GLOBAL,
WXK_TAB, "",
"Rotate 45 degrees over Z axis" );
TOOL_ACTION EDA_3D_ACTIONS::zoomIn( "3DViewer.Control.zoomIn",
AS_GLOBAL,
WXK_F1, "",
"Zoom in " );
TOOL_ACTION EDA_3D_ACTIONS::zoomOut( "3DViewer.Control.zoomOut",
AS_GLOBAL,
WXK_F2, "",
"Zoom out" );
TOOL_ACTION EDA_3D_ACTIONS::attributesTHT( "3DViewer.Control.attributesTHT",
AS_GLOBAL,
'T', "",
"Toggle 3D models with type Through Hole" );
TOOL_ACTION EDA_3D_ACTIONS::attributesSMD( "3DViewer.Control.attributesSMD",
AS_GLOBAL,
'S', "",
"Toggle 3D models with type Surface Mount" );
TOOL_ACTION EDA_3D_ACTIONS::attributesVirtual( "3DViewer.Control.attributesVirtual",
AS_GLOBAL,
'V', "",
"Toggle 3D models with type Virtual" );

View File

@ -37,64 +37,6 @@
#include "help_common_strings.h"
TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( "3DViewer.Control.pivotCenter", AS_GLOBAL,
' ', "", "Center pivot rotation (Middle mouse click)" );
TOOL_ACTION EDA_3D_ACTIONS::moveLeft( "3DViewer.Control.moveLeft", AS_GLOBAL,
WXK_LEFT, "", "Move board Left" );
TOOL_ACTION EDA_3D_ACTIONS::moveRight( "3DViewer.Control.moveRight", AS_GLOBAL,
WXK_RIGHT, "", "Move board Right" );
TOOL_ACTION EDA_3D_ACTIONS::moveUp( "3DViewer.Control.moveUp", AS_GLOBAL,
WXK_UP, "", "Move board Up" );
TOOL_ACTION EDA_3D_ACTIONS::moveDown( "3DViewer.Control.moveDown", AS_GLOBAL,
WXK_DOWN, "", "Move board Down" );
TOOL_ACTION EDA_3D_ACTIONS::homeView( "3DViewer.Control.homeView", AS_GLOBAL,
WXK_HOME, "", "Home view" );
TOOL_ACTION EDA_3D_ACTIONS::resetView( "3DViewer.Control.resetView", AS_GLOBAL,
'R', "", "Reset view" );
TOOL_ACTION EDA_3D_ACTIONS::viewFront( "3DViewer.Control.viewFront", AS_GLOBAL,
'Y', "", "View Front" );
TOOL_ACTION EDA_3D_ACTIONS::viewBack( "3DViewer.Control.viewBack", AS_GLOBAL,
MD_SHIFT + 'Y', "", "View Back" );
TOOL_ACTION EDA_3D_ACTIONS::viewLeft( "3DViewer.Control.viewLeft", AS_GLOBAL,
MD_SHIFT + 'X', "", "View Left" );
TOOL_ACTION EDA_3D_ACTIONS::viewRight( "3DViewer.Control.viewRight", AS_GLOBAL,
'X', "", "View Right" );
TOOL_ACTION EDA_3D_ACTIONS::viewTop( "3DViewer.Control.viewTop", AS_GLOBAL,
'Z', "", "View Top" );
TOOL_ACTION EDA_3D_ACTIONS::viewBottom( "3DViewer.Control.viewBottom", AS_GLOBAL,
MD_SHIFT + 'Z', "", "View Bottom" );
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ", AS_GLOBAL,
WXK_TAB, "", "Rotate 45 degrees over Z axis" );
TOOL_ACTION EDA_3D_ACTIONS::zoomIn( "3DViewer.Control.zoomIn", AS_GLOBAL,
WXK_F1, "", "Zoom in " );
TOOL_ACTION EDA_3D_ACTIONS::zoomOut( "3DViewer.Control.zoomOut", AS_GLOBAL,
WXK_F2, "", "Zoom out" );
TOOL_ACTION EDA_3D_ACTIONS::attributesTHT( "3DViewer.Control.attributesTHT", AS_GLOBAL,
'T', "", "Toggle 3D models with type Through Hole" );
TOOL_ACTION EDA_3D_ACTIONS::attributesSMD( "3DViewer.Control.attributesSMD", AS_GLOBAL,
'S', "", "Toggle 3D models with type Surface Mount" );
TOOL_ACTION EDA_3D_ACTIONS::attributesVirtual( "3DViewer.Control.attributesVirtual", AS_GLOBAL,
'V', "", "Toggle 3D models with type Virtual" );
void EDA_3D_VIEWER::CreateMenuBar()
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CreateMenuBar" );

View File

@ -87,6 +87,7 @@ set(3D-VIEWER_SRCS
3d_rendering/cpostshader.cpp
3d_rendering/cpostshader_ssao.cpp
3d_rendering/ctrack_ball.cpp
3d_viewer/3d_actions.cpp
3d_viewer/3d_menubar.cpp
3d_rendering/test_cases.cpp
3d_rendering/trackball.cpp

View File

@ -75,6 +75,8 @@ static const wxChar traceEnvVars[] = wxT( "KIENVVARS" );
* must be called when a language name must be displayed after translation.
* Do not change this behavior, because m_Lang_Label is also used as key in config
*/
#undef _
#define _(s) s
LANGUAGE_DESCR LanguagesList[] =
{
{ wxLANGUAGE_DEFAULT, ID_LANGUAGE_DEFAULT, lang_def_xpm, _( "Default" ) },
@ -104,6 +106,8 @@ LANGUAGE_DESCR LanguagesList[] =
{ wxLANGUAGE_LITHUANIAN, ID_LANGUAGE_LITHUANIAN, lang_lt_xpm, _( "Lithuanian" ) },
{ 0, 0, lang_def_xpm, "" } // Sentinel
};
#undef _
#define _(s) wxGetTranslation((s))
FILE_HISTORY::FILE_HISTORY( size_t aMaxFiles, int aBaseFileId ) :

View File

@ -25,7 +25,13 @@
#include <tool/actions.h>
#include <bitmaps.h>
// These members are static in class ACTIONS: Build them here:
// 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
TOOL_ACTION ACTIONS::doNew( "common.Control.new",
AS_GLOBAL,

View File

@ -66,10 +66,27 @@ TOOL_ACTION::~TOOL_ACTION()
}
wxString TOOL_ACTION::GetLabel() const
{
return wxGetTranslation( m_label );
}
wxString TOOL_ACTION::GetMenuItem() const
{
return AddHotkeyName( wxGetTranslation( m_label ), m_hotKey, IS_HOTKEY );
}
wxString TOOL_ACTION::GetDescription() const
{
return wxGetTranslation( m_tooltip );
}
void TOOL_ACTION::SetHotKey( int aKeycode )
{
m_hotKey = aKeycode;
m_menuItem = AddHotkeyName( m_label, m_hotKey, IS_HOTKEY );
}

View File

@ -45,6 +45,7 @@ set( CVPCB_SRCS
menubar.cpp
readwrite_dlgs.cpp
toolbars_cvpcb.cpp
tools/cvpcb_actions.cpp
tools/cvpcb_control.cpp
tools/cvpcb_selection_tool.cpp
)

View File

@ -0,0 +1,40 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2017-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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include <tool/tool_manager.h>
#include <bitmaps.h>
#include "cvpcb_actions.h"
// 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
// CVPCB_SELECTION_TOOL
//
TOOL_ACTION CVPCB_ACTIONS::selectionActivate( "cvpcb.InteractiveSelection",
AS_GLOBAL, 0, "",
"", "", NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere

View File

@ -31,11 +31,6 @@ using namespace std::placeholders;
#include <cvpcb_id.h>
TOOL_ACTION CVPCB_ACTIONS::selectionActivate( "cvpcb.InteractiveSelection",
AS_GLOBAL, 0, "",
"", "", NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
CVPCB_SELECTION_TOOL::CVPCB_SELECTION_TOOL() :
TOOL_INTERACTIVE( "cvpcb.InteractiveSelection" ),
m_frame( nullptr )

View File

@ -130,7 +130,6 @@ set( EESCHEMA_SRCS
sch_painter.cpp
annotate.cpp
autoplace_fields.cpp
tools/backanno.cpp
bus_alias.cpp
bus-wire-junction.cpp
class_libentry.cpp
@ -221,6 +220,8 @@ set( EESCHEMA_SRCS
netlist_exporters/netlist_exporter_orcadpcb2.cpp
netlist_exporters/netlist_exporter_pspice.cpp
tools/backanno.cpp
tools/ee_actions.cpp
tools/ee_inspection_tool.cpp
tools/ee_picker_tool.cpp
tools/ee_point_editor.cpp

View File

@ -0,0 +1,672 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* 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/ee_actions.h>
// 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
// EE_INSPECTION_TOOL
//
TOOL_ACTION EE_ACTIONS::runERC( "eeschema.InspectionTool.runERC",
AS_GLOBAL, 0, "",
_( "Electrical Rules &Checker" ), _( "Perform electrical rules check" ),
erc_xpm );
TOOL_ACTION EE_ACTIONS::runSimulation( "eeschema.EditorControl.runSimulation",
AS_GLOBAL, 0, "",
_( "Simulator..." ), _( "Simulate circuit in SPICE" ),
simulator_xpm );
TOOL_ACTION EE_ACTIONS::showDatasheet( "eeschema.InspectionTool.showDatasheet",
AS_GLOBAL,
'D', LEGACY_HK_NAME( "Show Datasheet" ),
_( "Show Datasheet" ), _( "Opens the datasheet in a browser" ),
datasheet_xpm );
TOOL_ACTION EE_ACTIONS::showMarkerInfo( "eeschema.InspectionTool.showMarkerInfo",
AS_GLOBAL, 0, "",
_( "Show Marker Info" ), _( "Display the marker's info in a dialog" ),
info_xpm );
// EE_PICKER
//
TOOL_ACTION EE_ACTIONS::pickerTool( "eeschema.InteractivePicker",
AS_GLOBAL, 0, "", "", "", NULL, AF_ACTIVATE );
// EE_POINT_EDITOR
//
TOOL_ACTION EE_ACTIONS::pointEditorAddCorner( "eeschema.PointEditor.addCorner",
AS_GLOBAL, 0, "",
_( "Create Corner" ), _( "Create a corner" ),
add_corner_xpm );
TOOL_ACTION EE_ACTIONS::pointEditorRemoveCorner( "eeschema.PointEditor.removeCorner",
AS_GLOBAL, 0, "",
_( "Remove Corner" ), _( "Remove corner" ),
delete_xpm );
// EE_SELECTION_TOOL
//
TOOL_ACTION EE_ACTIONS::selectionActivate( "eeschema.InteractiveSelection",
AS_GLOBAL, 0, "", "", "", // No description, not shown anywhere
nullptr, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::selectNode( "eeschema.InteractiveSelection.SelectNode",
AS_GLOBAL,
MD_ALT + '3', LEGACY_HK_NAME( "Select Node" ),
_( "Select Node" ), _( "Select a connection item under the cursor" ) );
TOOL_ACTION EE_ACTIONS::selectConnection( "eeschema.InteractiveSelection.SelectConnection",
AS_GLOBAL,
MD_ALT + '4', LEGACY_HK_NAME( "Select Connection" ),
_( "Select Connection" ), _( "Select a complete connection" ) );
TOOL_ACTION EE_ACTIONS::selectionMenu( "eeschema.InteractiveSelection.SelectionMenu",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::addItemToSel( "eeschema.InteractiveSelection.AddItemToSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::addItemsToSel( "eeschema.InteractiveSelection.AddItemsToSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::removeItemFromSel( "eeschema.InteractiveSelection.RemoveItemFromSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::removeItemsFromSel( "eeschema.InteractiveSelection.RemoveItemsFromSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::clearSelection( "eeschema.InteractiveSelection.ClearSelection",
AS_GLOBAL );
// LIB_CONTROL
//
TOOL_ACTION EE_ACTIONS::newSymbol( "eeschema.SymbolLibraryControl.newSymbol",
AS_GLOBAL, 0, "",
_( "New Symbol..." ), _( "Create a new symbol" ),
new_component_xpm );
TOOL_ACTION EE_ACTIONS::editSymbol( "eeschema.SymbolLibraryControl.editSymbol",
AS_GLOBAL, 0, "",
_( "Edit Symbol" ), _( "Show selected symbol on editor canvas" ),
edit_xpm );
TOOL_ACTION EE_ACTIONS::duplicateSymbol( "eeschema.SymbolLibraryControl.duplicateSymbol",
AS_GLOBAL, 0, "",
_( "Duplicate Symbol" ), _( "Make a copy of the selected symbol" ),
duplicate_xpm );
TOOL_ACTION EE_ACTIONS::deleteSymbol( "eeschema.SymbolLibraryControl.deleteSymbol",
AS_GLOBAL, 0, "",
_( "Delete Symbol" ), _( "Remove the selected symbol from its library" ),
delete_xpm );
TOOL_ACTION EE_ACTIONS::cutSymbol( "eeschema.SymbolLibraryControl.cutSymbol",
AS_GLOBAL, 0, "",
_( "Cut Symbol" ), "",
cut_xpm );
TOOL_ACTION EE_ACTIONS::copySymbol( "eeschema.SymbolLibraryControl.copySymbol",
AS_GLOBAL, 0, "",
_( "Copy Symbol" ), "",
copy_xpm );
TOOL_ACTION EE_ACTIONS::pasteSymbol( "eeschema.SymbolLibraryControl.pasteSymbol",
AS_GLOBAL, 0, "",
_( "Paste Symbol" ), "",
paste_xpm );
TOOL_ACTION EE_ACTIONS::importSymbol( "eeschema.SymbolLibraryControl.importSymbol",
AS_GLOBAL, 0, "",
_( "Import Symbol..." ), _( "Import a symbol to the current library" ),
import_part_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbol( "eeschema.SymbolLibraryControl.exportSymbol",
AS_GLOBAL, 0, "",
_( "Export Symbol..." ), _( "Export a symbol to a new library file" ),
export_part_xpm );
TOOL_ACTION EE_ACTIONS::addSymbolToSchematic( "eeschema.SymbolLibraryControl.addSymbolToSchematic",
AS_GLOBAL, 0, "",
_( "Add Symbol to Schematic" ), _( "Add Symbol to Schematic" ),
export_xpm );
TOOL_ACTION EE_ACTIONS::showElectricalTypes( "eeschema.SymbolLibraryControl.showElectricalTypes",
AS_GLOBAL, 0, "",
_( "Show Pin Electrical Types" ), _( "Annotate pins with their electrical types" ),
pin_show_etype_xpm );
TOOL_ACTION EE_ACTIONS::showComponentTree( "eeschema.SymbolLibraryControl.showComponentTree",
AS_GLOBAL, 0, "",
_( "Show Symbol Tree" ), "",
search_tree_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbolView( "eeschema.SymbolLibraryControl.exportSymbolView",
AS_GLOBAL, 0, "",
_( "Export View as PNG..." ), _( "Create PNG file from the current view" ),
plot_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbolAsSVG( "eeschema.SymbolLibraryControl.exportSymbolAsSVG",
AS_GLOBAL, 0, "",
_( "Export Symbol as SVG..." ), _( "Create SVG file from the current symbol" ),
plot_svg_xpm );
TOOL_ACTION EE_ACTIONS::toggleSyncedPinsMode( "eeschema.SymbolLibraryControl.toggleSyncedPinsMode",
AS_GLOBAL, 0, "",
_( "Synchronized Pins Edit Mode" ),
_( "Synchronized Pins Edit Mode\n"
"When enabled propagates all changes (except pin numbers) to other units.\n"
"Enabled by default for multiunit parts with interchangeable units." ),
pin2pin_xpm );
// LIB_DRAWING_TOOLS
//
TOOL_ACTION EE_ACTIONS::placeSymbolPin( "eeschema.SymbolDrawing.placeSymbolPin",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Create Pin" ),
_( "Add Pin" ), _( "Add a pin" ),
pin_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSymbolText( "eeschema.SymbolDrawing.placeSymbolText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolRectangle( "eeschema.SymbolDrawing.drawSymbolRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolCircle( "eeschema.SymbolDrawing.drawSymbolCircle",
AS_GLOBAL, 0, "",
_( "Add Circle" ), _( "Add a circle" ),
add_circle_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolArc( "eeschema.SymbolDrawing.drawSymbolArc",
AS_GLOBAL, 0, "",
_( "Add Arc" ), _( "Add an arc" ),
add_arc_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolLines( "eeschema.SymbolDrawing.drawSymbolLines",
AS_GLOBAL, 0, "",
_( "Add Lines" ), _( "Add connected graphic lines" ),
add_graphical_segments_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( "eeschema.SymbolDrawing.placeSymbolAnchor",
AS_GLOBAL, 0, "",
_( "Move Symbol Anchor" ), _( "Specify a new location for the symbol anchor" ),
anchor_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishDrawing( "eeschema.SymbolDrawing.finishDrawing",
AS_GLOBAL, 0, "",
_( "Finish Drawing" ), _( "Finish drawing shape" ),
checked_ok_xpm, AF_NONE );
// LIB_PIN_TOOL
//
TOOL_ACTION EE_ACTIONS::pushPinLength( "eeschema.PinEditing.pushPinLength",
AS_GLOBAL, 0, "",
_( "Push Pin Length" ), _( "Copy pin length to other pins in symbol" ),
pin_size_to_xpm );
TOOL_ACTION EE_ACTIONS::pushPinNameSize( "eeschema.PinEditing.pushPinNameSize",
AS_GLOBAL, 0, "",
_( "Push Pin Name Size" ), _( "Copy pin name size to other pins in symbol" ),
pin_size_to_xpm );
TOOL_ACTION EE_ACTIONS::pushPinNumSize( "eeschema.PinEditing.pushPinNumSize",
AS_GLOBAL, 0, "",
_( "Push Pin Number Size" ), _( "Copy pin number size to other pins in symbol" ),
pin_size_to_xpm );
// SCH_DRAWING_TOOLS
//
TOOL_ACTION EE_ACTIONS::placeSymbol( "eeschema.InteractiveDrawing.placeSymbol",
AS_GLOBAL,
'A', LEGACY_HK_NAME( "Add Symbol" ),
_( "Add Symbol" ), _( "Add a symbol" ),
add_component_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placePower( "eeschema.InteractiveDrawing.placePowerPort",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Add Power" ),
_( "Add Power" ), _( "Add a power port" ),
add_power_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeNoConnect( "eeschema.InteractiveDrawing.placeNoConnect",
AS_GLOBAL,
'Q', LEGACY_HK_NAME( "Add No Connect Flag" ),
_( "Add No Connect Flag" ), _( "Add a no-connection flag" ),
noconn_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeJunction( "eeschema.InteractiveDrawing.placeJunction",
AS_GLOBAL,
'J', LEGACY_HK_NAME( "Add Junction" ),
_( "Add Junction" ), _( "Add a junction" ),
add_junction_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeBusWireEntry( "eeschema.InteractiveDrawing.placeBusWireEntry",
AS_GLOBAL,
'Z', LEGACY_HK_NAME( "Add Wire Entry" ),
_( "Add Wire to Bus Entry" ), _( "Add a wire entry to a bus" ),
add_line2bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeBusBusEntry( "eeschema.InteractiveDrawing.placeBusBusEntry",
AS_GLOBAL,
'/', LEGACY_HK_NAME( "Add Bus Entry" ),
_( "Add Bus to Bus Entry" ), _( "Add a bus entry to a bus" ),
add_bus2bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeLabel( "eeschema.InteractiveDrawing.placeLabel",
AS_GLOBAL,
'L', LEGACY_HK_NAME( "Add Label" ),
_( "Add Label" ), _( "Add a net label" ),
add_line_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeHierLabel( "eeschema.InteractiveDrawing.placeHierarchicalLabel",
AS_GLOBAL,
'H', LEGACY_HK_NAME( "Add Hierarchical Label" ),
_( "Add Hierarchical Label" ), _( "Add a hierarchical sheet label" ),
add_hierarchical_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSheet( "eeschema.InteractiveDrawing.drawSheet",
AS_GLOBAL,
'S', LEGACY_HK_NAME( "Add Sheet" ),
_( "Add Sheet" ), _( "Add a hierarchical sheet" ),
add_hierarchical_subsheet_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSheetPin( "eeschema.InteractiveDrawing.placeSheetPin",
AS_GLOBAL, 0, "",
_( "Add Sheet Pin" ), _( "Add a sheet pin" ),
add_hierar_pin_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::importSheetPin( "eeschema.InteractiveDrawing.importSheetPin",
AS_GLOBAL, 0, "",
_( "Import Sheet Pin" ), _( "Import a hierarchical sheet pin" ),
import_hierarchical_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeGlobalLabel( "eeschema.InteractiveDrawing.placeGlobalLabel",
AS_GLOBAL,
MD_CTRL + 'H', LEGACY_HK_NAME( "Add Global Label" ),
_( "Add Global Label" ), _( "Add a global label" ),
add_glabel_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSchematicText( "eeschema.InteractiveDrawing.placeSchematicText",
AS_GLOBAL,
'T', LEGACY_HK_NAME( "Add Graphic Text" ),
_( "Add Text" ), _( "Add text" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeImage( "eeschema.InteractiveDrawing.placeImage",
AS_GLOBAL, 0, "",
_( "Add Image" ), _( "Add bitmap image" ),
image_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishSheet( "eeschema.InteractiveDrawing.finishSheet",
AS_GLOBAL, 0, "",
_( "Finish Sheet" ), _( "Finish drawing sheet" ),
checked_ok_xpm, AF_NONE );
// SCH_EDIT_TOOL
//
TOOL_ACTION EE_ACTIONS::repeatDrawItem( "eeschema.InteractiveEdit.repeatDrawItem",
AS_GLOBAL,
WXK_INSERT, LEGACY_HK_NAME( "Repeat Last Item" ),
_( "Repeat Last Item" ), _( "Duplicates the last drawn item" ),
nullptr );
TOOL_ACTION EE_ACTIONS::rotateCW( "eeschema.InteractiveEdit.rotateCW",
AS_GLOBAL, 0, "",
_( "Rotate Clockwise" ), _( "Rotates selected item(s) clockwise" ),
rotate_cw_xpm );
TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW",
AS_GLOBAL,
'R', LEGACY_HK_NAME( "Rotate Item" ),
_( "Rotate" ), _( "Rotates selected item(s) counter-clockwise" ),
rotate_ccw_xpm );
TOOL_ACTION EE_ACTIONS::mirrorX( "eeschema.InteractiveEdit.mirrorX",
AS_GLOBAL,
'X', LEGACY_HK_NAME( "Mirror X" ),
_( "Mirror Around Horizontal Axis" ), _( "Flips selected item(s) from top to bottom" ),
mirror_v_xpm );
TOOL_ACTION EE_ACTIONS::mirrorY( "eeschema.InteractiveEdit.mirrorY",
AS_GLOBAL,
'Y', LEGACY_HK_NAME( "Mirror Y" ),
_( "Mirror Around Vertical Axis" ), _( "Flips selected item(s) from left to right" ),
mirror_h_xpm );
TOOL_ACTION EE_ACTIONS::properties( "eeschema.InteractiveEdit.properties",
AS_GLOBAL,
'E', LEGACY_HK_NAME( "Edit Item" ),
_( "Properties..." ), _( "Displays item properties dialog" ),
edit_xpm );
TOOL_ACTION EE_ACTIONS::editReference( "eeschema.InteractiveEdit.editReference",
AS_GLOBAL,
'U', LEGACY_HK_NAME( "Edit Symbol Reference" ),
_( "Edit Reference..." ), _( "Displays reference field dialog" ),
edit_comp_ref_xpm );
TOOL_ACTION EE_ACTIONS::editValue( "eeschema.InteractiveEdit.editValue",
AS_GLOBAL,
'V', LEGACY_HK_NAME( "Edit Symbol Value" ),
_( "Edit Value..." ), _( "Displays value field dialog" ),
edit_comp_value_xpm );
TOOL_ACTION EE_ACTIONS::editFootprint( "eeschema.InteractiveEdit.editFootprint",
AS_GLOBAL,
'F', LEGACY_HK_NAME( "Edit Symbol Footprint" ),
_( "Edit Footprint..." ), _( "Displays footprint field dialog" ),
edit_comp_footprint_xpm );
TOOL_ACTION EE_ACTIONS::autoplaceFields( "eeschema.InteractiveEdit.autoplaceFields",
AS_GLOBAL,
'O', LEGACY_HK_NAME( "Autoplace Fields" ),
_( "Autoplace Fields" ), _( "Runs the automatic placement algorithm on the symbol's fields" ),
autoplace_fields_xpm );
TOOL_ACTION EE_ACTIONS::updateFieldsFromLibrary( "eeschema.InteractiveEdit.updateFieldsFromLibrary",
AS_GLOBAL, 0, "",
_( "Update Fields from Library..." ), _( "Sets symbol fields to original library values" ),
update_fields_xpm );
TOOL_ACTION EE_ACTIONS::toggleDeMorgan( "eeschema.InteractiveEdit.toggleDeMorgan",
AS_GLOBAL, 0, "",
_( "DeMorgan Conversion" ), _( "Switch between DeMorgan representations" ),
morgan2_xpm );
TOOL_ACTION EE_ACTIONS::showDeMorganStandard( "eeschema.InteractiveEdit.showDeMorganStandard",
AS_GLOBAL, 0, "",
_( "DeMorgan Standard" ), _( "Switch to standard DeMorgan representation" ),
morgan1_xpm );
TOOL_ACTION EE_ACTIONS::showDeMorganAlternate( "eeschema.InteractiveEdit.showDeMorganAlternate",
AS_GLOBAL, 0, "",
_( "DeMorgan Alternate" ), _( "Switch to alternate DeMorgan representation" ),
morgan2_xpm );
TOOL_ACTION EE_ACTIONS::toShapeSlash( "eeschema.InteractiveEdit.toShapeSlash",
AS_GLOBAL, 0, "",
_( "Set Bus Entry Shape /" ), _( "Change the bus entry shape to /" ),
change_entry_orient_xpm );
TOOL_ACTION EE_ACTIONS::toShapeBackslash( "eeschema.InteractiveEdit.toShapeBackslash",
AS_GLOBAL, 0, "",
_( "Set Bus Entry Shape \\" ), _( "Change the bus entry shape to \\" ),
change_entry_orient_xpm );
TOOL_ACTION EE_ACTIONS::toLabel( "eeschema.InteractiveEdit.toLabel",
AS_GLOBAL, 0, "",
_( "Change to Label" ), _( "Change existing item to a label" ),
add_line_label_xpm );
TOOL_ACTION EE_ACTIONS::toHLabel( "eeschema.InteractiveEdit.toHLabel",
AS_GLOBAL, 0, "",
_( "Change to Hierarchical Label" ), _( "Change existing item to a hierarchical label" ),
add_hierarchical_label_xpm );
TOOL_ACTION EE_ACTIONS::toGLabel( "eeschema.InteractiveEdit.toGLabel",
AS_GLOBAL, 0, "",
_( "Change to Global Label" ), _( "Change existing item to a global label" ),
add_glabel_xpm );
TOOL_ACTION EE_ACTIONS::toText( "eeschema.InteractiveEdit.toText",
AS_GLOBAL, 0, "",
_( "Change to Text" ), _( "Change existing item to a text comment" ),
text_xpm );
TOOL_ACTION EE_ACTIONS::cleanupSheetPins( "eeschema.InteractiveEdit.cleanupSheetPins",
AS_GLOBAL, 0, "",
_( "Cleanup Sheet Pins" ), _( "Delete unreferenced sheet pins" ),
nullptr );
TOOL_ACTION EE_ACTIONS::symbolProperties( "eeschema.InteractiveEdit.symbolProperties",
AS_GLOBAL, 0, "",
_( "Symbol Properties..." ), _( "Displays symbol properties dialog" ),
part_properties_xpm );
TOOL_ACTION EE_ACTIONS::pinTable( "eeschema.InteractiveEdit.pinTable",
AS_GLOBAL, 0, "",
_( "Pin Table..." ), _( "Displays pin table for bulk editing of pins" ),
pin_table_xpm );
TOOL_ACTION EE_ACTIONS::deleteItemCursor( "eeschema.InteractiveEdit.deleteTool",
AS_GLOBAL, 0, "",
_( "Delete Tool" ), _( "Delete clicked items" ),
delete_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::breakWire( "eeschema.InteractiveEdit.breakWire",
AS_GLOBAL, 0, "",
_( "Break Wire" ), _( "Divide a wire into segments which can be dragged independently" ),
break_line_xpm );
TOOL_ACTION EE_ACTIONS::breakBus( "eeschema.InteractiveEdit.breakBus",
AS_GLOBAL, 0, "",
_( "Break Bus" ), _( "Divide a bus into segments which can be dragged independently" ),
break_line_xpm );
// SCH_EDITOR_CONTROL
//
TOOL_ACTION EE_ACTIONS::refreshPreview( "eeschema.EditorControl.refreshPreview",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::restartMove( "eeschema.EditorControl.restartMove",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::simProbe( "eeschema.Simulation.probe",
AS_GLOBAL, 0, "",
_( "Add a simulator probe" ), "" );
TOOL_ACTION EE_ACTIONS::simTune( "eeschema.Simulation.tune",
AS_GLOBAL, 0, "",
_( "Select a value to be tuned" ), "" );
TOOL_ACTION EE_ACTIONS::highlightNet( "eeschema.EditorControl.highlightNet",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::clearHighlight( "eeschema.EditorControl.clearHighlight",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::updateNetHighlighting( "eeschema.EditorControl.updateNetHighlighting",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::highlightNetCursor( "eeschema.EditorControl.highlightNetTool",
AS_GLOBAL, 0, "",
_( "Highlight Nets" ), _( "Highlight wires and pins of a net" ),
net_highlight_schematic_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::editWithLibEdit( "eeschema.EditorControl.editWithSymbolEditor",
AS_GLOBAL,
MD_CTRL + 'E', LEGACY_HK_NAME( "Edit with Symbol Editor" ),
_( "Edit with Symbol Editor" ), _( "Open the symbol editor to edit the symbol" ),
libedit_xpm );
TOOL_ACTION EE_ACTIONS::editSymbolFields( "eeschema.EditorControl.editSymbolFields",
AS_GLOBAL, 0, "",
_( "Edit Symbol Fields..." ), _( "Bulk-edit fields of all symbols in schematic" ),
spreadsheet_xpm );
TOOL_ACTION EE_ACTIONS::editSymbolLibraryLinks( "eeschema.EditorControl.editSymbolLibraryLinks",
AS_GLOBAL, 0, "",
_( "Edit Symbol Library Links..." ), _( "Edit links between schematic and library symbols" ),
edit_cmp_symb_links_xpm );
TOOL_ACTION EE_ACTIONS::assignFootprints( "eeschema.EditorControl.assignFootprints",
AS_GLOBAL, 0, "",
_( "Assign Footprints..." ), _( "Run Cvpcb" ),
cvpcb_xpm );
TOOL_ACTION EE_ACTIONS::importFPAssignments( "eeschema.EditorControl.importFPAssignments",
AS_GLOBAL, 0, "",
_( "Import Footprint Assignments..." ),
_( "Import symbol footprint assignments from .cmp file created by Pcbnew" ),
import_footprint_names_xpm );
TOOL_ACTION EE_ACTIONS::annotate( "eeschema.EditorControl.annotate",
AS_GLOBAL, 0, "",
_( "Annotate Schematic..." ), _( "Fill in schematic symbol reference designators" ),
annotate_xpm );
TOOL_ACTION EE_ACTIONS::showBusManager( "eeschema.EditorControl.showBusManager",
AS_GLOBAL, 0, "",
_( "Bus Definitions..." ), _( "Manage bus definitions" ),
bus_definition_tool_xpm );
TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( "eeschema.EditorControl.drawSheetOnClipboard",
AS_GLOBAL, 0, "",
_( "Export Drawing to Clipboard" ), _( "Export drawing of current sheet to clipboard" ),
copy_xpm );
TOOL_ACTION EE_ACTIONS::showPcbNew( "eeschema.EditorControl.showPcbNew",
AS_GLOBAL, 0, "",
_( "Open PCB Editor" ), _( "Run Pcbnew" ),
pcbnew_xpm );
TOOL_ACTION EE_ACTIONS::exportNetlist( "eeschema.EditorControl.exportNetlist",
AS_GLOBAL, 0, "",
_( "Export Netlist..." ), _( "Export file containing netlist in one of several formats" ),
netlist_xpm );
TOOL_ACTION EE_ACTIONS::generateBOM( "eeschema.EditorControl.generateBOM",
AS_GLOBAL, 0, "",
_( "Generate BOM..." ), _( "Generate a bill of materials for the current schematic" ),
bom_xpm );
TOOL_ACTION EE_ACTIONS::enterSheet( "eeschema.EditorControl.enterSheet",
AS_GLOBAL, 0, "",
_( "Enter Sheet" ), _( "Display the selected sheet's contents in the Eeschema window" ),
enter_sheet_xpm );
TOOL_ACTION EE_ACTIONS::leaveSheet( "eeschema.EditorControl.leaveSheet",
AS_GLOBAL,
MD_ALT + WXK_BACK, LEGACY_HK_NAME( "Leave Sheet" ),
_( "Leave Sheet" ), _( "Display the parent sheet in the Eeschema window" ),
leave_sheet_xpm );
TOOL_ACTION EE_ACTIONS::navigateHierarchy( "eeschema.EditorControl.navigateHierarchy",
AS_GLOBAL, 0, "",
_( "Show Hierarchy Navigator" ), "",
hierarchy_nav_xpm );
TOOL_ACTION EE_ACTIONS::explicitCrossProbe( "eeschema.EditorControl.explicitCrossProbe",
AS_GLOBAL, 0, "",
_( "Highlight on PCB" ), _( "Highlight corresponding items in PCBNew" ),
select_same_sheet_xpm );
TOOL_ACTION EE_ACTIONS::toggleHiddenPins( "eeschema.EditorControl.showHiddenPins",
AS_GLOBAL, 0, "",
_( "Show Hidden Pins" ), "",
hidden_pin_xpm );
TOOL_ACTION EE_ACTIONS::toggleForceHV( "eeschema.EditorControl.forceHVLines",
AS_GLOBAL, 0, "",
_( "Force H/V Wires and Busses" ), "",
lines90_xpm );
// SCH_LINE_WIRE_BUS_TOOL
//
TOOL_ACTION EE_ACTIONS::drawWire( "eeschema.InteractiveDrawingLineWireBus.drawWires",
AS_GLOBAL,
'W', LEGACY_HK_NAME( "Begin Wire" ),
_( "Add Wire" ), _( "Add a wire" ),
add_line_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawBus( "eeschema.InteractiveDrawingLineWireBus.drawBusses",
AS_GLOBAL,
'B', LEGACY_HK_NAME( "Begin Bus" ),
_( "Add Bus" ), _( "Add a bus" ),
add_bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::unfoldBus( "eeschema.InteractiveDrawingLineWireBus.unfoldBus",
AS_GLOBAL,
'C', LEGACY_HK_NAME( "Unfold from Bus" ),
_( "Unfold from Bus" ), _( "Break a wire out of a bus" ),
nullptr, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawLines( "eeschema.InteractiveDrawingLineWireBus.drawLines",
AS_GLOBAL,
'I', LEGACY_HK_NAME( "Add Graphic PolyLine" ),
_( "Add Lines" ), _( "Add connected graphic lines" ),
add_dashed_line_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishLineWireOrBus( "eeschema.InteractiveDrawingLineWireBus.finish",
AS_GLOBAL,
'K', LEGACY_HK_NAME( "End Line Wire Bus" ),
_( "Finish Wire or Bus" ), _( "Complete drawing at current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishWire( "eeschema.InteractiveDrawingLineWireBus.finishWire",
AS_GLOBAL, 0, "",
_( "Finish Wire" ), _( "Complete wire with current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishBus( "eeschema.InteractiveDrawingLineWireBus.finishBus",
AS_GLOBAL, 0, "",
_( "Finish Bus" ), _( "Complete bus with current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishLine( "eeschema.InteractiveDrawingLineWireBus.finishLine",
AS_GLOBAL, 0, "",
_( "Finish Lines" ), _( "Complete connected lines with current segment" ),
checked_ok_xpm, AF_NONE );
// SCH_MOVE_TOOL
//
TOOL_ACTION EE_ACTIONS::move( "eeschema.InteractiveEdit.move",
AS_GLOBAL,
'M', LEGACY_HK_NAME( "Move Item" ),
_( "Move" ), _( "Moves the selected item(s)" ), move_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drag( "eeschema.InteractiveEdit.drag",
AS_GLOBAL,
'G', LEGACY_HK_NAME( "Drag Item" ),
_( "Drag" ), _( "Drags the selected item(s)" ), move_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::moveActivate( "eeschema.InteractiveMove",
AS_GLOBAL, 0, "",
_( "Move Activate" ), "", move_xpm, AF_ACTIVATE );

View File

@ -45,27 +45,6 @@
#include <project.h>
#include <dialogs/dialog_display_info_HTML_base.h>
TOOL_ACTION EE_ACTIONS::runERC( "eeschema.InspectionTool.runERC",
AS_GLOBAL, 0, "",
_( "Electrical Rules &Checker" ), _( "Perform electrical rules check" ),
erc_xpm );
TOOL_ACTION EE_ACTIONS::runSimulation( "eeschema.EditorControl.runSimulation",
AS_GLOBAL, 0, "",
_( "Simulator..." ), _( "Simulate circuit in SPICE" ),
simulator_xpm );
TOOL_ACTION EE_ACTIONS::showDatasheet( "eeschema.InspectionTool.showDatasheet",
AS_GLOBAL,
'D', LEGACY_HK_NAME( "Show Datasheet" ),
_( "Show Datasheet" ), _( "Opens the datasheet in a browser" ),
datasheet_xpm );
TOOL_ACTION EE_ACTIONS::showMarkerInfo( "eeschema.InspectionTool.showMarkerInfo",
AS_GLOBAL, 0, "",
_( "Show Marker Info" ), _( "Display the marker's info in a dialog" ),
info_xpm );
EE_INSPECTION_TOOL::EE_INSPECTION_TOOL()
: EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" )

View File

@ -27,9 +27,6 @@
#include <tool/tool_manager.h>
#include <sch_base_frame.h>
TOOL_ACTION EE_ACTIONS::pickerTool( "eeschema.InteractivePicker",
AS_GLOBAL, 0, "", "", "", NULL, AF_ACTIVATE );
EE_PICKER_TOOL::EE_PICKER_TOOL()
: EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InteractivePicker" )

View File

@ -46,17 +46,6 @@ using namespace std::placeholders;
#include <eeschema_id.h>
// Point editor
TOOL_ACTION EE_ACTIONS::pointEditorAddCorner( "eeschema.PointEditor.addCorner",
AS_GLOBAL, 0, "",
_( "Create Corner" ), _( "Create a corner" ),
add_corner_xpm );
TOOL_ACTION EE_ACTIONS::pointEditorRemoveCorner( "eeschema.PointEditor.removeCorner",
AS_GLOBAL, 0, "",
_( "Remove Corner" ), _( "Remove corner" ),
delete_xpm );
// Few constants to avoid using bare numbers for point indices
enum ARC_POINTS

View File

@ -46,39 +46,6 @@
#include <eeschema_id.h>
#include <menus_helpers.h>
// Selection tool actions
TOOL_ACTION EE_ACTIONS::selectionActivate( "eeschema.InteractiveSelection",
AS_GLOBAL, 0, "", "", "", // No description, not shown anywhere
nullptr, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::selectNode( "eeschema.InteractiveSelection.SelectNode",
AS_GLOBAL,
MD_ALT + '3', LEGACY_HK_NAME( "Select Node" ),
_( "Select Node" ), _( "Select a connection item under the cursor" ) );
TOOL_ACTION EE_ACTIONS::selectConnection( "eeschema.InteractiveSelection.SelectConnection",
AS_GLOBAL,
MD_ALT + '4', LEGACY_HK_NAME( "Select Connection" ),
_( "Select Connection" ), _( "Select a complete connection" ) );
TOOL_ACTION EE_ACTIONS::selectionMenu( "eeschema.InteractiveSelection.SelectionMenu",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::addItemToSel( "eeschema.InteractiveSelection.AddItemToSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::addItemsToSel( "eeschema.InteractiveSelection.AddItemsToSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::removeItemFromSel( "eeschema.InteractiveSelection.RemoveItemFromSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::removeItemsFromSel( "eeschema.InteractiveSelection.RemoveItemsFromSel",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::clearSelection( "eeschema.InteractiveSelection.ClearSelection",
AS_GLOBAL );
SELECTION_CONDITION EE_CONDITIONS::Empty = [] (const SELECTION& aSelection )
{

View File

@ -35,84 +35,6 @@
#include <project.h>
#include <confirm.h>
TOOL_ACTION EE_ACTIONS::newSymbol( "eeschema.SymbolLibraryControl.newSymbol",
AS_GLOBAL, 0, "",
_( "New Symbol..." ), _( "Create a new symbol" ),
new_component_xpm );
TOOL_ACTION EE_ACTIONS::editSymbol( "eeschema.SymbolLibraryControl.editSymbol",
AS_GLOBAL, 0, "",
_( "Edit Symbol" ), _( "Show selected symbol on editor canvas" ),
edit_xpm );
TOOL_ACTION EE_ACTIONS::duplicateSymbol( "eeschema.SymbolLibraryControl.duplicateSymbol",
AS_GLOBAL, 0, "",
_( "Duplicate Symbol" ), _( "Make a copy of the selected symbol" ),
duplicate_xpm );
TOOL_ACTION EE_ACTIONS::deleteSymbol( "eeschema.SymbolLibraryControl.deleteSymbol",
AS_GLOBAL, 0, "",
_( "Delete Symbol" ), _( "Remove the selected symbol from its library" ),
delete_xpm );
TOOL_ACTION EE_ACTIONS::cutSymbol( "eeschema.SymbolLibraryControl.cutSymbol",
AS_GLOBAL, 0, "",
_( "Cut Symbol" ), "",
cut_xpm );
TOOL_ACTION EE_ACTIONS::copySymbol( "eeschema.SymbolLibraryControl.copySymbol",
AS_GLOBAL, 0, "",
_( "Copy Symbol" ), "",
copy_xpm );
TOOL_ACTION EE_ACTIONS::pasteSymbol( "eeschema.SymbolLibraryControl.pasteSymbol",
AS_GLOBAL, 0, "",
_( "Paste Symbol" ), "",
paste_xpm );
TOOL_ACTION EE_ACTIONS::importSymbol( "eeschema.SymbolLibraryControl.importSymbol",
AS_GLOBAL, 0, "",
_( "Import Symbol..." ), _( "Import a symbol to the current library" ),
import_part_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbol( "eeschema.SymbolLibraryControl.exportSymbol",
AS_GLOBAL, 0, "",
_( "Export Symbol..." ), _( "Export a symbol to a new library file" ),
export_part_xpm );
TOOL_ACTION EE_ACTIONS::addSymbolToSchematic( "eeschema.SymbolLibraryControl.addSymbolToSchematic",
AS_GLOBAL, 0, "",
_( "Add Symbol to Schematic" ), _( "Add Symbol to Schematic" ),
export_xpm );
TOOL_ACTION EE_ACTIONS::showElectricalTypes( "eeschema.SymbolLibraryControl.showElectricalTypes",
AS_GLOBAL, 0, "",
_( "Show Pin Electrical Types" ), _( "Annotate pins with their electrical types" ),
pin_show_etype_xpm );
TOOL_ACTION EE_ACTIONS::showComponentTree( "eeschema.SymbolLibraryControl.showComponentTree",
AS_GLOBAL, 0, "",
_( "Show Symbol Tree" ), "",
search_tree_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbolView( "eeschema.SymbolLibraryControl.exportSymbolView",
AS_GLOBAL, 0, "",
_( "Export View as PNG..." ), _( "Create PNG file from the current view" ),
plot_xpm );
TOOL_ACTION EE_ACTIONS::exportSymbolAsSVG( "eeschema.SymbolLibraryControl.exportSymbolAsSVG",
AS_GLOBAL, 0, "",
_( "Export Symbol as SVG..." ), _( "Create SVG file from the current symbol" ),
plot_svg_xpm );
TOOL_ACTION EE_ACTIONS::toggleSyncedPinsMode( "eeschema.SymbolLibraryControl.toggleSyncedPinsMode",
AS_GLOBAL, 0, "",
_( "Synchronized Pins Edit Mode" ),
_( "Synchronized Pins Edit Mode\n"
"When enabled propagates all changes (except pin numbers) to other units.\n"
"Enabled by default for multiunit parts with interchangeable units." ),
pin2pin_xpm );
bool LIB_CONTROL::Init()
{

View File

@ -41,48 +41,6 @@
#include <lib_polyline.h>
#include <lib_rectangle.h>
// Drawing tool actions
TOOL_ACTION EE_ACTIONS::placeSymbolPin( "eeschema.SymbolDrawing.placeSymbolPin",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Create Pin" ),
_( "Add Pin" ), _( "Add a pin" ),
pin_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSymbolText( "eeschema.SymbolDrawing.placeSymbolText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolRectangle( "eeschema.SymbolDrawing.drawSymbolRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolCircle( "eeschema.SymbolDrawing.drawSymbolCircle",
AS_GLOBAL, 0, "",
_( "Add Circle" ), _( "Add a circle" ),
add_circle_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolArc( "eeschema.SymbolDrawing.drawSymbolArc",
AS_GLOBAL, 0, "",
_( "Add Arc" ), _( "Add an arc" ),
add_arc_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSymbolLines( "eeschema.SymbolDrawing.drawSymbolLines",
AS_GLOBAL, 0, "",
_( "Add Lines" ), _( "Add connected graphic lines" ),
add_graphical_segments_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( "eeschema.SymbolDrawing.placeSymbolAnchor",
AS_GLOBAL, 0, "",
_( "Move Symbol Anchor" ), _( "Specify a new location for the symbol anchor" ),
anchor_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishDrawing( "eeschema.SymbolDrawing.finishDrawing",
AS_GLOBAL, 0, "",
_( "Finish Drawing" ), _( "Finish drawing shape" ),
checked_ok_xpm, AF_NONE );
static void* g_lastPinWeakPtr;

View File

@ -33,22 +33,6 @@
#include "lib_pin_tool.h"
TOOL_ACTION EE_ACTIONS::pushPinLength( "eeschema.PinEditing.pushPinLength",
AS_GLOBAL, 0, "",
_( "Push Pin Length" ), _( "Copy pin length to other pins in symbol" ),
pin_size_to_xpm );
TOOL_ACTION EE_ACTIONS::pushPinNameSize( "eeschema.PinEditing.pushPinNameSize",
AS_GLOBAL, 0, "",
_( "Push Pin Name Size" ), _( "Copy pin name size to other pins in symbol" ),
pin_size_to_xpm );
TOOL_ACTION EE_ACTIONS::pushPinNumSize( "eeschema.PinEditing.pushPinNumSize",
AS_GLOBAL, 0, "",
_( "Push Pin Number Size" ), _( "Copy pin number size to other pins in symbol" ),
pin_size_to_xpm );
static ELECTRICAL_PINTYPE g_LastPinType = PIN_INPUT;
static int g_LastPinOrient = PIN_RIGHT;
static GRAPHIC_PINSHAPE g_LastPinShape = PINSHAPE_LINE;

View File

@ -46,94 +46,6 @@
#include <class_library.h>
// Drawing tool actions
TOOL_ACTION EE_ACTIONS::placeSymbol( "eeschema.InteractiveDrawing.placeSymbol",
AS_GLOBAL,
'A', LEGACY_HK_NAME( "Add Symbol" ),
_( "Add Symbol" ), _( "Add a symbol" ),
add_component_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placePower( "eeschema.InteractiveDrawing.placePowerPort",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Add Power" ),
_( "Add Power" ), _( "Add a power port" ),
add_power_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeNoConnect( "eeschema.InteractiveDrawing.placeNoConnect",
AS_GLOBAL,
'Q', LEGACY_HK_NAME( "Add No Connect Flag" ),
_( "Add No Connect Flag" ), _( "Add a no-connection flag" ),
noconn_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeJunction( "eeschema.InteractiveDrawing.placeJunction",
AS_GLOBAL,
'J', LEGACY_HK_NAME( "Add Junction" ),
_( "Add Junction" ), _( "Add a junction" ),
add_junction_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeBusWireEntry( "eeschema.InteractiveDrawing.placeBusWireEntry",
AS_GLOBAL,
'Z', LEGACY_HK_NAME( "Add Wire Entry" ),
_( "Add Wire to Bus Entry" ), _( "Add a wire entry to a bus" ),
add_line2bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeBusBusEntry( "eeschema.InteractiveDrawing.placeBusBusEntry",
AS_GLOBAL,
'/', LEGACY_HK_NAME( "Add Bus Entry" ),
_( "Add Bus to Bus Entry" ), _( "Add a bus entry to a bus" ),
add_bus2bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeLabel( "eeschema.InteractiveDrawing.placeLabel",
AS_GLOBAL,
'L', LEGACY_HK_NAME( "Add Label" ),
_( "Add Label" ), _( "Add a net label" ),
add_line_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeHierLabel( "eeschema.InteractiveDrawing.placeHierarchicalLabel",
AS_GLOBAL,
'H', LEGACY_HK_NAME( "Add Hierarchical Label" ),
_( "Add Hierarchical Label" ), _( "Add a hierarchical sheet label" ),
add_hierarchical_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawSheet( "eeschema.InteractiveDrawing.drawSheet",
AS_GLOBAL,
'S', LEGACY_HK_NAME( "Add Sheet" ),
_( "Add Sheet" ), _( "Add a hierarchical sheet" ),
add_hierarchical_subsheet_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSheetPin( "eeschema.InteractiveDrawing.placeSheetPin",
AS_GLOBAL, 0, "",
_( "Add Sheet Pin" ), _( "Add a sheet pin" ),
add_hierar_pin_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::importSheetPin( "eeschema.InteractiveDrawing.importSheetPin",
AS_GLOBAL, 0, "",
_( "Import Sheet Pin" ), _( "Import a hierarchical sheet pin" ),
import_hierarchical_label_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeGlobalLabel( "eeschema.InteractiveDrawing.placeGlobalLabel",
AS_GLOBAL,
MD_CTRL + 'H', LEGACY_HK_NAME( "Add Global Label" ),
_( "Add Global Label" ), _( "Add a global label" ),
add_glabel_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeSchematicText( "eeschema.InteractiveDrawing.placeSchematicText",
AS_GLOBAL,
'T', LEGACY_HK_NAME( "Add Graphic Text" ),
_( "Add Text" ), _( "Add text" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::placeImage( "eeschema.InteractiveDrawing.placeImage",
AS_GLOBAL, 0, "",
_( "Add Image" ), _( "Add bitmap image" ),
image_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishSheet( "eeschema.InteractiveDrawing.finishSheet",
AS_GLOBAL, 0, "",
_( "Finish Sheet" ), _( "Finish drawing sheet" ),
checked_ok_xpm, AF_NONE );
SCH_DRAWING_TOOLS::SCH_DRAWING_TOOLS() :
EE_TOOL_BASE<SCH_EDIT_FRAME>( "eeschema.InteractiveDrawing" )
{

View File

@ -49,146 +49,6 @@
#include "sch_drawing_tools.h"
TOOL_ACTION EE_ACTIONS::repeatDrawItem( "eeschema.InteractiveEdit.repeatDrawItem",
AS_GLOBAL,
WXK_INSERT, LEGACY_HK_NAME( "Repeat Last Item" ),
_( "Repeat Last Item" ), _( "Duplicates the last drawn item" ),
nullptr );
TOOL_ACTION EE_ACTIONS::rotateCW( "eeschema.InteractiveEdit.rotateCW",
AS_GLOBAL, 0, "",
_( "Rotate Clockwise" ), _( "Rotates selected item(s) clockwise" ),
rotate_cw_xpm );
TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW",
AS_GLOBAL,
'R', LEGACY_HK_NAME( "Rotate Item" ),
_( "Rotate" ), _( "Rotates selected item(s) counter-clockwise" ),
rotate_ccw_xpm );
TOOL_ACTION EE_ACTIONS::mirrorX( "eeschema.InteractiveEdit.mirrorX",
AS_GLOBAL,
'X', LEGACY_HK_NAME( "Mirror X" ),
_( "Mirror Around Horizontal Axis" ), _( "Flips selected item(s) from top to bottom" ),
mirror_v_xpm );
TOOL_ACTION EE_ACTIONS::mirrorY( "eeschema.InteractiveEdit.mirrorY",
AS_GLOBAL,
'Y', LEGACY_HK_NAME( "Mirror Y" ),
_( "Mirror Around Vertical Axis" ), _( "Flips selected item(s) from left to right" ),
mirror_h_xpm );
TOOL_ACTION EE_ACTIONS::properties( "eeschema.InteractiveEdit.properties",
AS_GLOBAL,
'E', LEGACY_HK_NAME( "Edit Item" ),
_( "Properties..." ), _( "Displays item properties dialog" ),
edit_xpm );
TOOL_ACTION EE_ACTIONS::editReference( "eeschema.InteractiveEdit.editReference",
AS_GLOBAL,
'U', LEGACY_HK_NAME( "Edit Symbol Reference" ),
_( "Edit Reference..." ), _( "Displays reference field dialog" ),
edit_comp_ref_xpm );
TOOL_ACTION EE_ACTIONS::editValue( "eeschema.InteractiveEdit.editValue",
AS_GLOBAL,
'V', LEGACY_HK_NAME( "Edit Symbol Value" ),
_( "Edit Value..." ), _( "Displays value field dialog" ),
edit_comp_value_xpm );
TOOL_ACTION EE_ACTIONS::editFootprint( "eeschema.InteractiveEdit.editFootprint",
AS_GLOBAL,
'F', LEGACY_HK_NAME( "Edit Symbol Footprint" ),
_( "Edit Footprint..." ), _( "Displays footprint field dialog" ),
edit_comp_footprint_xpm );
TOOL_ACTION EE_ACTIONS::autoplaceFields( "eeschema.InteractiveEdit.autoplaceFields",
AS_GLOBAL,
'O', LEGACY_HK_NAME( "Autoplace Fields" ),
_( "Autoplace Fields" ), _( "Runs the automatic placement algorithm on the symbol's fields" ),
autoplace_fields_xpm );
TOOL_ACTION EE_ACTIONS::updateFieldsFromLibrary( "eeschema.InteractiveEdit.updateFieldsFromLibrary",
AS_GLOBAL, 0, "",
_( "Update Fields from Library..." ), _( "Sets symbol fields to original library values" ),
update_fields_xpm );
TOOL_ACTION EE_ACTIONS::toggleDeMorgan( "eeschema.InteractiveEdit.toggleDeMorgan",
AS_GLOBAL, 0, "",
_( "DeMorgan Conversion" ), _( "Switch between DeMorgan representations" ),
morgan2_xpm );
TOOL_ACTION EE_ACTIONS::showDeMorganStandard( "eeschema.InteractiveEdit.showDeMorganStandard",
AS_GLOBAL, 0, "",
_( "DeMorgan Standard" ), _( "Switch to standard DeMorgan representation" ),
morgan1_xpm );
TOOL_ACTION EE_ACTIONS::showDeMorganAlternate( "eeschema.InteractiveEdit.showDeMorganAlternate",
AS_GLOBAL, 0, "",
_( "DeMorgan Alternate" ), _( "Switch to alternate DeMorgan representation" ),
morgan2_xpm );
TOOL_ACTION EE_ACTIONS::toShapeSlash( "eeschema.InteractiveEdit.toShapeSlash",
AS_GLOBAL, 0, "",
_( "Set Bus Entry Shape /" ), _( "Change the bus entry shape to /" ),
change_entry_orient_xpm );
TOOL_ACTION EE_ACTIONS::toShapeBackslash( "eeschema.InteractiveEdit.toShapeBackslash",
AS_GLOBAL, 0, "",
_( "Set Bus Entry Shape \\" ), _( "Change the bus entry shape to \\" ),
change_entry_orient_xpm );
TOOL_ACTION EE_ACTIONS::toLabel( "eeschema.InteractiveEdit.toLabel",
AS_GLOBAL, 0, "",
_( "Change to Label" ), _( "Change existing item to a label" ),
add_line_label_xpm );
TOOL_ACTION EE_ACTIONS::toHLabel( "eeschema.InteractiveEdit.toHLabel",
AS_GLOBAL, 0, "",
_( "Change to Hierarchical Label" ), _( "Change existing item to a hierarchical label" ),
add_hierarchical_label_xpm );
TOOL_ACTION EE_ACTIONS::toGLabel( "eeschema.InteractiveEdit.toGLabel",
AS_GLOBAL, 0, "",
_( "Change to Global Label" ), _( "Change existing item to a global label" ),
add_glabel_xpm );
TOOL_ACTION EE_ACTIONS::toText( "eeschema.InteractiveEdit.toText",
AS_GLOBAL, 0, "",
_( "Change to Text" ), _( "Change existing item to a text comment" ),
text_xpm );
TOOL_ACTION EE_ACTIONS::cleanupSheetPins( "eeschema.InteractiveEdit.cleanupSheetPins",
AS_GLOBAL, 0, "",
_( "Cleanup Sheet Pins" ), _( "Delete unreferenced sheet pins" ),
nullptr );
TOOL_ACTION EE_ACTIONS::symbolProperties( "eeschema.InteractiveEdit.symbolProperties",
AS_GLOBAL, 0, "",
_( "Symbol Properties..." ), _( "Displays symbol properties dialog" ),
part_properties_xpm );
TOOL_ACTION EE_ACTIONS::pinTable( "eeschema.InteractiveEdit.pinTable",
AS_GLOBAL, 0, "",
_( "Pin Table..." ), _( "Displays pin table for bulk editing of pins" ),
pin_table_xpm );
TOOL_ACTION EE_ACTIONS::deleteItemCursor( "eeschema.InteractiveEdit.deleteTool",
AS_GLOBAL, 0, "",
_( "Delete Tool" ), _( "Delete clicked items" ),
delete_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::breakWire( "eeschema.InteractiveEdit.breakWire",
AS_GLOBAL, 0, "",
_( "Break Wire" ), _( "Divide a wire into segments which can be dragged independently" ),
break_line_xpm );
TOOL_ACTION EE_ACTIONS::breakBus( "eeschema.InteractiveEdit.breakBus",
AS_GLOBAL, 0, "",
_( "Break Bus" ), _( "Divide a bus into segments which can be dragged independently" ),
break_line_xpm );
char g_lastBusEntryShape = '/';

View File

@ -51,122 +51,6 @@
#include <dialogs/dialog_fields_editor_global.h>
#include <invoke_sch_dialog.h>
TOOL_ACTION EE_ACTIONS::refreshPreview( "eeschema.EditorControl.refreshPreview",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::restartMove( "eeschema.EditorControl.restartMove",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::simProbe( "eeschema.Simulation.probe",
AS_GLOBAL, 0, "",
_( "Add a simulator probe" ), "" );
TOOL_ACTION EE_ACTIONS::simTune( "eeschema.Simulation.tune",
AS_GLOBAL, 0, "",
_( "Select a value to be tuned" ), "" );
TOOL_ACTION EE_ACTIONS::highlightNet( "eeschema.EditorControl.highlightNet",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::clearHighlight( "eeschema.EditorControl.clearHighlight",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::updateNetHighlighting( "eeschema.EditorControl.updateNetHighlighting",
AS_GLOBAL );
TOOL_ACTION EE_ACTIONS::highlightNetCursor( "eeschema.EditorControl.highlightNetTool",
AS_GLOBAL, 0, "",
_( "Highlight Nets" ), _( "Highlight wires and pins of a net" ),
net_highlight_schematic_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::editWithLibEdit( "eeschema.EditorControl.editWithSymbolEditor",
AS_GLOBAL,
MD_CTRL + 'E', LEGACY_HK_NAME( "Edit with Symbol Editor" ),
_( "Edit with Symbol Editor" ), _( "Open the symbol editor to edit the symbol" ),
libedit_xpm );
TOOL_ACTION EE_ACTIONS::editSymbolFields( "eeschema.EditorControl.editSymbolFields",
AS_GLOBAL, 0, "",
_( "Edit Symbol Fields..." ), _( "Bulk-edit fields of all symbols in schematic" ),
spreadsheet_xpm );
TOOL_ACTION EE_ACTIONS::editSymbolLibraryLinks( "eeschema.EditorControl.editSymbolLibraryLinks",
AS_GLOBAL, 0, "",
_( "Edit Symbol Library Links..." ), _( "Edit links between schematic and library symbols" ),
edit_cmp_symb_links_xpm );
TOOL_ACTION EE_ACTIONS::assignFootprints( "eeschema.EditorControl.assignFootprints",
AS_GLOBAL, 0, "",
_( "Assign Footprints..." ), _( "Run Cvpcb" ),
cvpcb_xpm );
TOOL_ACTION EE_ACTIONS::importFPAssignments( "eeschema.EditorControl.importFPAssignments",
AS_GLOBAL, 0, "",
_( "Import Footprint Assignments..." ),
_( "Import symbol footprint assignments from .cmp file created by Pcbnew" ),
import_footprint_names_xpm );
TOOL_ACTION EE_ACTIONS::annotate( "eeschema.EditorControl.annotate",
AS_GLOBAL, 0, "",
_( "Annotate Schematic..." ), _( "Fill in schematic symbol reference designators" ),
annotate_xpm );
TOOL_ACTION EE_ACTIONS::showBusManager( "eeschema.EditorControl.showBusManager",
AS_GLOBAL, 0, "",
_( "Bus Definitions..." ), _( "Manage bus definitions" ),
bus_definition_tool_xpm );
TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( "eeschema.EditorControl.drawSheetOnClipboard",
AS_GLOBAL, 0, "",
_( "Export Drawing to Clipboard" ), _( "Export drawing of current sheet to clipboard" ),
copy_xpm );
TOOL_ACTION EE_ACTIONS::showPcbNew( "eeschema.EditorControl.showPcbNew",
AS_GLOBAL, 0, "",
_( "Open PCB Editor" ), _( "Run Pcbnew" ),
pcbnew_xpm );
TOOL_ACTION EE_ACTIONS::exportNetlist( "eeschema.EditorControl.exportNetlist",
AS_GLOBAL, 0, "",
_( "Export Netlist..." ), _( "Export file containing netlist in one of several formats" ),
netlist_xpm );
TOOL_ACTION EE_ACTIONS::generateBOM( "eeschema.EditorControl.generateBOM",
AS_GLOBAL, 0, "",
_( "Generate BOM..." ), _( "Generate a bill of materials for the current schematic" ),
bom_xpm );
TOOL_ACTION EE_ACTIONS::enterSheet( "eeschema.EditorControl.enterSheet",
AS_GLOBAL, 0, "",
_( "Enter Sheet" ), _( "Display the selected sheet's contents in the Eeschema window" ),
enter_sheet_xpm );
TOOL_ACTION EE_ACTIONS::leaveSheet( "eeschema.EditorControl.leaveSheet",
AS_GLOBAL,
MD_ALT + WXK_BACK, LEGACY_HK_NAME( "Leave Sheet" ),
_( "Leave Sheet" ), _( "Display the parent sheet in the Eeschema window" ),
leave_sheet_xpm );
TOOL_ACTION EE_ACTIONS::navigateHierarchy( "eeschema.EditorControl.navigateHierarchy",
AS_GLOBAL, 0, "",
_( "Show Hierarchy Navigator" ), "",
hierarchy_nav_xpm );
TOOL_ACTION EE_ACTIONS::explicitCrossProbe( "eeschema.EditorControl.explicitCrossProbe",
AS_GLOBAL, 0, "",
_( "Highlight on PCB" ), _( "Highlight corresponding items in PCBNew" ),
select_same_sheet_xpm );
TOOL_ACTION EE_ACTIONS::toggleHiddenPins( "eeschema.EditorControl.showHiddenPins",
AS_GLOBAL, 0, "",
_( "Show Hidden Pins" ), "",
hidden_pin_xpm );
TOOL_ACTION EE_ACTIONS::toggleForceHV( "eeschema.EditorControl.forceHVLines",
AS_GLOBAL, 0, "",
_( "Force H/V Wires and Busses" ), "",
lines90_xpm );
int SCH_EDITOR_CONTROL::New( const TOOL_EVENT& aEvent )
{

View File

@ -42,51 +42,6 @@
#include <sch_sheet.h>
#include <advanced_config.h>
TOOL_ACTION EE_ACTIONS::drawWire( "eeschema.InteractiveDrawingLineWireBus.drawWires",
AS_GLOBAL,
'W', LEGACY_HK_NAME( "Begin Wire" ),
_( "Add Wire" ), _( "Add a wire" ),
add_line_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawBus( "eeschema.InteractiveDrawingLineWireBus.drawBusses",
AS_GLOBAL,
'B', LEGACY_HK_NAME( "Begin Bus" ),
_( "Add Bus" ), _( "Add a bus" ),
add_bus_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::unfoldBus( "eeschema.InteractiveDrawingLineWireBus.unfoldBus",
AS_GLOBAL,
'C', LEGACY_HK_NAME( "Unfold from Bus" ),
_( "Unfold from Bus" ), _( "Break a wire out of a bus" ),
nullptr, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drawLines( "eeschema.InteractiveDrawingLineWireBus.drawLines",
AS_GLOBAL,
'I', LEGACY_HK_NAME( "Add Graphic PolyLine" ),
_( "Add Lines" ), _( "Add connected graphic lines" ),
add_dashed_line_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::finishLineWireOrBus( "eeschema.InteractiveDrawingLineWireBus.finish",
AS_GLOBAL,
'K', LEGACY_HK_NAME( "End Line Wire Bus" ),
_( "Finish Wire or Bus" ), _( "Complete drawing at current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishWire( "eeschema.InteractiveDrawingLineWireBus.finishWire",
AS_GLOBAL, 0, "",
_( "Finish Wire" ), _( "Complete wire with current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishBus( "eeschema.InteractiveDrawingLineWireBus.finishBus",
AS_GLOBAL, 0, "",
_( "Finish Bus" ), _( "Complete bus with current segment" ),
checked_ok_xpm, AF_NONE );
TOOL_ACTION EE_ACTIONS::finishLine( "eeschema.InteractiveDrawingLineWireBus.finishLine",
AS_GLOBAL, 0, "",
_( "Finish Lines" ), _( "Complete connected lines with current segment" ),
checked_ok_xpm, AF_NONE );
class BUS_UNFOLD_MENU : public ACTION_MENU
{

View File

@ -37,21 +37,6 @@
#include "sch_move_tool.h"
TOOL_ACTION EE_ACTIONS::move( "eeschema.InteractiveEdit.move",
AS_GLOBAL,
'M', LEGACY_HK_NAME( "Move Item" ),
_( "Move" ), _( "Moves the selected item(s)" ), move_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::drag( "eeschema.InteractiveEdit.drag",
AS_GLOBAL,
'G', LEGACY_HK_NAME( "Drag Item" ),
_( "Drag" ), _( "Drags the selected item(s)" ), move_xpm, AF_ACTIVATE );
TOOL_ACTION EE_ACTIONS::moveActivate( "eeschema.InteractiveMove",
AS_GLOBAL, 0, "",
_( "Move Activate" ), "", move_xpm, AF_ACTIVATE );
// For adding to or removing from selections
#define QUIET_MODE true

View File

@ -20,6 +20,7 @@
#include <tool/tool_manager.h>
#include <gerbview_id.h>
#include <bitmaps.h>
#include "gerbview_actions.h"
@ -42,3 +43,104 @@ OPT<TOOL_EVENT> GERBVIEW_ACTIONS::TranslateLegacyId( int aId )
return OPT<TOOL_EVENT>();
}
// 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
// GERBVIEW_CONTROL
//
TOOL_ACTION GERBVIEW_ACTIONS::layerChanged( "gerbview.Control.layerChanged",
AS_GLOBAL, 0, "", "", "",
nullptr, AF_NOTIFY );
TOOL_ACTION GERBVIEW_ACTIONS::highlightClear( "gerbview.Control.highlightClear",
AS_GLOBAL, 0, "",
_( "Clear Highlight" ), "",
highlight_remove_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightNet( "gerbview.Control.highlightNet",
AS_GLOBAL, 0, "",
_( "Highlight Net" ), "",
general_ratsnest_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightComponent( "gerbview.Control.highlightComponent",
AS_GLOBAL, 0, "",
_( "Highlight Component" ), "",
file_footprint_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightAttribute( "gerbview.Control.highlightAttribute",
AS_GLOBAL, 0, "",
_( "Highlight Attribute" ), "",
flag_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::layerNext( "gerbview.Control.layerNext",
AS_GLOBAL,
'+', LEGACY_HK_NAME( "Switch to Next Layer" ),
"", "" );
TOOL_ACTION GERBVIEW_ACTIONS::layerPrev( "gerbview.Control.layerPrev",
AS_GLOBAL,
'-', LEGACY_HK_NAME( "Switch to Previous Layer" ),
"", "" );
TOOL_ACTION GERBVIEW_ACTIONS::linesDisplayOutlines( "gerbview.Control.linesDisplayOutlines",
AS_GLOBAL,
'L', LEGACY_HK_NAME( "Gbr Lines Display Mode" ),
_( "Sketch Lines" ), _( "Show lines in outline mode" ),
showtrack_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::flashedDisplayOutlines( "gerbview.Control.flashedDisplayOutlines",
AS_GLOBAL,
'F', LEGACY_HK_NAME( "Gbr Flashed Display Mode" ),
_( "Sketch Flashed Items" ), _( "Show flashed items in outline mode" ),
pad_sketch_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::polygonsDisplayOutlines( "gerbview.Control.polygonsDisplayOutlines",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Gbr Polygons Display Mode" ),
_( "Sketch Polygons" ), _( "Show polygons in outline mode" ),
opt_show_polygon_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::negativeObjectDisplay( "gerbview.Control.negativeObjectDisplay",
AS_GLOBAL,
'N', LEGACY_HK_NAME( "Gbr Negative Obj Display Mode" ),
_( "Ghost Negative Objects" ), _( "Show negative objects in ghost color" ),
gerbview_show_negative_objects_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::dcodeDisplay( "gerbview.Control.dcodeDisplay",
AS_GLOBAL,
'D', LEGACY_HK_NAME( "DCodes Display Mode" ),
_( "Show DCodes" ), _( "Show dcode number" ),
show_dcodenumber_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::toggleDiffMode( "gerbview.Control.toggleDiffMode",
AS_GLOBAL, 0, "",
_( "Show in Differential Mode" ), _( "Show layers in diff (compare) mode" ),
gbr_select_mode2_xpm );
// GERBVIEW_SELECTION_TOOL
//
TOOL_ACTION GERBVIEW_ACTIONS::selectionActivate( "gerbview.InteractiveSelection",
AS_GLOBAL, 0, "",
"", "", NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
TOOL_ACTION GERBVIEW_ACTIONS::selectionCursor( "gerbview.InteractiveSelection.Cursor",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::selectItem( "gerbview.InteractiveSelection.SelectItem",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::unselectItem( "gerbview.InteractiveSelection.UnselectItem",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::selectionClear( "gerbview.InteractiveSelection.Clear",
AS_GLOBAL );

View File

@ -27,74 +27,6 @@
#include "gerbview_control.h"
#include "gerbview_selection_tool.h"
TOOL_ACTION GERBVIEW_ACTIONS::layerChanged( "gerbview.Control.layerChanged",
AS_GLOBAL, 0, "", "", "",
nullptr, AF_NOTIFY );
TOOL_ACTION GERBVIEW_ACTIONS::highlightClear( "gerbview.Control.highlightClear",
AS_GLOBAL, 0, "",
_( "Clear Highlight" ), "",
highlight_remove_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightNet( "gerbview.Control.highlightNet",
AS_GLOBAL, 0, "",
_( "Highlight Net" ), "",
general_ratsnest_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightComponent( "gerbview.Control.highlightComponent",
AS_GLOBAL, 0, "",
_( "Highlight Component" ), "",
file_footprint_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::highlightAttribute( "gerbview.Control.highlightAttribute",
AS_GLOBAL, 0, "",
_( "Highlight Attribute" ), "",
flag_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::layerNext( "gerbview.Control.layerNext",
AS_GLOBAL,
'+', LEGACY_HK_NAME( "Switch to Next Layer" ),
"", "" );
TOOL_ACTION GERBVIEW_ACTIONS::layerPrev( "gerbview.Control.layerPrev",
AS_GLOBAL,
'-', LEGACY_HK_NAME( "Switch to Previous Layer" ),
"", "" );
TOOL_ACTION GERBVIEW_ACTIONS::linesDisplayOutlines( "gerbview.Control.linesDisplayOutlines",
AS_GLOBAL,
'L', LEGACY_HK_NAME( "Gbr Lines Display Mode" ),
_( "Sketch Lines" ), _( "Show lines in outline mode" ),
showtrack_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::flashedDisplayOutlines( "gerbview.Control.flashedDisplayOutlines",
AS_GLOBAL,
'F', LEGACY_HK_NAME( "Gbr Flashed Display Mode" ),
_( "Sketch Flashed Items" ), _( "Show flashed items in outline mode" ),
pad_sketch_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::polygonsDisplayOutlines( "gerbview.Control.polygonsDisplayOutlines",
AS_GLOBAL,
'P', LEGACY_HK_NAME( "Gbr Polygons Display Mode" ),
_( "Sketch Polygons" ), _( "Show polygons in outline mode" ),
opt_show_polygon_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::negativeObjectDisplay( "gerbview.Control.negativeObjectDisplay",
AS_GLOBAL,
'N', LEGACY_HK_NAME( "Gbr Negative Obj Display Mode" ),
_( "Ghost Negative Objects" ), _( "Show negative objects in ghost color" ),
gerbview_show_negative_objects_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::dcodeDisplay( "gerbview.Control.dcodeDisplay",
AS_GLOBAL,
'D', LEGACY_HK_NAME( "DCodes Display Mode" ),
_( "Show DCodes" ), _( "Show dcode number" ),
show_dcodenumber_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::toggleDiffMode( "gerbview.Control.toggleDiffMode",
AS_GLOBAL, 0, "",
_( "Show in Differential Mode" ), _( "Show layers in diff (compare) mode" ),
gbr_select_mode2_xpm );
GERBVIEW_CONTROL::GERBVIEW_CONTROL() :
TOOL_INTERACTIVE( "gerbview.Control" ),

View File

@ -41,23 +41,6 @@ using namespace std::placeholders;
#include "gerbview_selection_tool.h"
#include "gerbview_actions.h"
// Selection tool actions
TOOL_ACTION GERBVIEW_ACTIONS::selectionActivate( "gerbview.InteractiveSelection",
AS_GLOBAL, 0, "",
"", "", NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
TOOL_ACTION GERBVIEW_ACTIONS::selectionCursor( "gerbview.InteractiveSelection.Cursor",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::selectItem( "gerbview.InteractiveSelection.SelectItem",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::unselectItem( "gerbview.InteractiveSelection.UnselectItem",
AS_GLOBAL );
TOOL_ACTION GERBVIEW_ACTIONS::selectionClear( "gerbview.InteractiveSelection.Clear",
AS_GLOBAL );
class HIGHLIGHT_MENU : public ACTION_MENU
{

View File

@ -110,12 +110,9 @@ public:
return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope, m_param );
}
const wxString& GetLabel() const { return m_label; }
const wxString& GetMenuItem() const { return m_menuItem; }
const wxString& GetDescription() const { return m_tooltip; }
void SetDescription( const wxString& aDescription ) { m_tooltip = aDescription; }
wxString GetLabel() const;
wxString GetMenuItem() const;
wxString GetDescription() const;
TOOL_ACTION_SCOPE GetScope() const { return m_scope; }
@ -164,7 +161,6 @@ protected:
const std::string m_legacyName; // Name for reading legacy hotkey settings
wxString m_label;
wxString m_menuItem; // Label + hotkey text for menus
wxString m_tooltip;
const BITMAP_OPAQUE* m_icon; // Icon for the menu entry

View File

@ -25,6 +25,7 @@ set( KICAD_SRCS
tree_project_frame.cpp
treeprojectfiles.cpp
treeproject_item.cpp
tools/kicad_manager_actions.cpp
tools/kicad_manager_control.cpp
)

View File

@ -0,0 +1,114 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* 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>
// 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
TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( "kicad.Control.newProject",
AS_GLOBAL,
MD_CTRL + 'N', LEGACY_HK_NAME( "New Project" ),
_( "New Project..." ), _( "Create new blank project" ),
new_project_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( "kicad.Control.newFromTemplate",
AS_GLOBAL,
MD_CTRL + 'T', LEGACY_HK_NAME( "New Project From Template" ),
_( "New Project from Template..." ), _( "Create new project from template" ),
new_project_with_template_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( "kicad.Control.openProject",
AS_GLOBAL,
MD_CTRL + 'O', LEGACY_HK_NAME( "Open Project" ),
_( "Open Project..." ), _( "Open an existing project" ),
open_project_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( "kicad.Control.editSchematic",
AS_GLOBAL,
MD_CTRL + 'E', LEGACY_HK_NAME( "Run Eeschema" ),
_( "Edit Schematic" ), "",
icon_eeschema_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( "kicad.Control.editSymbols",
AS_GLOBAL,
MD_CTRL + 'L', LEGACY_HK_NAME( "Run LibEdit" ),
_( "Edit Schematic Symbols" ), "",
icon_libedit_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
AS_GLOBAL,
MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
_( "Edit PCB" ), "",
icon_pcbnew_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
AS_GLOBAL,
MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
_( "Edit PCB Footprints" ), "",
icon_modedit_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
AS_GLOBAL,
MD_CTRL + 'G', LEGACY_HK_NAME( "Run Gerbview" ),
_( "View Gerber Files" ), "",
icon_gerbview_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( "kicad.Control.convertImage",
AS_GLOBAL,
MD_CTRL + 'B', LEGACY_HK_NAME( "Run Bitmap2Component" ),
_( "Convert Image" ), _( "Convert bitmap images to schematic or PCB components" ),
icon_bitmap2component_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator",
AS_GLOBAL,
MD_CTRL + 'A', LEGACY_HK_NAME( "Run PcbCalculator" ),
_( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
icon_pcbcalculator_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
AS_GLOBAL,
MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
_( "Edit Worksheet" ), _( "Edit worksheet graphics and text" ),
icon_pagelayout_editor_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
AS_GLOBAL,
0, "",
_( "Open Text Editor" ), _( "Launch preferred text editor" ),
editor_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( "kicad.Control.editOtherSch",
AS_GLOBAL );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( "kicad.Control.editOtherPCB",
AS_GLOBAL );

View File

@ -32,85 +32,6 @@
#include <tools/kicad_manager_control.h>
#include <dialogs/dialog_template_selector.h>
TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( "kicad.Control.newProject",
AS_GLOBAL,
MD_CTRL + 'N', LEGACY_HK_NAME( "New Project" ),
_( "New Project..." ), _( "Create new blank project" ),
new_project_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( "kicad.Control.newFromTemplate",
AS_GLOBAL,
MD_CTRL + 'T', LEGACY_HK_NAME( "New Project From Template" ),
_( "New Project from Template..." ), _( "Create new project from template" ),
new_project_with_template_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( "kicad.Control.openProject",
AS_GLOBAL,
MD_CTRL + 'O', LEGACY_HK_NAME( "Open Project" ),
_( "Open Project..." ), _( "Open an existing project" ),
open_project_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( "kicad.Control.editSchematic",
AS_GLOBAL,
MD_CTRL + 'E', LEGACY_HK_NAME( "Run Eeschema" ),
_( "Edit Schematic" ), "",
icon_eeschema_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( "kicad.Control.editSymbols",
AS_GLOBAL,
MD_CTRL + 'L', LEGACY_HK_NAME( "Run LibEdit" ),
_( "Edit Schematic Symbols" ), "",
icon_libedit_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
AS_GLOBAL,
MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
_( "Edit PCB" ), "",
icon_pcbnew_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
AS_GLOBAL,
MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
_( "Edit PCB Footprints" ), "",
icon_modedit_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
AS_GLOBAL,
MD_CTRL + 'G', LEGACY_HK_NAME( "Run Gerbview" ),
_( "View Gerber Files" ), "",
icon_gerbview_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( "kicad.Control.convertImage",
AS_GLOBAL,
MD_CTRL + 'B', LEGACY_HK_NAME( "Run Bitmap2Component" ),
_( "Convert Image" ), _( "Convert bitmap images to schematic or PCB components" ),
icon_bitmap2component_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator",
AS_GLOBAL,
MD_CTRL + 'A', LEGACY_HK_NAME( "Run PcbCalculator" ),
_( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
icon_pcbcalculator_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
AS_GLOBAL,
MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
_( "Edit Worksheet" ), _( "Edit worksheet graphics and text" ),
icon_pagelayout_editor_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
AS_GLOBAL,
0, "",
_( "Open Text Editor" ), _( "Launch preferred text editor" ),
editor_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( "kicad.Control.editOtherSch",
AS_GLOBAL );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( "kicad.Control.editOtherPCB",
AS_GLOBAL );
///> Helper widget to select whether a new directory should be created for a project
class DIR_CHECKBOX : public wxPanel
{

View File

@ -29,6 +29,7 @@ set( PL_EDITOR_SRCS
menubar.cpp
toolbars_pl_editor.cpp
tools/pl_actions.cpp
tools/pl_selection.cpp
tools/pl_selection_tool.cpp
tools/pl_drawing_tools.cpp

View File

@ -0,0 +1,146 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* 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/pl_actions.h>
// 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
// PL_DRAWING_TOOLS
//
TOOL_ACTION PL_ACTIONS::drawLine( "plEditor.InteractiveDrawing.drawLine",
AS_GLOBAL, 0, "",
_( "Add Line" ), _( "Add a line" ),
add_graphical_segments_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::drawRectangle( "plEditor.InteractiveDrawing.drawRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::placeText( "plEditor.InteractiveDrawing.placeText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::placeImage( "plEditor.InteractiveDrawing.placeImage",
AS_GLOBAL, 0, "",
_( "Add Bitmap" ), _( "Add a bitmap image" ),
image_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addLine( "plEditor.InteractiveDrawing.addLine",
AS_GLOBAL, 0, "",
_( "Add Line" ), _( "Add a line" ),
add_dashed_line_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addRectangle( "plEditor.InteractiveDrawing.addRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addText( "plEditor.InteractiveDrawing.addText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addImage( "plEditor.InteractiveDrawing.addImage",
AS_GLOBAL, 0, "",
_( "Add Bitmap" ), _( "Add a bitmap image" ),
image_xpm, AF_ACTIVATE );
// PL_EDIT_TOOL
//
TOOL_ACTION PL_ACTIONS::move( "plEditor.InteractiveEdit.move",
AS_GLOBAL,
'M', LEGACY_HK_NAME( "Move Item" ),
_( "Move" ), _( "Moves the selected item(s)" ),
move_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::appendImportedWorksheet( "plEditor.InteractiveEdit.appendWorksheet",
AS_GLOBAL, 0, "",
_( "Append Existing Page Layout File..." ),
_( "Append an existing page layout design file to current file" ),
import_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::deleteItemCursor( "plEditor.InteractiveEdit.deleteTool",
AS_GLOBAL, 0, "",
_( "Delete Items" ), _( "Delete clicked items" ),
delete_xpm, AF_ACTIVATE );
// PL_EDITOR_CONTROL
//
TOOL_ACTION PL_ACTIONS::refreshPreview( "plEditor.EditorControl.refreshPreview",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::toggleBackground( "plEditor.EditorControl.ToggleBackground",
AS_GLOBAL, 0, "",
_( "Background White" ), _( "Switch between white and black background" ),
palette_xpm );
TOOL_ACTION PL_ACTIONS::showInspector( "plEditor.EditorControl.ShowInspector",
AS_GLOBAL, 0, "",
_( "Show Design Inspector" ), _( "Show the list of items in page layout" ),
spreadsheet_xpm );
// PL_PICKER_TOOL
//
TOOL_ACTION PL_ACTIONS::pickerTool( "plEditor.InteractivePicker",
AS_GLOBAL, 0, "", "", "", NULL, AF_ACTIVATE );
// PL_SELECTION_TOOL
//
TOOL_ACTION PL_ACTIONS::selectionActivate( "plEditor.InteractiveSelection",
AS_GLOBAL, 0, "", "", "", // No description, not shown anywhere
nullptr, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::selectionMenu( "plEditor.InteractiveSelection.SelectionMenu",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::addItemToSel( "plEditor.InteractiveSelection.AddItemToSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::addItemsToSel( "plEditor.InteractiveSelection.AddItemsToSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::removeItemFromSel( "plEditor.InteractiveSelection.RemoveItemFromSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::removeItemsFromSel( "plEditor.InteractiveSelection.RemoveItemsFromSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::clearSelection( "plEditor.InteractiveSelection.ClearSelection",
AS_GLOBAL );

View File

@ -38,48 +38,6 @@
#include <invoke_pl_editor_dialog.h>
// Drawing tool actions
TOOL_ACTION PL_ACTIONS::drawLine( "plEditor.InteractiveDrawing.drawLine",
AS_GLOBAL, 0, "",
_( "Add Line" ), _( "Add a line" ),
add_graphical_segments_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::drawRectangle( "plEditor.InteractiveDrawing.drawRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::placeText( "plEditor.InteractiveDrawing.placeText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::placeImage( "plEditor.InteractiveDrawing.placeImage",
AS_GLOBAL, 0, "",
_( "Add Bitmap" ), _( "Add a bitmap image" ),
image_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addLine( "plEditor.InteractiveDrawing.addLine",
AS_GLOBAL, 0, "",
_( "Add Line" ), _( "Add a line" ),
add_dashed_line_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addRectangle( "plEditor.InteractiveDrawing.addRectangle",
AS_GLOBAL, 0, "",
_( "Add Rectangle" ), _( "Add a rectangle" ),
add_rectangle_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addText( "plEditor.InteractiveDrawing.addText",
AS_GLOBAL, 0, "",
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::addImage( "plEditor.InteractiveDrawing.addImage",
AS_GLOBAL, 0, "",
_( "Add Bitmap" ), _( "Add a bitmap image" ),
image_xpm, AF_ACTIVATE );
PL_DRAWING_TOOLS::PL_DRAWING_TOOLS() :
TOOL_INTERACTIVE( "plEditor.InteractiveDrawing" ),
m_frame( nullptr ),

View File

@ -38,24 +38,6 @@
#include <wildcards_and_files_ext.h>
TOOL_ACTION PL_ACTIONS::move( "plEditor.InteractiveEdit.move",
AS_GLOBAL,
'M', LEGACY_HK_NAME( "Move Item" ),
_( "Move" ), _( "Moves the selected item(s)" ),
move_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::appendImportedWorksheet( "plEditor.InteractiveEdit.appendWorksheet",
AS_GLOBAL, 0, "",
_( "Append Existing Page Layout File..." ),
_( "Append an existing page layout design file to current file" ),
import_xpm, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::deleteItemCursor( "plEditor.InteractiveEdit.deleteTool",
AS_GLOBAL, 0, "",
_( "Delete Items" ), _( "Delete clicked items" ),
delete_xpm, AF_ACTIVATE );
PL_EDIT_TOOL::PL_EDIT_TOOL() :
TOOL_INTERACTIVE( "plEditor.InteractiveEdit" ),
m_frame( nullptr ),

View File

@ -36,20 +36,6 @@
#include <pl_editor_id.h>
#include <dialog_page_settings.h>
TOOL_ACTION PL_ACTIONS::refreshPreview( "plEditor.EditorControl.refreshPreview",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::toggleBackground( "plEditor.EditorControl.ToggleBackground",
AS_GLOBAL, 0, "",
_( "Background White" ), _( "Switch between white and black background" ),
palette_xpm );
TOOL_ACTION PL_ACTIONS::showInspector( "plEditor.EditorControl.ShowInspector",
AS_GLOBAL, 0, "",
_( "Show Design Inspector" ), _( "Show the list of items in page layout" ),
spreadsheet_xpm );
bool PL_EDITOR_CONTROL::Init()
{
m_frame = getEditFrame<PL_EDITOR_FRAME>();

View File

@ -28,9 +28,6 @@
#include <view/view_controls.h>
#include <pl_editor_frame.h>
TOOL_ACTION PL_ACTIONS::pickerTool( "plEditor.InteractivePicker",
AS_GLOBAL, 0, "", "", "", NULL, AF_ACTIVATE );
PL_PICKER_TOOL::PL_PICKER_TOOL() :
TOOL_INTERACTIVE( "plEditor.InteractivePicker" ),

View File

@ -44,30 +44,6 @@
#define MAX_SELECT_ITEM_IDS 40
// Selection tool actions
TOOL_ACTION PL_ACTIONS::selectionActivate( "plEditor.InteractiveSelection",
AS_GLOBAL, 0, "", "", "", // No description, not shown anywhere
nullptr, AF_ACTIVATE );
TOOL_ACTION PL_ACTIONS::selectionMenu( "plEditor.InteractiveSelection.SelectionMenu",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::addItemToSel( "plEditor.InteractiveSelection.AddItemToSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::addItemsToSel( "plEditor.InteractiveSelection.AddItemsToSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::removeItemFromSel( "plEditor.InteractiveSelection.RemoveItemFromSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::removeItemsFromSel( "plEditor.InteractiveSelection.RemoveItemsFromSel",
AS_GLOBAL );
TOOL_ACTION PL_ACTIONS::clearSelection( "plEditor.InteractiveSelection.ClearSelection",
AS_GLOBAL );
SELECTION_CONDITION PL_CONDITIONS::Idle = [] (const SELECTION& aSelection )
{
return ( !aSelection.Front() || aSelection.Front()->GetEditFlags() == 0 );

View File

@ -50,18 +50,6 @@
#include "autoplacer_tool.h"
TOOL_ACTION PCB_ACTIONS::autoplaceSelectedComponents( "pcbnew.Autoplacer.autoplaceSelected",
AS_GLOBAL, 0, "",
_( "Place Selected Footprints" ),
_( "Performs automatic placement of selected components" ),
module_check_xpm );
TOOL_ACTION PCB_ACTIONS::autoplaceOffboardComponents( "pcbnew.Autoplacer.autoplaceOffboard",
AS_GLOBAL, 0, "",
_( "Place Off-Board Footprints" ),
_( "Performs automatic placement of components outside board area" ),
module_xpm );
AUTOPLACE_TOOL::AUTOPLACE_TOOL() : PCB_TOOL_BASE( "pcbnew.Autoplacer" )
{
}

View File

@ -44,7 +44,14 @@
using namespace KIGFX;
static TOOL_ACTION ACT_StartTuning( "pcbnew.LengthTuner.StartTuning",
// 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
static TOOL_ACTION ACT_StartTuning( "pcbnew.LengthTuner.StartTuning",
AS_CONTEXT,
'X', LEGACY_HK_NAME( "Add New Track" ),
_( "New Track" ), _( "Starts laying a new track." ) );
@ -84,6 +91,9 @@ static TOOL_ACTION ACT_AmplDecrease( "pcbnew.LengthTuner.AmplDecrease",
_( "Decrease Amplitude" ), _( "Decrease meander amplitude by one step." ),
router_len_tuner_amplitude_decr_xpm );
#undef _
#define _(s) wxGetTranslation((s))
LENGTH_TUNER_TOOL::LENGTH_TUNER_TOOL() :
TOOL_BASE( "pcbnew.LengthTuner" )

View File

@ -76,84 +76,14 @@ enum VIA_ACTION_FLAGS
};
TOOL_ACTION PCB_ACTIONS::routerActivateSingle( "pcbnew.InteractiveRouter.SingleTrack",
AS_GLOBAL,
'X', LEGACY_HK_NAME( "Add New Track" ),
_( "Interactive Router (Single Tracks)" ), _( "Run push & shove router (single tracks)" ),
add_tracks_xpm, AF_ACTIVATE );
// 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.
TOOL_ACTION PCB_ACTIONS::routerActivateDiffPair( "pcbnew.InteractiveRouter.DiffPair",
AS_GLOBAL,
'6', LEGACY_HK_NAME( "Route Differential Pair (Modern Toolset only)" ),
_( "Interactive Router (Differential Pairs)" ), _( "Run push & shove router (differential pairs)" ),
ps_diff_pair_xpm, AF_ACTIVATE );
#undef _
#define _(s) s
TOOL_ACTION PCB_ACTIONS::routerSettingsDialog( "pcbnew.InteractiveRouter.SettingsDialog",
AS_GLOBAL,
MD_CTRL + MD_SHIFT + ',', LEGACY_HK_NAME( "Routing Options" ),
_( "Interactive Router Settings..." ), _( "Open Interactive Router settings" ),
tools_xpm );
TOOL_ACTION PCB_ACTIONS::routerDiffPairDialog( "pcbnew.InteractiveRouter.DiffPairDialog",
AS_GLOBAL, 0, "",
_( "Differential Pair Dimensions..." ), _( "Open Differential Pair Dimension settings" ),
ps_diff_pair_gap_xpm );
TOOL_ACTION PCB_ACTIONS::selectLayerPair( "pcbnew.InteractiveRouter.SelectLayerPair",
AS_GLOBAL, 0, "",
_( "Set Layer Pair..." ), _( "Change active layer pair for routing" ),
select_layer_pair_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::routerTuneSingleTrace( "pcbnew.LengthTuner.TuneSingleTrack",
AS_GLOBAL,
'7', LEGACY_HK_NAME( "Tune Single Track (Modern Toolset only)" ),
_( "Tune length of a single track" ), "",
ps_tune_length_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::routerTuneDiffPair( "pcbnew.LengthTuner.TuneDiffPair",
AS_GLOBAL,
'8', LEGACY_HK_NAME( "Tune Differential Pair Length (Modern Toolset only)" ),
_( "Tune length of a differential pair" ), "",
nullptr, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::routerTuneDiffPairSkew( "pcbnew.LengthTuner.TuneDiffPairSkew",
AS_GLOBAL,
'9', LEGACY_HK_NAME( "Tune Differential Pair Skew (Modern Toolset only)" ),
_( "Tune skew of a differential pair" ), "",
nullptr, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::routerInlineDrag( "pcbnew.InteractiveRouter.InlineDrag",
AS_CONTEXT, 0, "",
_( "Drag Track/Via" ), _( "Drags tracks and vias without breaking connections" ),
drag_xpm );
TOOL_ACTION PCB_ACTIONS::inlineBreakTrack( "pcbnew.InteractiveRouter.InlineBreakTrack",
AS_GLOBAL, 0, "",
_( "Break Track" ),
_( "Splits the track segment into two segments connected at the cursor position." ),
break_line_xpm );
TOOL_ACTION PCB_ACTIONS::breakTrack( "pcbnew.InteractiveRouter.BreakTrack",
AS_GLOBAL, 0, "",
_( "Break Track" ),
_( "Splits the track segment into two segments connected at the cursor position." ),
break_line_xpm );
TOOL_ACTION PCB_ACTIONS::drag45Degree( "pcbnew.InteractiveRouter.Drag45Degree",
AS_GLOBAL,
'D', LEGACY_HK_NAME( "Drag Track Keep Slope" ),
_( "Drag (45 degree mode)" ),
_( "Drags the track segment while keeping connected tracks at 45 degrees." ),
drag_segment_withslope_xpm );
TOOL_ACTION PCB_ACTIONS::dragFreeAngle( "pcbnew.InteractiveRouter.DragFreeAngle",
AS_GLOBAL,
'G', LEGACY_HK_NAME( "Drag Item" ),
_( "Drag (free angle)" ),
_( "Drags the nearest joint in the track without restricting the track angle." ),
move_xpm );
static const TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack",
static const TOOL_ACTION ACT_NewTrack( "pcbnew.InteractiveRouter.NewTrack",
AS_CONTEXT,
'X', LEGACY_HK_NAME( "Add New Track" ),
_( "New Track" ), _( "Starts laying a new track." ),
@ -220,6 +150,10 @@ static const TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPost
_( "Switches posture of the currently routed track." ),
change_entry_orient_xpm );
#undef _
#define _(s) wxGetTranslation((s))
ROUTER_TOOL::ROUTER_TOOL() :
TOOL_BASE( "pcbnew.InteractiveRouter" )
{

View File

@ -63,120 +63,6 @@
using SCOPED_DRAW_MODE = SCOPED_SET_RESET<DRAWING_TOOL::MODE>;
// Drawing tool actions
TOOL_ACTION PCB_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'L', LEGACY_HK_NAME( "Draw Line" ),
_( "Draw Line" ), _( "Draw a line" ),
add_graphical_segments_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawPolygon( "pcbnew.InteractiveDrawing.graphicPolygon",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'P', LEGACY_HK_NAME( "Draw Graphic Polygon" ),
_( "Draw Graphic Polygon" ), _( "Draw a graphic polygon" ),
add_graphical_polygon_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'C', LEGACY_HK_NAME( "Draw Circle" ),
_( "Draw Circle" ), _( "Draw a circle" ),
add_circle_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'A', LEGACY_HK_NAME( "Draw Arc" ),
_( "Draw Arc" ), _( "Draw an arc" ),
add_arc_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'T', LEGACY_HK_NAME( "Add Text" ),
_( "Add Text" ), _( "Add a text item" ),
text_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawDimension( "pcbnew.InteractiveDrawing.dimension",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'H', LEGACY_HK_NAME( "Add Dimension" ),
_( "Add Dimension" ), _( "Add a dimension" ),
add_dimension_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawZone( "pcbnew.InteractiveDrawing.zone",
AS_GLOBAL,
#ifdef __WXOSX_MAC__
MD_ALT + 'Z',
#else
MD_SHIFT + MD_CTRL + 'Z',
#endif
LEGACY_HK_NAME( "Add Filled Zone" ),
_( "Add Filled Zone" ), _( "Add a filled zone" ),
add_zone_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawVia( "pcbnew.InteractiveDrawing.via",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'V', LEGACY_HK_NAME( "Add Vias" ),
_( "Add Vias" ), _( "Add free-standing vias" ),
add_via_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawZoneKeepout( "pcbnew.InteractiveDrawing.keepout",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'K', LEGACY_HK_NAME( "Add Keepout Area" ),
_( "Add Keepout Area" ), _( "Add a keepout area" ),
add_keepout_area_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawZoneCutout( "pcbnew.InteractiveDrawing.zoneCutout",
AS_GLOBAL,
MD_SHIFT + 'C', LEGACY_HK_NAME( "Add a Zone Cutout" ),
_( "Add a Zone Cutout" ), _( "Add a cutout area of an existing zone" ),
add_zone_cutout_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drawSimilarZone( "pcbnew.InteractiveDrawing.similarZone",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + '.', LEGACY_HK_NAME( "Add a Similar Zone" ),
_( "Add a Similar Zone" ), _( "Add a zone with the same settings as an existing zone" ),
add_zone_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::placeImportedGraphics( "pcbnew.InteractiveDrawing.placeImportedGraphics",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'F', LEGACY_HK_NAME( "Place DXF" ),
_( "Place Imported Graphics" ), "",
import_vector_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'N', LEGACY_HK_NAME( "Place the Footprint Anchor" ),
_( "Place the Footprint Anchor" ), "",
anchor_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::incWidth( "pcbnew.InteractiveDrawing.incWidth",
AS_CONTEXT,
MD_CTRL + '+', LEGACY_HK_NAME( "Increase Line Width" ),
_( "Increase Line Width" ), _( "Increase the line width" ) );
TOOL_ACTION PCB_ACTIONS::decWidth( "pcbnew.InteractiveDrawing.decWidth",
AS_CONTEXT,
MD_CTRL + '-', LEGACY_HK_NAME( "Decrease Line Width" ),
_( "Decrease Line Width" ), _( "Decrease the line width" ) );
TOOL_ACTION PCB_ACTIONS::arcPosture( "pcbnew.InteractiveDrawing.arcPosture",
AS_CONTEXT,
'/', LEGACY_HK_NAME( "Switch Track Posture" ),
_( "Switch Arc Posture" ), _( "Switch the arc posture" ) );
/*
* Contextual actions
*/
static TOOL_ACTION deleteLastPoint( "pcbnew.InteractiveDrawing.deleteLastPoint",
AS_CONTEXT,
WXK_BACK, "",
_( "Delete Last Point" ), _( "Delete the last point added to the current item" ),
undo_xpm );
static TOOL_ACTION closeZoneOutline( "pcbnew.InteractiveDrawing.closeZoneOutline",
AS_CONTEXT, 0, "",
_( "Close Zone Outline" ), _( "Close the outline of a zone in progress" ),
checked_ok_xpm );
DRAWING_TOOL::DRAWING_TOOL() :
PCB_TOOL_BASE( "pcbnew.InteractiveDrawing" ),
@ -215,8 +101,8 @@ bool DRAWING_TOOL::Init()
ctxMenu.AddSeparator( 1 );
// tool-specific actions
ctxMenu.AddItem( closeZoneOutline, zoneActiveFunctor, 200 );
ctxMenu.AddItem( deleteLastPoint, canUndoPoint, 200 );
ctxMenu.AddItem( PCB_ACTIONS::closeZoneOutline, zoneActiveFunctor, 200 );
ctxMenu.AddItem( PCB_ACTIONS::deleteLastPoint, canUndoPoint, 200 );
ctxMenu.AddSeparator( 500 );
@ -1287,7 +1173,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
arcManager.AddPoint( cursorPos, true );
}
else if( evt->IsAction( &deleteLastPoint ) )
else if( evt->IsAction( &PCB_ACTIONS::deleteLastPoint ) )
{
arcManager.RemoveLastPoint();
}
@ -1484,11 +1370,11 @@ int DRAWING_TOOL::drawZone( bool aKeepout, ZONE_MODE aMode )
// events that lock in nodes
else if( evt->IsClick( BUT_LEFT )
|| evt->IsDblClick( BUT_LEFT )
|| evt->IsAction( &closeZoneOutline ) )
|| evt->IsAction( &PCB_ACTIONS::closeZoneOutline ) )
{
// Check if it is double click / closing line (so we have to finish the zone)
const bool endPolygon = evt->IsDblClick( BUT_LEFT )
|| evt->IsAction( &closeZoneOutline )
|| evt->IsAction( &PCB_ACTIONS::closeZoneOutline )
|| polyGeomMgr.NewPointClosesOutline( cursorPos );
if( endPolygon )
@ -1513,7 +1399,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout, ZONE_MODE aMode )
}
}
else if( evt->IsAction( &deleteLastPoint ) )
else if( evt->IsAction( &PCB_ACTIONS::deleteLastPoint ) )
{
polyGeomMgr.DeleteLastCorner();

View File

@ -59,12 +59,6 @@
#include <drc/courtyard_overlap.h>
TOOL_ACTION PCB_ACTIONS::runDRC( "pcbnew.DRCTool.runDRC",
AS_GLOBAL, 0, "",
_( "Design Rules Checker" ), _( "Show the design rules checker window" ),
erc_xpm );
DRC::DRC() :
PCB_TOOL_BASE( "pcbnew.DRCTool" )
{

View File

@ -64,94 +64,6 @@ using namespace std::placeholders;
#include <board_commit.h>
// Edit tool actions
TOOL_ACTION PCB_ACTIONS::editFootprintInFpEditor( "pcbnew.InteractiveEdit.EditFpInFpEditor",
AS_GLOBAL,
MD_CTRL + 'E', LEGACY_HK_NAME( "Edit with Footprint Editor" ),
_( "Open in Footprint Editor" ),
_( "Opens the selected footprint in the Footprint Editor" ),
module_editor_xpm );
TOOL_ACTION PCB_ACTIONS::editActivate( "pcbnew.InteractiveEdit",
AS_GLOBAL, 0, "",
_( "Edit Activate" ), "",
move_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::move( "pcbnew.InteractiveEdit.move",
AS_GLOBAL,
'M', LEGACY_HK_NAME( "Move Item" ),
_( "Move" ), _( "Moves the selected item(s)" ),
move_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::duplicate( "pcbnew.InteractiveEdit.duplicate",
AS_GLOBAL,
MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate Item" ),
_( "Duplicate" ), _( "Duplicates the selected item(s)" ),
duplicate_xpm );
TOOL_ACTION PCB_ACTIONS::duplicateIncrement( "pcbnew.InteractiveEdit.duplicateIncrementPads",
AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate Item and Increment" ),
_( "Duplicate" ), _( "Duplicates the selected item(s), incrementing pad numbers" ),
duplicate_xpm );
TOOL_ACTION PCB_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact",
AS_GLOBAL,
MD_CTRL + 'M', LEGACY_HK_NAME( "Move Item Exactly" ),
_( "Move Exactly..." ), _( "Moves the selected item(s) by an exact amount" ),
move_exactly_xpm );
TOOL_ACTION PCB_ACTIONS::createArray( "pcbnew.InteractiveEdit.createArray",
AS_GLOBAL,
MD_CTRL + 'T', LEGACY_HK_NAME( "Create Array" ),
_( "Create Array..." ), _( "Create array" ),
array_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::rotateCw( "pcbnew.InteractiveEdit.rotateCw",
AS_GLOBAL,
MD_SHIFT + 'R', LEGACY_HK_NAME( "Rotate Item Clockwise (Modern Toolset only)" ),
_( "Rotate Clockwise" ), _( "Rotates selected item(s) clockwise" ),
rotate_cw_xpm, AF_NONE, (void*) -1 );
TOOL_ACTION PCB_ACTIONS::rotateCcw( "pcbnew.InteractiveEdit.rotateCcw",
AS_GLOBAL,
'R', LEGACY_HK_NAME( "Rotate Item" ),
_( "Rotate Counterclockwise" ), _( "Rotates selected item(s) counterclockwise" ),
rotate_ccw_xpm, AF_NONE, (void*) 1 );
TOOL_ACTION PCB_ACTIONS::flip( "pcbnew.InteractiveEdit.flip",
AS_GLOBAL,
'F', LEGACY_HK_NAME( "Flip Item" ),
_( "Flip" ), _( "Flips selected item(s) to opposite side of board" ),
swap_layer_xpm );
TOOL_ACTION PCB_ACTIONS::mirror( "pcbnew.InteractiveEdit.mirror",
AS_GLOBAL, 0, "",
_( "Mirror" ), _( "Mirrors selected item" ),
mirror_h_xpm );
TOOL_ACTION PCB_ACTIONS::remove( "pcbnew.InteractiveEdit.remove",
AS_GLOBAL,
WXK_BACK, "",
_( "Delete" ), _( "Deletes selected item(s)" ),
delete_xpm, AF_NONE, (void*) REMOVE_FLAGS::NORMAL );
TOOL_ACTION PCB_ACTIONS::deleteFull( "pcbnew.InteractiveEdit.deleteFull",
AS_GLOBAL,
WXK_DELETE, LEGACY_HK_NAME( "Delete Full Track" ),
_( "Delete Full Track" ), _( "Deletes selected item(s) and copper connections" ),
delete_xpm, AF_NONE, (void*) REMOVE_FLAGS::ALT );
TOOL_ACTION PCB_ACTIONS::properties( "pcbnew.InteractiveEdit.properties",
AS_GLOBAL,
'E', LEGACY_HK_NAME( "Edit Item" ),
_( "Properties..." ), _( "Displays item properties dialog" ),
config_xpm );
TOOL_ACTION PCB_ACTIONS::updateUnits( "pcbnew.InteractiveEdit.updateUnits",
AS_GLOBAL );
void EditToolSelectionFilter( GENERAL_COLLECTOR& aCollector, int aFlags )
{
// Iterate from the back so we don't have to worry about removals.

View File

@ -54,96 +54,6 @@ using namespace std::placeholders;
#include <wx/defs.h>
TOOL_ACTION PCB_ACTIONS::toggleFootprintTree( "pcbnew.ModuleEditor.toggleFootprintTree",
AS_GLOBAL, 0, "",
_( "Show Footprint Tree" ), _( "Toggles the footprint tree visibility" ),
search_tree_xpm );
TOOL_ACTION PCB_ACTIONS::newFootprint( "pcbnew.ModuleEditor.newFootprint",
AS_GLOBAL,
MD_CTRL + 'N', LEGACY_HK_NAME( "New" ),
_( "New Footprint..." ), _( "Create a new, empty footprint" ),
new_footprint_xpm );
TOOL_ACTION PCB_ACTIONS::createFootprint( "pcbnew.ModuleEditor.createFootprint",
AS_GLOBAL, 0, "",
_( "Create Footprint..." ), _( "Create a new footprint using the Footprint Wizard" ),
module_wizard_xpm );
TOOL_ACTION PCB_ACTIONS::saveToBoard( "pcbnew.ModuleEditor.saveToBoard",
AS_GLOBAL, 0, "",
_( "Save to Board" ), _( "Update footprint on board" ),
save_fp_to_board_xpm );
TOOL_ACTION PCB_ACTIONS::saveToLibrary( "pcbnew.ModuleEditor.saveToLibrary",
AS_GLOBAL, 0, "",
_( "Save to Library" ), _( "Save changes to library" ),
save_xpm );
TOOL_ACTION PCB_ACTIONS::editFootprint( "pcbnew.ModuleEditor.editFootprint",
AS_GLOBAL, 0, "",
_( "Edit Footprint" ), _( "Show selected footprint on editor canvas" ),
edit_xpm );
TOOL_ACTION PCB_ACTIONS::deleteFootprint( "pcbnew.ModuleEditor.deleteFootprint",
AS_GLOBAL, 0, "",
_( "Delete Footprint from Library" ), "",
delete_xpm );
TOOL_ACTION PCB_ACTIONS::cutFootprint( "pcbnew.ModuleEditor.cutFootprint",
AS_GLOBAL, 0, "",
_( "Cut Footprint" ), "",
cut_xpm );
TOOL_ACTION PCB_ACTIONS::copyFootprint( "pcbnew.ModuleEditor.copyFootprint",
AS_GLOBAL, 0, "",
_( "Copy Footprint" ), "",
copy_xpm );
TOOL_ACTION PCB_ACTIONS::pasteFootprint( "pcbnew.ModuleEditor.pasteFootprint",
AS_GLOBAL, 0, "",
_( "Paste Footprint" ), "",
paste_xpm );
TOOL_ACTION PCB_ACTIONS::importFootprint( "pcbnew.ModuleEditor.importFootprint",
AS_GLOBAL, 0, "",
_( "Import Footprint..." ), "",
import_module_xpm );
TOOL_ACTION PCB_ACTIONS::exportFootprint( "pcbnew.ModuleEditor.exportFootprint",
AS_GLOBAL, 0, "",
_( "Export Footprint..." ), "",
export_module_xpm );
// Module editor tools
TOOL_ACTION PCB_ACTIONS::footprintProperties( "pcbnew.ModuleEditor.footprintProperties",
AS_GLOBAL, 0, "",
_( "Footprint Properties..." ), "",
module_options_xpm );
TOOL_ACTION PCB_ACTIONS::placePad( "pcbnew.ModuleEditor.placePad",
AS_GLOBAL, 0, "",
_( "Add Pad" ), _( "Add a pad" ),
pad_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::createPadFromShapes( "pcbnew.ModuleEditor.createPadFromShapes",
AS_CONTEXT, 0, "",
_( "Create Pad from Selected Shapes" ),
_( "Creates a custom-shaped pads from a set of selected shapes" ),
primitives_to_custom_pad_xpm );
TOOL_ACTION PCB_ACTIONS::explodePadToShapes( "pcbnew.ModuleEditor.explodePadToShapes",
AS_CONTEXT, 0, "",
_( "Explode Pad to Graphic Shapes" ),
_( "Converts a custom-shaped pads to a set of graphical shapes" ),
custom_pad_to_primitives_xpm );
TOOL_ACTION PCB_ACTIONS::defaultPadProperties( "pcbnew.ModuleEditor.defaultPadProperties",
AS_GLOBAL, 0, "",
_( "Default Pad Properties..." ), _( "Edit the pad properties used when creating new pads" ),
options_pad_xpm );
MODULE_EDITOR_TOOLS::MODULE_EDITOR_TOOLS() :
PCB_TOOL_BASE( "pcbnew.ModuleEditor" ),
m_frame( nullptr )

View File

@ -34,56 +34,6 @@
#include <board_commit.h>
TOOL_ACTION PCB_ACTIONS::updateFootprint( "pcbnew.GlobalEdit.updateFootprint",
AS_GLOBAL, 0, "",
_( "Update Footprint..." ),
_( "Update footprint to include any changes from the library" ),
reload_xpm );
TOOL_ACTION PCB_ACTIONS::updateFootprints( "pcbnew.GlobalEdit.updateFootprints",
AS_GLOBAL, 0, "",
_( "Update Footprints from Library..." ),
_( "Update footprints to include any changes from the library" ),
reload_xpm );
TOOL_ACTION PCB_ACTIONS::changeFootprint( "pcbnew.GlobalEdit.changeFootprint",
AS_GLOBAL, 0, "",
_( "Change Footprint..." ), _( "Assign a different footprint from the library" ),
exchange_xpm );
TOOL_ACTION PCB_ACTIONS::changeFootprints( "pcbnew.GlobalEdit.changeFootprints",
AS_GLOBAL, 0, "",
_( "Change Footprints..." ), _( "Assign different footprints from the library" ),
exchange_xpm );
TOOL_ACTION PCB_ACTIONS::swapLayers( "pcbnew.GlobalEdit.swapLayers",
AS_GLOBAL, 0, "",
_( "Swap Layers..." ), _( "Move tracks or drawings from one layer to another" ),
swap_layer_xpm );
TOOL_ACTION PCB_ACTIONS::editTracksAndVias( "pcbnew.GlobalEdit.editTracksAndVias",
AS_GLOBAL, 0, "",
_( "Edit Track && Via Properties..." ), "",
width_track_via_xpm );
TOOL_ACTION PCB_ACTIONS::editTextAndGraphics( "pcbnew.GlobalEdit.editTextAndGraphics",
AS_GLOBAL, 0, "",
_( "Edit Text && Graphic Properties..." ), "",
reset_text_xpm );
TOOL_ACTION PCB_ACTIONS::globalDeletions( "pcbnew.GlobalEdit.globalDeletions",
AS_GLOBAL, 0, "",
_( "Global Deletions..." ),
_( "Delete tracks, footprints and graphic items from board" ),
general_deletions_xpm );
TOOL_ACTION PCB_ACTIONS::cleanupTracksAndVias( "pcbnew.GlobalEdit.cleanupTracksAndVias",
AS_GLOBAL, 0, "",
_( "Cleanup Tracks && Vias..." ),
_( "Clean stubs, vias, delete break points or unconnected tracks" ),
delete_xpm );
GLOBAL_EDIT_TOOL::GLOBAL_EDIT_TOOL() :
PCB_TOOL_BASE( "pcbnew.GlobalEdit" )
{

View File

@ -22,7 +22,6 @@
*/
#include "microwave_tool.h"
#include <gal/graphics_abstraction_layer.h>
#include <class_draw_panel_gal.h>
#include <view/view_controls.h>
@ -32,64 +31,16 @@
#include <confirm.h>
#include <preview_items/two_point_geom_manager.h>
#include <preview_items/centreline_rect_item.h>
// For frame ToolID values
#include <pcbnew_id.h>
// For action icons
#include <bitmaps.h>
#include <class_board_item.h>
#include <class_module.h>
#include <microwave/microwave_inductor.h>
#include "pcb_actions.h"
#include "selection_tool.h"
#include "tool_event_utils.h"
///> Type of items that are "simple" - just get placed on
///> the board directly, without a graphical interactive setup stage
enum MWAVE_TOOL_SIMPLE_ID
{
GAP,
STUB,
STUB_ARC,
FUNCTION_SHAPE,
};
TOOL_ACTION PCB_ACTIONS::microwaveCreateGap(
"pcbnew.MicrowaveTool.createGap",
AS_GLOBAL, 0, "",
_( "Add Gap" ), _( "Create gap of specified length for microwave applications" ),
mw_add_gap_xpm, AF_ACTIVATE, (void*) MWAVE_TOOL_SIMPLE_ID::GAP );
TOOL_ACTION PCB_ACTIONS::microwaveCreateStub(
"pcbnew.MicrowaveTool.createStub",
AS_GLOBAL, 0, "",
_( "Add Stub" ), _( "Create stub of specified length for microwave applications" ),
mw_add_stub_xpm, AF_ACTIVATE, (void*) MWAVE_TOOL_SIMPLE_ID::STUB );
TOOL_ACTION PCB_ACTIONS::microwaveCreateStubArc(
"pcbnew.MicrowaveTool.createStubArc",
AS_GLOBAL, 0, "",
_( "Add Arc Stub" ), _( "Create stub (arc) of specified length for microwave applications" ),
mw_add_stub_arc_xpm, AF_ACTIVATE, (void*) MWAVE_TOOL_SIMPLE_ID::STUB_ARC );
TOOL_ACTION PCB_ACTIONS::microwaveCreateFunctionShape(
"pcbnew.MicrowaveTool.createFunctionShape",
AS_GLOBAL, 0, "",
_( "Add Polynomial Shape" ), _( "Create polynomial shape for microwave applications" ),
mw_add_gap_xpm, AF_ACTIVATE, (void*) MWAVE_TOOL_SIMPLE_ID::FUNCTION_SHAPE );
TOOL_ACTION PCB_ACTIONS::microwaveCreateLine(
"pcbnew.MicrowaveTool.createLine",
AS_GLOBAL, 0, "",
_( "Add Microwave Line" ), _( "Create line of specified length for microwave applications" ),
mw_add_line_xpm, AF_ACTIVATE );
MICROWAVE_TOOL::MICROWAVE_TOOL() :
PCB_TOOL_BASE( "pcbnew.MicrowaveTool" )
{

View File

@ -42,27 +42,6 @@
#include <dialogs/dialog_enum_pads.h>
#include "pcbnew_id.h"
// Pad tools
TOOL_ACTION PCB_ACTIONS::copyPadSettings( "pcbnew.PadTool.CopyPadSettings",
AS_GLOBAL, 0, "",
_( "Copy Pad Properties" ), _( "Copy current pad's properties" ),
copy_pad_settings_xpm );
TOOL_ACTION PCB_ACTIONS::applyPadSettings( "pcbnew.PadTool.ApplyPadSettings",
AS_GLOBAL, 0, "",
_( "Paste Pad Properties" ), _( "Replace the current pad's properties with those copied earlier" ),
apply_pad_settings_xpm );
TOOL_ACTION PCB_ACTIONS::pushPadSettings( "pcbnew.PadTool.PushPadSettings",
AS_GLOBAL, 0, "",
_( "Push Pad Properties..." ), _( "Copy the current pad's properties to other pads" ),
push_pad_settings_xpm );
TOOL_ACTION PCB_ACTIONS::enumeratePads( "pcbnew.PadTool.enumeratePads",
AS_GLOBAL, 0, "",
_( "Renumber Pads..." ), _( "Renumber pads by clicking on them in the desired order" ),
pad_enumerate_xpm, AF_ACTIVATE );
class PAD_CONTEXT_MENU : public ACTION_MENU
{

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,16 @@
class TOOL_EVENT;
class TOOL_MANAGER;
// Type of microwave items that are "simple" - just get placed on the board directly,
// without a graphical interactive setup stage
enum MWAVE_TOOL_SIMPLE_ID
{
GAP,
STUB,
STUB_ARC,
FUNCTION_SHAPE,
};
/**
* Class PCB_ACTIONS
*
@ -145,6 +155,8 @@ public:
static TOOL_ACTION placeModule;
static TOOL_ACTION placeImportedGraphics;
static TOOL_ACTION setAnchor;
static TOOL_ACTION deleteLastPoint;
static TOOL_ACTION closeZoneOutline;
/// Increase width of currently drawn line
static TOOL_ACTION incWidth;

View File

@ -66,193 +66,6 @@
using namespace std::placeholders;
TOOL_ACTION PCB_ACTIONS::boardSetup( "pcbnew.EditorControl.boardSetup",
AS_GLOBAL, 0, "",
_( "Board Setup..." ),
_( "Edit board setup including layers, design rules and various defaults" ),
options_board_xpm );
TOOL_ACTION PCB_ACTIONS::importNetlist( "pcbnew.EditorControl.importNetlist",
AS_GLOBAL, 0, "",
_( "Netlist..." ), _( "Read netlist and update board connectivity" ),
netlist_xpm );
TOOL_ACTION PCB_ACTIONS::importSpecctraSession( "pcbnew.EditorControl.importSpecctraSession",
AS_GLOBAL, 0, "",
_( "Specctra Session..." ), _( "Import routed Specctra session (*.ses) file" ),
import_xpm );
TOOL_ACTION PCB_ACTIONS::exportSpecctraDSN( "pcbnew.EditorControl.exportSpecctraDSN",
AS_GLOBAL, 0, "",
_( "Specctra DSN..." ), _( "Export Specctra DSN routing info" ),
export_dsn_xpm );
TOOL_ACTION PCB_ACTIONS::generateGerbers( "pcbnew.EditorControl.generateGerbers",
AS_GLOBAL, 0, "",
_( "&Gerbers (.gbr)..." ), _( "Generate Gerbers for fabrication" ),
post_compo_xpm );
TOOL_ACTION PCB_ACTIONS::generateDrillFiles( "pcbnew.EditorControl.generateDrillFiles",
AS_GLOBAL, 0, "",
_( "&Drill Files (.drl)..." ), _( "Generate Excellon drill file(s)" ),
post_drill_xpm );
TOOL_ACTION PCB_ACTIONS::generatePosFile( "pcbnew.EditorControl.generatePosFile",
AS_GLOBAL, 0, "",
_( "Footprint &Positions (.pos)..." ),
_( "Generate footprint position file for pick and place" ),
post_compo_xpm );
TOOL_ACTION PCB_ACTIONS::generateReportFile( "pcbnew.EditorControl.generateReportFile",
AS_GLOBAL, 0, "",
_( "&Footprint Report (.rpt)..." ),
_( "Create report of all footprints from current board" ),
tools_xpm );
TOOL_ACTION PCB_ACTIONS::generateD356File( "pcbnew.EditorControl.generateD356File",
AS_GLOBAL, 0, "",
_( "IPC-D-356 Netlist File..." ), _( "Generate IPC-D-356 netlist file" ),
netlist_xpm );
TOOL_ACTION PCB_ACTIONS::generateBOM( "pcbnew.EditorControl.generateBOM",
AS_GLOBAL, 0, "",
_( "&BOM..." ), _( "Create bill of materials from current schematic" ),
bom_xpm );
// Track & via size control
TOOL_ACTION PCB_ACTIONS::trackWidthInc( "pcbnew.EditorControl.trackWidthInc",
AS_GLOBAL,
'W', LEGACY_HK_NAME( "Switch Track Width To Next" ),
"", "" );
TOOL_ACTION PCB_ACTIONS::trackWidthDec( "pcbnew.EditorControl.trackWidthDec",
AS_GLOBAL,
MD_SHIFT + 'W', LEGACY_HK_NAME( "Switch Track Width To Previous" ),
"", "" );
TOOL_ACTION PCB_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc",
AS_GLOBAL,
'\'', LEGACY_HK_NAME( "Increase Via Size" ),
"", "" );
TOOL_ACTION PCB_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec",
AS_GLOBAL,
'\\', LEGACY_HK_NAME( "Decrease Via Size" ),
"", "" );
TOOL_ACTION PCB_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged",
AS_GLOBAL, 0, "",
"", "",
nullptr, AF_NOTIFY );
TOOL_ACTION PCB_ACTIONS::zoneMerge( "pcbnew.EditorControl.zoneMerge",
AS_GLOBAL, 0, "",
_( "Merge Zones" ), _( "Merge zones" ) );
TOOL_ACTION PCB_ACTIONS::zoneDuplicate( "pcbnew.EditorControl.zoneDuplicate",
AS_GLOBAL, 0, "",
_( "Duplicate Zone onto Layer..." ), _( "Duplicate zone outline onto a different layer" ),
zone_duplicate_xpm );
TOOL_ACTION PCB_ACTIONS::placeTarget( "pcbnew.EditorControl.placeTarget",
AS_GLOBAL, 0, "",
_( "Add Layer Alignment Target" ), _( "Add a layer alignment target" ),
add_pcb_target_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::placeModule( "pcbnew.EditorControl.placeModule",
AS_GLOBAL,
'O', LEGACY_HK_NAME( "Add Footprint" ),
_( "Add Footprint" ), _( "Add a footprint" ),
module_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::drillOrigin( "pcbnew.EditorControl.drillOrigin",
AS_GLOBAL, 0, "",
_( "Drill and Place Offset" ), _( "Place origin point for drill and place files" ),
pcb_offset_xpm );
TOOL_ACTION PCB_ACTIONS::crossProbeSchToPcb( "pcbnew.EditorControl.crossProbSchToPcb",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::toggleLock( "pcbnew.EditorControl.toggleLock",
AS_GLOBAL,
'L', LEGACY_HK_NAME( "Lock/Unlock Footprint" ),
"Toggle Lock", "",
lock_unlock_xpm );
TOOL_ACTION PCB_ACTIONS::lock( "pcbnew.EditorControl.lock",
AS_GLOBAL, 0, "",
_( "Lock" ), "",
locked_xpm );
TOOL_ACTION PCB_ACTIONS::unlock( "pcbnew.EditorControl.unlock",
AS_GLOBAL, 0, "",
_( "Unlock" ), "",
unlocked_xpm );
TOOL_ACTION PCB_ACTIONS::appendBoard( "pcbnew.EditorControl.appendBoard",
AS_GLOBAL, 0, "",
"Append Board...", "",
add_board_xpm );
TOOL_ACTION PCB_ACTIONS::highlightNet( "pcbnew.EditorControl.highlightNet",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::toggleLastNetHighlight( "pcbnew.EditorControl.toggleLastNetHighlight",
AS_GLOBAL, 0, "",
_( "Toggle Last Net Highlight" ), _( "Toggle between last two highlighted nets" ) );
TOOL_ACTION PCB_ACTIONS::clearHighlight( "pcbnew.EditorControl.clearHighlight",
AS_GLOBAL, 0, "",
_( "Clear Net Highlighting" ), "" );
TOOL_ACTION PCB_ACTIONS::highlightNetTool( "pcbnew.EditorControl.highlightNetTool",
AS_GLOBAL, 0, "",
_( "Highlight Nets" ), _( "Highlight all copper items of a net" ),
net_highlight_xpm );
TOOL_ACTION PCB_ACTIONS::highlightNetSelection( "pcbnew.EditorControl.highlightNetSelection",
AS_GLOBAL,
'`', LEGACY_HK_NAME( "Toggle Highlight of Selected Net (Modern Toolset only)" ),
_( "Highlight Net" ), _( "Highlight all copper items of a net" ),
net_highlight_xpm );
TOOL_ACTION PCB_ACTIONS::localRatsnestTool( "pcbnew.Control.localRatsnestTool",
AS_GLOBAL, 0, "",
_( "Highlight Ratsnest" ), "",
tool_ratsnest_xpm );
TOOL_ACTION PCB_ACTIONS::hideDynamicRatsnest( "pcbnew.Control.hideDynamicRatsnest",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::updateLocalRatsnest( "pcbnew.Control.updateLocalRatsnest",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::listNets( "pcbnew.Control.listNets",
AS_GLOBAL, 0, "",
_( "List Nets" ), _( "Show a list of nets with names and IDs" ),
list_nets_xpm );
TOOL_ACTION PCB_ACTIONS::showPythonConsole( "pcbnew.Control.showPythonConsole",
AS_GLOBAL, 0, "",
_( "Scripting Console" ), _( "Show the Python scripting console" ),
py_script_xpm );
TOOL_ACTION PCB_ACTIONS::showLayersManager( "pcbnew.Control.showLayersManager",
AS_GLOBAL, 0, "",
_( "Show Layers Manager" ), _( "Show/hide the layers manager" ),
layers_manager_xpm );
TOOL_ACTION PCB_ACTIONS::showMicrowaveToolbar( "pcbnew.Control.showMicrowaveToolbar",
AS_GLOBAL, 0, "",
_( "Show Microwave Toolbar" ), _( "Show/hide microwave toolbar\n(Experimental feature)" ),
mw_toolbar_xpm );
TOOL_ACTION PCB_ACTIONS::flipBoard( "pcbnew.Control.flipBoard",
AS_GLOBAL, 0, "",
_( "Flip Board View" ), _( "Flip (mirror) the board view" ),
flip_board_xpm );
class ZONE_CONTEXT_MENU : public ACTION_MENU
{
public:

View File

@ -69,149 +69,6 @@ extern bool AskLoadBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileN
extern IO_MGR::PCB_FILE_T plugin_type( const wxString& aFileName, int aCtl );
// Display modes
TOOL_ACTION PCB_ACTIONS::showRatsnest( "pcbnew.Control.showRatsnest",
AS_GLOBAL, 0, "",
_( "Show Ratsnest" ), _( "Show board ratsnest" ),
general_ratsnest_xpm );
TOOL_ACTION PCB_ACTIONS::ratsnestLineMode( "pcbnew.Control.ratsnestLineMode",
AS_GLOBAL, 0, "",
_( "Curved Ratsnest Lines" ), _( "Show ratsnest with curved lines" ),
curved_ratsnest_xpm );
TOOL_ACTION PCB_ACTIONS::trackDisplayMode( "pcbnew.Control.trackDisplayMode",
AS_GLOBAL,
'K', LEGACY_HK_NAME( "Track Display Mode" ),
_( "Sketch Tracks" ), _( "Show tracks in outline mode" ),
showtrack_xpm );
TOOL_ACTION PCB_ACTIONS::padDisplayMode( "pcbnew.Control.padDisplayMode",
AS_GLOBAL, 0, "",
_( "Sketch Pads" ), _( "Show pads in outline mode" ),
pad_sketch_xpm );
TOOL_ACTION PCB_ACTIONS::viaDisplayMode( "pcbnew.Control.viaDisplayMode",
AS_GLOBAL, 0, "",
_( "Sketch Vias" ), _( "Show vias in outline mode" ),
via_sketch_xpm );
TOOL_ACTION PCB_ACTIONS::graphicDisplayMode( "pcbnew.Control.graphicDisplayMode",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::moduleEdgeOutlines( "pcbnew.Control.graphicOutlines",
AS_GLOBAL, 0, "",
_( "Sketch Graphics" ), _( "Show footprint graphic items in outline mode" ),
show_mod_edge_xpm );
TOOL_ACTION PCB_ACTIONS::zoneDisplayEnable( "pcbnew.Control.zoneDisplayEnable",
AS_GLOBAL, 0, "",
_( "Fill Zones" ), _( "Show filled areas of zones" ),
show_zone_xpm);
TOOL_ACTION PCB_ACTIONS::zoneDisplayDisable( "pcbnew.Control.zoneDisplayDisable",
AS_GLOBAL, 0, "",
_( "Wireframe Zones" ), _( "Show only zone boundaries" ),
show_zone_disable_xpm );
TOOL_ACTION PCB_ACTIONS::zoneDisplayOutlines( "pcbnew.Control.zoneDisplayOutlines",
AS_GLOBAL, 0, "",
_( "Sketch Zones" ), _( "Show solid areas of zones in outline mode" ),
show_zone_outline_only_xpm);
// Layer control
TOOL_ACTION PCB_ACTIONS::layerTop( "pcbnew.Control.layerTop",
AS_GLOBAL,
WXK_PAGEUP, LEGACY_HK_NAME( "Switch to Component (F.Cu) layer" ),
"Switch to Component (F.Cu) layer", "",
nullptr, AF_NONE, (void*) F_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner1( "pcbnew.Control.layerInner1",
AS_GLOBAL,
WXK_F5, LEGACY_HK_NAME( "Switch to Inner layer 1" ),
"Switch to Inner layer 1", "",
nullptr, AF_NONE, (void*) In1_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner2( "pcbnew.Control.layerInner2",
AS_GLOBAL,
WXK_F6, LEGACY_HK_NAME( "Switch to Inner layer 2" ),
"Switch to Inner layer 2", "",
nullptr, AF_NONE, (void*) In2_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner3( "pcbnew.Control.layerInner3",
AS_GLOBAL,
WXK_F7, LEGACY_HK_NAME( "Switch to Inner layer 3" ),
"Switch to Inner layer 3", "",
nullptr, AF_NONE, (void*) In3_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner4( "pcbnew.Control.layerInner4",
AS_GLOBAL,
WXK_F8, LEGACY_HK_NAME( "Switch to Inner layer 4" ),
"Switch to Inner layer 4", "",
nullptr, AF_NONE, (void*) In4_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner5( "pcbnew.Control.layerInner5",
AS_GLOBAL,
MD_SHIFT + WXK_F5, LEGACY_HK_NAME( "Switch to Inner layer 5" ),
"Switch to Inner layer 5", "",
nullptr, AF_NONE, (void*) In5_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner6( "pcbnew.Control.layerInner6",
AS_GLOBAL,
MD_SHIFT + WXK_F6, LEGACY_HK_NAME( "Switch to Inner layer 6" ),
"Switch to Inner layer 6", "",
nullptr, AF_NONE, (void*) In6_Cu );
TOOL_ACTION PCB_ACTIONS::layerBottom( "pcbnew.Control.layerBottom",
AS_GLOBAL,
WXK_PAGEDOWN, LEGACY_HK_NAME( "Switch to Copper (B.Cu) layer" ),
"Switch to Copper (B.Cu) layer", "",
nullptr, AF_NONE, (void*) B_Cu );
TOOL_ACTION PCB_ACTIONS::layerNext( "pcbnew.Control.layerNext",
AS_GLOBAL,
'+', LEGACY_HK_NAME( "Switch to Next Layer" ),
"Switch to Next Layer", "" );
TOOL_ACTION PCB_ACTIONS::layerPrev( "pcbnew.Control.layerPrev",
AS_GLOBAL,
'-', LEGACY_HK_NAME( "Switch to Previous Layer" ),
"Switch to Previous Layer", "" );
TOOL_ACTION PCB_ACTIONS::layerToggle( "pcbnew.Control.layerToggle",
AS_GLOBAL,
'V', LEGACY_HK_NAME( "Add Through Via" ),
"Add Through Via", "" );
TOOL_ACTION PCB_ACTIONS::layerAlphaInc( "pcbnew.Control.layerAlphaInc",
AS_GLOBAL,
'}', LEGACY_HK_NAME( "Increment Layer Transparency (Modern Toolset only)" ),
_( "Increase Layer Opacity" ), _( "Make the current layer more transparent" ),
contrast_mode_xpm );
TOOL_ACTION PCB_ACTIONS::layerAlphaDec( "pcbnew.Control.layerAlphaDec",
AS_GLOBAL,
'{', LEGACY_HK_NAME( "Decrement Layer Transparency (Modern Toolset only)" ),
_( "Decrease Layer Opacity" ), _( "Make the current layer more transparent" ),
contrast_mode_xpm );
TOOL_ACTION PCB_ACTIONS::layerChanged( "pcbnew.Control.layerChanged",
AS_GLOBAL, 0, "",
"", "",
nullptr, AF_NOTIFY );
// Miscellaneous
TOOL_ACTION PCB_ACTIONS::selectionTool( "pcbnew.Control.selectionTool",
AS_GLOBAL, 0, "",
_( "Select item(s)" ), "",
cursor_xpm, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::deleteTool( "pcbnew.Control.deleteTool",
AS_GLOBAL, 0, "",
_( "Delete Items Tool" ), _( "Click on items to delete them" ),
delete_xpm );
PCBNEW_CONTROL::PCBNEW_CONTROL() :
PCB_TOOL_BASE( "pcbnew.Control" ),
m_frame( nullptr )

View File

@ -30,9 +30,6 @@
#include "tool_event_utils.h"
#include "selection_tool.h"
TOOL_ACTION PCB_ACTIONS::pickerTool( "pcbnew.InteractivePicker",
AS_GLOBAL, 0, "", "", "", nullptr, AF_ACTIVATE );
PCBNEW_PICKER_TOOL::PCBNEW_PICKER_TOOL()
: PCB_TOOL_BASE( "pcbnew.InteractivePicker" )

View File

@ -37,47 +37,6 @@
#include <confirm.h>
#include <menus_helpers.h>
// Placement tool
TOOL_ACTION PCB_ACTIONS::alignTop( "pcbnew.AlignAndDistribute.alignTop",
AS_GLOBAL, 0, "",
_( "Align to Top" ),
_( "Aligns selected items to the top edge" ), align_items_top_xpm );
TOOL_ACTION PCB_ACTIONS::alignBottom( "pcbnew.AlignAndDistribute.alignBottom",
AS_GLOBAL, 0, "",
_( "Align to Bottom" ),
_( "Aligns selected items to the bottom edge" ), align_items_bottom_xpm );
TOOL_ACTION PCB_ACTIONS::alignLeft( "pcbnew.AlignAndDistribute.alignLeft",
AS_GLOBAL, 0, "",
_( "Align to Left" ),
_( "Aligns selected items to the left edge" ), align_items_left_xpm );
TOOL_ACTION PCB_ACTIONS::alignRight( "pcbnew.AlignAndDistribute.alignRight",
AS_GLOBAL, 0, "",
_( "Align to Right" ),
_( "Aligns selected items to the right edge" ), align_items_right_xpm );
TOOL_ACTION PCB_ACTIONS::alignCenterX( "pcbnew.AlignAndDistribute.alignCenterX",
AS_GLOBAL, 0, "",
_( "Align to Middle" ),
_( "Aligns selected items to the vertical center" ), align_items_middle_xpm );
TOOL_ACTION PCB_ACTIONS::alignCenterY( "pcbnew.AlignAndDistribute.alignCenterY",
AS_GLOBAL, 0, "",
_( "Align to Center" ),
_( "Aligns selected items to the horizontal center" ), align_items_center_xpm );
TOOL_ACTION PCB_ACTIONS::distributeHorizontally( "pcbnew.AlignAndDistribute.distributeHorizontally",
AS_GLOBAL, 0, "",
_( "Distribute Horizontally" ),
_( "Distributes selected items along the horizontal axis" ), distribute_horizontal_xpm );
TOOL_ACTION PCB_ACTIONS::distributeVertically( "pcbnew.AlignAndDistribute.distributeVertically",
AS_GLOBAL, 0, "",
_( "Distribute Vertically" ),
_( "Distributes selected items along the vertical axis" ), distribute_vertical_xpm );
ALIGN_DISTRIBUTE_TOOL::ALIGN_DISTRIBUTE_TOOL() :
TOOL_INTERACTIVE( "pcbnew.Placement" ), m_selectionTool( NULL ), m_placementMenu( NULL ),

View File

@ -50,17 +50,6 @@ using namespace std::placeholders;
#include "zone_filler.h"
// Point editor
TOOL_ACTION PCB_ACTIONS::pointEditorAddCorner( "pcbnew.PointEditor.addCorner",
AS_GLOBAL,
WXK_INSERT, "",
_( "Create Corner" ), _( "Create a corner" ), add_corner_xpm );
TOOL_ACTION PCB_ACTIONS::pointEditorRemoveCorner( "pcbnew.PointEditor.removeCorner",
AS_GLOBAL, 0, "",
_( "Remove Corner" ), _( "Remove corner" ), delete_xpm );
// Few constants to avoid using bare numbers for point indices
enum SEG_POINTS
{

View File

@ -36,20 +36,6 @@ using namespace std::placeholders;
#include <confirm.h>
// Position relative tool actions
TOOL_ACTION PCB_ACTIONS::positionRelative( "pcbnew.PositionRelative.positionRelative",
AS_GLOBAL,
MD_SHIFT + 'P', LEGACY_HK_NAME( "Position Item Relative" ),
_( "Position Relative To..." ),
_( "Positions the selected item(s) by an exact amount relative to another" ),
move_relative_xpm );
TOOL_ACTION PCB_ACTIONS::selectpositionRelativeItem( "pcbnew.PositionRelative.selectpositionRelativeItem",
AS_GLOBAL );
POSITION_RELATIVE_TOOL::POSITION_RELATIVE_TOOL() :
PCB_TOOL_BASE( "pcbnew.PositionRelative" ),
m_dialog( NULL ),

View File

@ -60,79 +60,6 @@ using namespace std::placeholders;
#include "kicad_plugin.h"
// Selection tool actions
TOOL_ACTION PCB_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection",
AS_GLOBAL, 0, "", "", "", nullptr, AF_ACTIVATE ); // No description, not shown anywhere
TOOL_ACTION PCB_ACTIONS::selectionCursor( "pcbnew.InteractiveSelection.Cursor",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::selectItem( "pcbnew.InteractiveSelection.SelectItem",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::selectItems( "pcbnew.InteractiveSelection.SelectItems",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::unselectItem( "pcbnew.InteractiveSelection.UnselectItem",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::unselectItems( "pcbnew.InteractiveSelection.UnselectItems",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::selectionMenu( "pcbnew.InteractiveSelection.SelectionMenu",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::selectConnection( "pcbnew.InteractiveSelection.SelectConnection",
AS_GLOBAL,
'U', LEGACY_HK_NAME( "Select Single Track" ),
_( "Select Single Track" ),
_( "Selects all track segments & vias between two junctions." ),
add_tracks_xpm );
TOOL_ACTION PCB_ACTIONS::selectCopper( "pcbnew.InteractiveSelection.SelectCopper",
AS_GLOBAL,
'I', LEGACY_HK_NAME( "Select Connected Tracks" ),
_( "Select Connected Tracks" ),
_( "Selects all connected tracks & vias." ),
net_highlight_xpm );
TOOL_ACTION PCB_ACTIONS::expandSelectedConnection( "pcbnew.InteractiveSelection.ExpandConnection",
AS_GLOBAL, 0, "",
_( "Expand Selected Connection" ),
_( "Expands the current selection to select a connection between two junctions." ) );
TOOL_ACTION PCB_ACTIONS::selectNet( "pcbnew.InteractiveSelection.SelectNet",
AS_GLOBAL, 0, "",
_( "Select All Tracks in Net" ),
_( "Selects all tracks & vias belonging to the same net." ),
mode_track_xpm );
TOOL_ACTION PCB_ACTIONS::selectOnSheetFromEeschema( "pcbnew.InteractiveSelection.SelectOnSheet",
AS_GLOBAL, 0, "",
_( "Sheet" ),
_( "Selects all modules and tracks in the schematic sheet" ),
select_same_sheet_xpm );
TOOL_ACTION PCB_ACTIONS::selectSameSheet( "pcbnew.InteractiveSelection.SelectSameSheet",
AS_GLOBAL, 0, "",
_( "Items in Same Hierarchical Sheet" ),
_( "Selects all modules and tracks in the same schematic sheet" ),
select_same_sheet_xpm );
TOOL_ACTION PCB_ACTIONS::findMove( "pcbnew.InteractiveSelection.FindMove",
AS_GLOBAL,
'T', LEGACY_HK_NAME( "Get and Move Footprint" ),
_( "Get and Move Footprint" ),
_( "Selects a footprint by reference and places it under the cursor for moving"),
move_xpm );
TOOL_ACTION PCB_ACTIONS::filterSelection( "pcbnew.InteractiveSelection.FilterSelection",
AS_GLOBAL, 0, "",
_( "Filter Selection..." ), _( "Filter the types of items in the selection" ),
options_generic_xpm );
class SELECT_MENU : public ACTION_MENU
{

View File

@ -39,29 +39,6 @@
#include "zone_filler_tool.h"
#include "zone_filler.h"
// Zone actions
TOOL_ACTION PCB_ACTIONS::zoneFill( "pcbnew.ZoneFiller.zoneFill",
AS_GLOBAL, 0, "",
_( "Fill" ), _( "Fill zone(s)" ),
fill_zone_xpm );
TOOL_ACTION PCB_ACTIONS::zoneFillAll( "pcbnew.ZoneFiller.zoneFillAll",
AS_GLOBAL,
'B', LEGACY_HK_NAME( "Fill or Refill All Zones" ),
_( "Fill All" ), _( "Fill all zones" ),
fill_zone_xpm );
TOOL_ACTION PCB_ACTIONS::zoneUnfill( "pcbnew.ZoneFiller.zoneUnfill",
AS_GLOBAL, 0, "",
_( "Unfill" ), _( "Unfill zone(s)" ),
zone_unfill_xpm );
TOOL_ACTION PCB_ACTIONS::zoneUnfillAll( "pcbnew.ZoneFiller.zoneUnfillAll",
AS_GLOBAL,
MD_CTRL + 'B', LEGACY_HK_NAME( "Remove Filled Areas in All Zones" ),
_( "Unfill All" ), _( "Unfill all zones" ),
zone_unfill_xpm );
ZONE_FILLER_TOOL::ZONE_FILLER_TOOL() :
PCB_TOOL_BASE( "pcbnew.ZoneFiller" )

View File

@ -38,7 +38,8 @@ add_executable(test_gal_pixel_alignment WIN32
../../qa_utils/pcb_test_frame.cpp
../../qa_utils/mocks.cpp
../../../common/base_units.cpp
../../../pcbnew/tools/pcb_tool_base.cpp
../../../pcbnew/tools/pcb_tool_base.cpp
../../../pcbnew/tools/pcb_actions.cpp
../../../pcbnew/tools/pcbnew_selection.cpp
../../../pcbnew/tools/selection_tool.cpp
../../../pcbnew/tools/tool_event_utils.cpp

View File

@ -21,11 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file mocks.cpp
* @brief Pcbnew main program for qa test.
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
@ -45,9 +40,7 @@
#include <footprint_edit_frame.h>
#include <footprint_viewer_frame.h>
#include <footprint_wizard_frame.h>
#include <pcb_edit_frame.h>
#include <class_board.h>
#include <class_track.h>
#include <class_drawsegment.h>
@ -57,10 +50,8 @@
#include <class_dimension.h>
#include <class_zone.h>
#include <class_edge_mod.h>
#include <tools/pcb_actions.h>
#include <router/router_tool.h>
#include "pcb_tool_base.h"
#include <dialog_find.h>
#include <dialog_block_options.h>
@ -228,24 +219,6 @@ MODULE* PCB_BASE_FRAME::GetFootprintFromBoardByReference()
return nullptr;
}
TOOL_ACTION PCB_ACTIONS::hideDynamicRatsnest( "pcbnew.Control.hideLocalRatsnest",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::flip( "pcbnew.InteractiveEdit.flip",
AS_GLOBAL, 'F', "",
_( "Flip" ), _( "Flips selected item(s)" ), nullptr );
TOOL_ACTION PCB_ACTIONS::properties( "pcbnew.InteractiveEdit.properties",
AS_GLOBAL, 'E', "",
_( "Properties..." ), _( "Displays item properties dialog" ), nullptr );
TOOL_ACTION PCB_ACTIONS::highlightNet( "pcbnew.EditorControl.highlightNet",
AS_GLOBAL );
TOOL_ACTION PCB_ACTIONS::clearHighlight( "pcbnew.EditorControl.clearHighlight",
AS_GLOBAL );
DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent,
wxWindowID id,
@ -277,16 +250,6 @@ DIALOG_BLOCK_OPTIONS_BASE::~DIALOG_BLOCK_OPTIONS_BASE()
}
TOOL_ACTION PCB_ACTIONS::rotateCw( "pcbnew.InteractiveEdit.rotateCw",
AS_GLOBAL, MD_SHIFT + 'R', "",
_( "Rotate Clockwise" ), _( "Rotates selected item(s) clockwise" ),
nullptr, AF_NONE, (void*) -1 );
TOOL_ACTION PCB_ACTIONS::rotateCcw( "pcbnew.InteractiveEdit.rotateCcw",
AS_GLOBAL, 'R', "",
_( "Rotate Counterclockwise" ), _( "Rotates selected item(s) counterclockwise" ),
nullptr, AF_NONE, (void*) 1 );
DIALOG_BLOCK_OPTIONS::DIALOG_BLOCK_OPTIONS( PCB_BASE_FRAME* aParent,
OPTIONS& aOptions, bool aShowLegacyOptions,
const wxString& aTitle ) :