2019-04-12 19:18:45 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2019-08-14 08:28:07 +00:00
|
|
|
* Copyright (C) 2019 CERN
|
2022-01-25 22:33:37 +00:00
|
|
|
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2019-04-12 19:18:45 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2019-05-10 17:19:48 +00:00
|
|
|
#ifndef EESCHEMA_ACTIONS_H
|
|
|
|
#define EESCHEMA_ACTIONS_H
|
2019-04-12 19:18:45 +00:00
|
|
|
|
|
|
|
#include <tool/tool_action.h>
|
|
|
|
#include <tool/actions.h>
|
|
|
|
|
|
|
|
class TOOL_EVENT;
|
|
|
|
class TOOL_MANAGER;
|
|
|
|
|
|
|
|
/**
|
2021-01-26 15:23:37 +00:00
|
|
|
* Gather all the actions that are shared by tools. The instance of SCH_ACTIONS is created
|
2019-04-12 19:18:45 +00:00
|
|
|
* inside of ACTION_MANAGER object that registers the actions.
|
|
|
|
*/
|
2019-05-10 17:19:48 +00:00
|
|
|
class EE_ACTIONS : public ACTIONS
|
2019-04-12 19:18:45 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-09-27 16:22:46 +00:00
|
|
|
// Menu bar save curr sheet as command
|
|
|
|
static TOOL_ACTION saveCurrSheetCopyAs;
|
|
|
|
|
2019-04-12 19:18:45 +00:00
|
|
|
// Selection Tool
|
|
|
|
/// Activation of the selection tool
|
|
|
|
static TOOL_ACTION selectionActivate;
|
|
|
|
|
2019-04-30 13:54:32 +00:00
|
|
|
/// Select the junction, wire or bus segment under the cursor.
|
|
|
|
static TOOL_ACTION selectNode;
|
|
|
|
|
|
|
|
/// If current selection is a wire or bus, expand to entire connection.
|
|
|
|
/// Otherwise, select connection under cursor.
|
|
|
|
static TOOL_ACTION selectConnection;
|
2019-04-12 19:18:45 +00:00
|
|
|
|
|
|
|
/// Clears the current selection
|
2019-04-30 13:54:32 +00:00
|
|
|
static TOOL_ACTION clearSelection;
|
2019-04-12 19:18:45 +00:00
|
|
|
|
|
|
|
/// Selects an item (specified as the event parameter).
|
2019-04-30 13:54:32 +00:00
|
|
|
static TOOL_ACTION addItemToSel;
|
|
|
|
static TOOL_ACTION removeItemFromSel;
|
2019-04-12 19:18:45 +00:00
|
|
|
|
|
|
|
/// Selects a list of items (specified as the event parameter)
|
2019-04-30 13:54:32 +00:00
|
|
|
static TOOL_ACTION addItemsToSel;
|
|
|
|
static TOOL_ACTION removeItemsFromSel;
|
2019-04-12 19:18:45 +00:00
|
|
|
|
|
|
|
/// Runs a selection menu to select from a list of items
|
|
|
|
static TOOL_ACTION selectionMenu;
|
|
|
|
|
|
|
|
// Locking
|
|
|
|
static TOOL_ACTION toggleLock;
|
|
|
|
static TOOL_ACTION lock;
|
|
|
|
static TOOL_ACTION unlock;
|
|
|
|
|
2019-05-07 18:49:53 +00:00
|
|
|
// Schematic Tools
|
2019-06-19 03:10:21 +00:00
|
|
|
static TOOL_ACTION addNeededJunctions;
|
2022-02-20 00:49:26 +00:00
|
|
|
static TOOL_ACTION trimOverlappingWires;
|
2019-04-12 19:18:45 +00:00
|
|
|
static TOOL_ACTION pickerTool;
|
2019-04-15 14:34:58 +00:00
|
|
|
static TOOL_ACTION placeSymbol;
|
|
|
|
static TOOL_ACTION placePower;
|
2019-04-17 19:09:48 +00:00
|
|
|
static TOOL_ACTION drawWire;
|
|
|
|
static TOOL_ACTION drawBus;
|
|
|
|
static TOOL_ACTION unfoldBus;
|
2019-04-15 23:56:41 +00:00
|
|
|
static TOOL_ACTION placeNoConnect;
|
|
|
|
static TOOL_ACTION placeJunction;
|
|
|
|
static TOOL_ACTION placeBusWireEntry;
|
|
|
|
static TOOL_ACTION placeLabel;
|
2021-10-12 20:05:37 +00:00
|
|
|
static TOOL_ACTION placeClassLabel;
|
2019-04-15 23:56:41 +00:00
|
|
|
static TOOL_ACTION placeGlobalLabel;
|
2019-06-15 00:29:42 +00:00
|
|
|
static TOOL_ACTION placeHierLabel;
|
2019-04-18 15:45:10 +00:00
|
|
|
static TOOL_ACTION drawSheet;
|
|
|
|
static TOOL_ACTION importSheetPin;
|
2019-04-15 23:56:41 +00:00
|
|
|
static TOOL_ACTION placeSchematicText;
|
2022-01-25 22:33:37 +00:00
|
|
|
static TOOL_ACTION drawTextBox;
|
2021-07-17 19:56:18 +00:00
|
|
|
static TOOL_ACTION drawRectangle;
|
|
|
|
static TOOL_ACTION drawCircle;
|
|
|
|
static TOOL_ACTION drawArc;
|
2019-04-17 19:09:48 +00:00
|
|
|
static TOOL_ACTION drawLines;
|
2019-04-15 23:56:41 +00:00
|
|
|
static TOOL_ACTION placeImage;
|
2022-03-22 16:49:38 +00:00
|
|
|
static TOOL_ACTION undoLastSegment;
|
|
|
|
static TOOL_ACTION switchSegmentPosture;
|
2019-04-28 23:34:43 +00:00
|
|
|
static TOOL_ACTION finishLineWireOrBus;
|
|
|
|
static TOOL_ACTION finishWire;
|
|
|
|
static TOOL_ACTION finishBus;
|
|
|
|
static TOOL_ACTION finishLine;
|
|
|
|
static TOOL_ACTION finishSheet;
|
2019-04-15 14:34:58 +00:00
|
|
|
|
2019-05-07 18:49:53 +00:00
|
|
|
// Symbol Tools
|
|
|
|
static TOOL_ACTION placeSymbolPin;
|
|
|
|
static TOOL_ACTION placeSymbolText;
|
2022-01-25 22:33:37 +00:00
|
|
|
static TOOL_ACTION drawSymbolTextBox;
|
2019-05-07 18:49:53 +00:00
|
|
|
static TOOL_ACTION drawSymbolLines;
|
|
|
|
static TOOL_ACTION placeSymbolAnchor;
|
2019-05-07 23:51:37 +00:00
|
|
|
static TOOL_ACTION finishDrawing;
|
2019-05-07 18:49:53 +00:00
|
|
|
|
2019-06-01 15:28:39 +00:00
|
|
|
// Interactive Editing
|
2020-09-17 19:26:54 +00:00
|
|
|
static TOOL_ACTION alignToGrid;
|
2020-04-23 22:57:34 +00:00
|
|
|
static TOOL_ACTION symbolMoveActivate; // Symbol editor move tool activate
|
|
|
|
static TOOL_ACTION moveActivate; // Schematic editor move tool activate
|
2019-04-21 23:45:34 +00:00
|
|
|
static TOOL_ACTION move;
|
2019-04-27 14:32:40 +00:00
|
|
|
static TOOL_ACTION drag;
|
2019-04-26 22:23:12 +00:00
|
|
|
static TOOL_ACTION repeatDrawItem;
|
2019-04-23 17:40:29 +00:00
|
|
|
static TOOL_ACTION rotateCW;
|
|
|
|
static TOOL_ACTION rotateCCW;
|
2021-02-16 20:45:25 +00:00
|
|
|
static TOOL_ACTION mirrorV;
|
|
|
|
static TOOL_ACTION mirrorH;
|
2019-04-15 14:34:58 +00:00
|
|
|
static TOOL_ACTION properties;
|
2019-04-27 23:50:35 +00:00
|
|
|
static TOOL_ACTION editReference;
|
|
|
|
static TOOL_ACTION editValue;
|
|
|
|
static TOOL_ACTION editFootprint;
|
2019-04-28 23:34:43 +00:00
|
|
|
static TOOL_ACTION autoplaceFields;
|
2019-06-01 19:48:01 +00:00
|
|
|
static TOOL_ACTION toggleDeMorgan;
|
|
|
|
static TOOL_ACTION showDeMorganStandard;
|
|
|
|
static TOOL_ACTION showDeMorganAlternate;
|
2019-05-01 22:29:53 +00:00
|
|
|
static TOOL_ACTION editSymbolUnit;
|
2019-04-29 17:50:46 +00:00
|
|
|
static TOOL_ACTION toLabel;
|
2021-10-12 20:05:37 +00:00
|
|
|
static TOOL_ACTION toCLabel;
|
2019-04-29 17:50:46 +00:00
|
|
|
static TOOL_ACTION toHLabel;
|
|
|
|
static TOOL_ACTION toGLabel;
|
|
|
|
static TOOL_ACTION toText;
|
2019-04-30 13:54:32 +00:00
|
|
|
static TOOL_ACTION breakWire;
|
|
|
|
static TOOL_ACTION breakBus;
|
2019-05-08 18:56:03 +00:00
|
|
|
static TOOL_ACTION pointEditorAddCorner;
|
|
|
|
static TOOL_ACTION pointEditorRemoveCorner;
|
2019-04-15 14:34:58 +00:00
|
|
|
|
2019-06-01 15:28:39 +00:00
|
|
|
/// Inspection and Editing
|
2019-04-29 20:38:05 +00:00
|
|
|
static TOOL_ACTION showDatasheet;
|
2019-06-01 15:28:39 +00:00
|
|
|
static TOOL_ACTION runERC;
|
|
|
|
static TOOL_ACTION annotate;
|
|
|
|
static TOOL_ACTION editSymbolFields;
|
2019-06-01 18:36:49 +00:00
|
|
|
static TOOL_ACTION editSymbolLibraryLinks;
|
2019-06-16 16:07:15 +00:00
|
|
|
static TOOL_ACTION symbolProperties;
|
2019-06-03 13:49:17 +00:00
|
|
|
static TOOL_ACTION pinTable;
|
2020-08-13 17:51:26 +00:00
|
|
|
static TOOL_ACTION changeSymbols;
|
|
|
|
static TOOL_ACTION updateSymbols;
|
|
|
|
static TOOL_ACTION changeSymbol;
|
|
|
|
static TOOL_ACTION updateSymbol;
|
2019-06-01 15:28:39 +00:00
|
|
|
static TOOL_ACTION assignFootprints;
|
2020-07-07 10:17:30 +00:00
|
|
|
static TOOL_ACTION assignNetclass;
|
2019-06-01 15:28:39 +00:00
|
|
|
static TOOL_ACTION showBusManager;
|
2020-03-10 18:46:57 +00:00
|
|
|
static TOOL_ACTION schematicSetup;
|
2020-10-18 20:30:37 +00:00
|
|
|
static TOOL_ACTION editPageNumber;
|
2020-11-21 20:42:27 +00:00
|
|
|
static TOOL_ACTION checkSymbol;
|
2019-06-01 15:28:39 +00:00
|
|
|
|
2020-05-12 17:12:38 +00:00
|
|
|
static TOOL_ACTION rescueSymbols;
|
|
|
|
static TOOL_ACTION remapSymbols;
|
|
|
|
|
2019-06-01 15:28:39 +00:00
|
|
|
// Suite operations
|
2019-05-17 15:44:58 +00:00
|
|
|
static TOOL_ACTION editWithLibEdit;
|
2021-10-26 19:59:59 +00:00
|
|
|
static TOOL_ACTION editLibSymbolWithLibEdit;
|
2019-06-01 15:28:39 +00:00
|
|
|
static TOOL_ACTION showPcbNew;
|
2019-06-16 16:07:15 +00:00
|
|
|
static TOOL_ACTION importFPAssignments;
|
2019-06-16 13:42:40 +00:00
|
|
|
static TOOL_ACTION exportNetlist;
|
2019-06-01 15:28:39 +00:00
|
|
|
static TOOL_ACTION generateBOM;
|
2019-06-16 18:51:47 +00:00
|
|
|
static TOOL_ACTION addSymbolToSchematic;
|
2019-04-29 20:38:05 +00:00
|
|
|
|
2019-06-02 18:58:09 +00:00
|
|
|
// Library management
|
2020-12-27 16:28:52 +00:00
|
|
|
static TOOL_ACTION saveLibraryAs;
|
|
|
|
static TOOL_ACTION saveSymbolAs;
|
2019-06-02 18:58:09 +00:00
|
|
|
static TOOL_ACTION newSymbol;
|
2019-06-05 22:29:59 +00:00
|
|
|
static TOOL_ACTION editSymbol;
|
|
|
|
static TOOL_ACTION duplicateSymbol;
|
2022-04-21 10:57:15 +00:00
|
|
|
static TOOL_ACTION renameSymbol;
|
2019-06-05 22:29:59 +00:00
|
|
|
static TOOL_ACTION deleteSymbol;
|
|
|
|
static TOOL_ACTION cutSymbol;
|
|
|
|
static TOOL_ACTION copySymbol;
|
|
|
|
static TOOL_ACTION pasteSymbol;
|
2019-06-02 18:58:09 +00:00
|
|
|
static TOOL_ACTION importSymbol;
|
2019-06-05 22:29:59 +00:00
|
|
|
static TOOL_ACTION exportSymbol;
|
2021-02-13 21:28:06 +00:00
|
|
|
static TOOL_ACTION updateSymbolFields;
|
2019-06-02 18:58:09 +00:00
|
|
|
|
|
|
|
// Hierarchy navigation
|
2019-04-30 14:46:29 +00:00
|
|
|
static TOOL_ACTION enterSheet;
|
|
|
|
static TOOL_ACTION leaveSheet;
|
2019-05-13 20:42:40 +00:00
|
|
|
static TOOL_ACTION navigateHierarchy;
|
2020-10-02 20:18:07 +00:00
|
|
|
static TOOL_ACTION hypertextCommand;
|
2021-02-21 15:44:38 +00:00
|
|
|
static TOOL_ACTION importSingleSheetPin;
|
2019-06-02 18:58:09 +00:00
|
|
|
|
2020-07-07 10:17:30 +00:00
|
|
|
// Global edit tools
|
2019-05-01 22:14:21 +00:00
|
|
|
static TOOL_ACTION cleanupSheetPins;
|
2019-06-30 22:06:34 +00:00
|
|
|
static TOOL_ACTION editTextAndGraphics;
|
2020-07-07 10:17:30 +00:00
|
|
|
|
|
|
|
// Miscellaneous
|
2019-05-13 20:42:40 +00:00
|
|
|
static TOOL_ACTION toggleHiddenPins;
|
2020-04-18 15:36:29 +00:00
|
|
|
static TOOL_ACTION toggleHiddenFields;
|
2021-11-05 21:16:26 +00:00
|
|
|
static TOOL_ACTION toggleERCWarnings;
|
|
|
|
static TOOL_ACTION toggleERCErrors;
|
|
|
|
static TOOL_ACTION toggleERCExclusions;
|
2019-06-16 18:51:47 +00:00
|
|
|
static TOOL_ACTION toggleSyncedPinsMode;
|
2019-06-11 14:17:24 +00:00
|
|
|
static TOOL_ACTION restartMove;
|
2022-01-16 20:29:03 +00:00
|
|
|
static TOOL_ACTION selectOnPCB;
|
2019-05-08 18:56:03 +00:00
|
|
|
static TOOL_ACTION pushPinLength;
|
|
|
|
static TOOL_ACTION pushPinNameSize;
|
|
|
|
static TOOL_ACTION pushPinNumSize;
|
2019-05-14 19:21:10 +00:00
|
|
|
static TOOL_ACTION showElectricalTypes;
|
2021-03-18 11:46:07 +00:00
|
|
|
static TOOL_ACTION showSymbolTree;
|
2021-03-29 11:01:03 +00:00
|
|
|
static TOOL_ACTION hideSymbolTree;
|
2019-06-16 16:07:15 +00:00
|
|
|
static TOOL_ACTION drawSheetOnClipboard;
|
|
|
|
static TOOL_ACTION exportSymbolView;
|
|
|
|
static TOOL_ACTION exportSymbolAsSVG;
|
2021-03-18 13:28:04 +00:00
|
|
|
static TOOL_ACTION showPythonConsole;
|
2021-11-24 11:04:07 +00:00
|
|
|
static TOOL_ACTION repairSchematic;
|
2019-04-14 00:44:05 +00:00
|
|
|
|
2022-03-22 16:49:38 +00:00
|
|
|
// Line modes
|
|
|
|
static TOOL_ACTION lineModeFree;
|
|
|
|
static TOOL_ACTION lineMode90;
|
|
|
|
static TOOL_ACTION lineMode45;
|
|
|
|
static TOOL_ACTION lineMode135;
|
|
|
|
static TOOL_ACTION lineModeNext;
|
|
|
|
|
2019-04-23 17:12:26 +00:00
|
|
|
// SPICE
|
2020-07-07 10:17:30 +00:00
|
|
|
static TOOL_ACTION runSimulation;
|
2019-04-23 17:12:26 +00:00
|
|
|
static TOOL_ACTION simProbe;
|
|
|
|
static TOOL_ACTION simTune;
|
|
|
|
|
2019-04-14 00:44:05 +00:00
|
|
|
// Net highlighting
|
2019-04-12 19:18:45 +00:00
|
|
|
static TOOL_ACTION highlightNet;
|
2019-04-21 23:45:34 +00:00
|
|
|
static TOOL_ACTION clearHighlight;
|
2019-05-12 17:03:17 +00:00
|
|
|
static TOOL_ACTION updateNetHighlighting;
|
2019-07-26 15:28:59 +00:00
|
|
|
static TOOL_ACTION highlightNetTool;
|
2019-04-12 19:18:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|