2013-09-27 18:52:34 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2016-05-04 12:59:14 +00:00
|
|
|
* Copyright (C) 2013-2016 CERN
|
2023-10-06 12:03:09 +00:00
|
|
|
* Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2021-01-27 22:15:38 +00:00
|
|
|
*
|
2013-09-27 18:52:34 +00:00
|
|
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2017-02-21 12:42:08 +00:00
|
|
|
#ifndef __PCB_ACTIONS_H
|
|
|
|
#define __PCB_ACTIONS_H
|
2015-02-18 00:04:47 +00:00
|
|
|
|
2023-07-05 10:09:34 +00:00
|
|
|
#include <layer_ids.h>
|
2013-09-27 18:52:34 +00:00
|
|
|
#include <tool/tool_action.h>
|
2017-02-21 12:42:08 +00:00
|
|
|
#include <tool/actions.h>
|
2013-09-27 18:52:34 +00:00
|
|
|
|
2019-06-24 15:27:05 +00:00
|
|
|
enum class ZONE_MODE
|
|
|
|
{
|
|
|
|
ADD, ///< Add a new zone/keepout with fresh settings
|
|
|
|
CUTOUT, ///< Make a cutout to an existing zone
|
|
|
|
SIMILAR, ///< Add a new zone with the same settings as an existing one
|
|
|
|
GRAPHIC_POLYGON
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-09-27 18:52:34 +00:00
|
|
|
/**
|
2021-01-27 22:15:38 +00:00
|
|
|
* Gather all the actions that are shared by tools.
|
2013-09-27 18:52:34 +00:00
|
|
|
*
|
2021-01-27 22:15:38 +00:00
|
|
|
* The instance of PCB_ACTIONS is created inside of #ACTION_MANAGER object that registers
|
|
|
|
* the actions.
|
2013-09-27 18:52:34 +00:00
|
|
|
*/
|
2017-02-21 12:42:08 +00:00
|
|
|
class PCB_ACTIONS : public ACTIONS
|
2013-09-27 18:52:34 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-07-05 10:09:34 +00:00
|
|
|
/**
|
|
|
|
* Translate a layer ID into the action that switches to that layer.
|
|
|
|
*
|
|
|
|
* @param aLayerID is the layer to switch to
|
|
|
|
* @return the action that will switch to the specified layer
|
|
|
|
*/
|
|
|
|
static TOOL_ACTION* LayerIDToAction( PCB_LAYER_ID aLayerID );
|
|
|
|
|
2014-03-24 07:45:05 +00:00
|
|
|
// Selection Tool
|
2013-09-27 18:52:34 +00:00
|
|
|
/// Activation of the selection tool
|
|
|
|
static TOOL_ACTION selectionActivate;
|
|
|
|
|
2014-07-09 11:50:27 +00:00
|
|
|
/// Select a single item under the cursor position
|
2014-11-21 10:49:28 +00:00
|
|
|
static TOOL_ACTION selectionCursor;
|
2014-07-09 11:50:27 +00:00
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Clear the current selection
|
2014-07-09 11:50:27 +00:00
|
|
|
static TOOL_ACTION selectionClear;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select an item (specified as the event parameter).
|
2014-11-21 10:50:13 +00:00
|
|
|
static TOOL_ACTION selectItem;
|
2019-04-12 19:18:45 +00:00
|
|
|
static TOOL_ACTION unselectItem;
|
2023-10-06 12:03:09 +00:00
|
|
|
static TOOL_ACTION reselectItem;
|
2014-11-21 10:50:13 +00:00
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select a list of items (specified as the event parameter)
|
2017-06-12 09:16:30 +00:00
|
|
|
static TOOL_ACTION selectItems;
|
|
|
|
static TOOL_ACTION unselectItems;
|
|
|
|
|
2022-01-16 20:29:03 +00:00
|
|
|
/// Sets selection to specified items, zooms to fit, if enabled
|
|
|
|
static TOOL_ACTION syncSelection;
|
|
|
|
|
|
|
|
/// Sets selection to specified items with connected nets, zooms to fit, if enabled
|
|
|
|
static TOOL_ACTION syncSelectionWithNets;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Run a selection menu to select from a list of items
|
2018-01-28 09:35:33 +00:00
|
|
|
static TOOL_ACTION selectionMenu;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select tracks between junctions or expands an existing selection to pads or the
|
2019-11-22 19:29:07 +00:00
|
|
|
/// entire connection.
|
2015-03-10 08:36:04 +00:00
|
|
|
static TOOL_ACTION selectConnection;
|
|
|
|
|
2022-09-13 18:04:57 +00:00
|
|
|
/// Removes all tracks from the selected items to the first pad
|
|
|
|
static TOOL_ACTION unrouteSelected;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select all connections belonging to a single net.
|
2015-03-10 08:36:04 +00:00
|
|
|
static TOOL_ACTION selectNet;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Remove all connections belonging to a single net from the active selection
|
2020-09-16 23:09:12 +00:00
|
|
|
static TOOL_ACTION deselectNet;
|
|
|
|
|
2022-09-20 13:35:47 +00:00
|
|
|
/// Select unconnected footprints from ratsnest of selection
|
|
|
|
static TOOL_ACTION selectUnconnected;
|
|
|
|
|
2022-09-22 18:25:44 +00:00
|
|
|
/// Select and move nearest unconnected footprint from ratsnest of selection
|
|
|
|
static TOOL_ACTION grabUnconnected;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select all components on sheet from Eeschema crossprobing.
|
2017-03-04 16:30:44 +00:00
|
|
|
static TOOL_ACTION selectOnSheetFromEeschema;
|
2017-03-02 23:42:23 +00:00
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Select all components on the same sheet as the selected footprint.
|
2017-02-08 16:32:41 +00:00
|
|
|
static TOOL_ACTION selectSameSheet;
|
2017-02-07 06:40:38 +00:00
|
|
|
|
2022-07-19 15:00:35 +00:00
|
|
|
/// Select symbols/pins on schematic corresponding to selected footprints/pads.
|
|
|
|
static TOOL_ACTION selectOnSchematic;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Filter the items in the current selection (invokes dialog)
|
2017-02-07 06:40:38 +00:00
|
|
|
static TOOL_ACTION filterSelection;
|
|
|
|
|
2019-08-19 20:09:17 +00:00
|
|
|
/// move or drag an item
|
2017-08-03 15:53:07 +00:00
|
|
|
static TOOL_ACTION move;
|
|
|
|
|
2022-09-15 14:19:47 +00:00
|
|
|
/// move items one-by-one
|
|
|
|
static TOOL_ACTION moveIndividually;
|
|
|
|
|
2020-07-05 21:36:12 +00:00
|
|
|
/// move with a reference point
|
|
|
|
static TOOL_ACTION moveWithReference;
|
|
|
|
|
2020-10-25 21:09:32 +00:00
|
|
|
/// copy command with manual reference point selection
|
|
|
|
static TOOL_ACTION copyWithReference;
|
|
|
|
|
2019-04-12 19:18:45 +00:00
|
|
|
/// Rotation of selected objects
|
2017-02-04 05:09:50 +00:00
|
|
|
static TOOL_ACTION rotateCw;
|
|
|
|
static TOOL_ACTION rotateCcw;
|
2013-09-27 18:52:34 +00:00
|
|
|
|
|
|
|
/// Flipping of selected objects
|
|
|
|
static TOOL_ACTION flip;
|
2013-12-03 14:57:09 +00:00
|
|
|
|
2017-01-23 06:47:39 +00:00
|
|
|
/// Mirroring of selected items
|
2022-09-20 23:16:00 +00:00
|
|
|
static TOOL_ACTION mirrorH;
|
|
|
|
static TOOL_ACTION mirrorV;
|
2017-01-23 06:47:39 +00:00
|
|
|
|
2022-08-29 19:07:16 +00:00
|
|
|
/// Swapping of selected items
|
|
|
|
static TOOL_ACTION swap;
|
|
|
|
|
2022-09-27 13:30:17 +00:00
|
|
|
/// Pack and start moving selected footprints
|
|
|
|
static TOOL_ACTION packAndMoveFootprints;
|
|
|
|
|
2022-11-28 19:14:22 +00:00
|
|
|
// Compound Action Tool actions, e.g. Move Individually
|
|
|
|
static TOOL_ACTION skip;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Update selected tracks & vias to the current track & via dimensions
|
2019-10-31 00:00:07 +00:00
|
|
|
static TOOL_ACTION changeTrackWidth;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
/// Fillet (i.e. adds an arc tangent to) all selected straight tracks by a user defined radius
|
2020-10-20 21:23:05 +00:00
|
|
|
static TOOL_ACTION filletTracks;
|
2023-07-02 17:59:04 +00:00
|
|
|
|
|
|
|
/// Fillet (i.e. adds an arc tangent to) all selected straight lines by a user defined radius
|
2022-11-18 14:32:43 +00:00
|
|
|
static TOOL_ACTION filletLines;
|
2023-07-02 17:59:04 +00:00
|
|
|
/// Chamfer (i.e. adds a straight line) all selected straight lines by a user defined setback
|
|
|
|
static TOOL_ACTION chamferLines;
|
2023-10-17 07:27:59 +00:00
|
|
|
/// Connect selected shapes, possibly extending or cutting them, or adding extra geometry
|
|
|
|
static TOOL_ACTION healShapes;
|
2023-07-02 17:59:04 +00:00
|
|
|
/// Extend selected lines to meet at a point
|
|
|
|
static TOOL_ACTION extendLines;
|
2024-04-30 00:47:34 +00:00
|
|
|
/// Simplify polygon outlines
|
|
|
|
static TOOL_ACTION simplifyPolygons;
|
2020-10-20 21:23:05 +00:00
|
|
|
|
2023-07-22 00:23:59 +00:00
|
|
|
/// Merge multiple polygons into a single polygon
|
|
|
|
static TOOL_ACTION mergePolygons;
|
|
|
|
/// Subtract polygons from other polygons
|
|
|
|
static TOOL_ACTION subtractPolygons;
|
|
|
|
/// Intersection of multiple polygons
|
|
|
|
static TOOL_ACTION intersectPolygons;
|
|
|
|
|
2013-12-03 14:57:09 +00:00
|
|
|
/// Activation of the edit tool
|
|
|
|
static TOOL_ACTION properties;
|
2013-12-09 10:01:05 +00:00
|
|
|
|
2015-02-12 03:22:24 +00:00
|
|
|
/// Activation of the exact move tool
|
|
|
|
static TOOL_ACTION moveExact;
|
|
|
|
|
|
|
|
/// Activation of the duplication tool with incrementing (e.g. pad number)
|
|
|
|
static TOOL_ACTION duplicateIncrement;
|
|
|
|
|
2013-12-09 10:01:05 +00:00
|
|
|
/// Deleting a BOARD_ITEM
|
|
|
|
static TOOL_ACTION remove;
|
2019-06-09 21:57:23 +00:00
|
|
|
static TOOL_ACTION deleteFull;
|
2014-02-06 14:09:38 +00:00
|
|
|
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION selectLayerPair;
|
|
|
|
|
2018-12-14 03:43:51 +00:00
|
|
|
/// Break a single track into two segments at the cursor
|
2017-08-03 15:53:07 +00:00
|
|
|
static TOOL_ACTION breakTrack;
|
2018-12-14 03:43:51 +00:00
|
|
|
|
2017-08-03 15:53:07 +00:00
|
|
|
static TOOL_ACTION drag45Degree;
|
|
|
|
static TOOL_ACTION dragFreeAngle;
|
|
|
|
|
2019-04-12 19:18:45 +00:00
|
|
|
// Drawing Tool Activations
|
2014-02-06 16:12:37 +00:00
|
|
|
static TOOL_ACTION drawLine;
|
2019-05-15 22:49:48 +00:00
|
|
|
static TOOL_ACTION drawPolygon;
|
2020-06-15 19:50:20 +00:00
|
|
|
static TOOL_ACTION drawRectangle;
|
2014-02-06 16:12:37 +00:00
|
|
|
static TOOL_ACTION drawCircle;
|
2014-02-10 09:58:58 +00:00
|
|
|
static TOOL_ACTION drawArc;
|
2023-10-23 17:23:24 +00:00
|
|
|
static TOOL_ACTION placeReferenceImage;
|
2014-07-09 12:01:06 +00:00
|
|
|
static TOOL_ACTION placeText;
|
2022-01-30 10:52:52 +00:00
|
|
|
static TOOL_ACTION drawTextBox;
|
2024-01-15 17:29:55 +00:00
|
|
|
static TOOL_ACTION drawTable;
|
2023-10-11 14:50:15 +00:00
|
|
|
static TOOL_ACTION spacingIncrease;
|
|
|
|
static TOOL_ACTION spacingDecrease;
|
|
|
|
static TOOL_ACTION amplIncrease;
|
|
|
|
static TOOL_ACTION amplDecrease;
|
2024-04-24 09:51:03 +00:00
|
|
|
static TOOL_ACTION lengthTunerSettings;
|
2020-09-12 20:09:40 +00:00
|
|
|
static TOOL_ACTION drawAlignedDimension;
|
2020-09-17 00:54:58 +00:00
|
|
|
static TOOL_ACTION drawCenterDimension;
|
2021-07-13 18:46:33 +00:00
|
|
|
static TOOL_ACTION drawRadialDimension;
|
2020-09-22 02:32:40 +00:00
|
|
|
static TOOL_ACTION drawOrthogonalDimension;
|
2020-09-12 20:09:40 +00:00
|
|
|
static TOOL_ACTION drawLeader;
|
2014-02-13 15:10:32 +00:00
|
|
|
static TOOL_ACTION drawZone;
|
2017-04-22 15:46:31 +00:00
|
|
|
static TOOL_ACTION drawVia;
|
2020-09-21 23:32:07 +00:00
|
|
|
static TOOL_ACTION drawRuleArea;
|
2017-02-06 05:59:55 +00:00
|
|
|
static TOOL_ACTION drawZoneCutout;
|
2017-02-06 07:37:13 +00:00
|
|
|
static TOOL_ACTION drawSimilarZone;
|
2021-03-13 20:19:46 +00:00
|
|
|
static TOOL_ACTION placeCharacteristics;
|
|
|
|
static TOOL_ACTION placeStackup;
|
2021-01-25 13:58:30 +00:00
|
|
|
static TOOL_ACTION placeFootprint;
|
2018-11-01 09:47:41 +00:00
|
|
|
static TOOL_ACTION placeImportedGraphics;
|
2014-07-09 12:01:06 +00:00
|
|
|
static TOOL_ACTION setAnchor;
|
2019-06-17 00:34:21 +00:00
|
|
|
static TOOL_ACTION deleteLastPoint;
|
2020-04-24 17:34:05 +00:00
|
|
|
static TOOL_ACTION closeOutline;
|
2014-07-09 12:01:06 +00:00
|
|
|
|
2014-08-04 12:23:19 +00:00
|
|
|
/// Increase width of currently drawn line
|
|
|
|
static TOOL_ACTION incWidth;
|
|
|
|
|
|
|
|
/// Decrease width of currently drawn line
|
|
|
|
static TOOL_ACTION decWidth;
|
|
|
|
|
|
|
|
/// Switch posture when drawing arc
|
|
|
|
static TOOL_ACTION arcPosture;
|
|
|
|
|
2023-08-17 13:25:26 +00:00
|
|
|
/// Snapping controls
|
|
|
|
static TOOL_ACTION magneticSnapActiveLayer;
|
|
|
|
static TOOL_ACTION magneticSnapAllLayers;
|
|
|
|
static TOOL_ACTION magneticSnapToggle;
|
|
|
|
|
2014-03-24 07:45:05 +00:00
|
|
|
// Push and Shove Router Tool
|
2015-02-18 16:53:46 +00:00
|
|
|
|
2014-02-17 17:21:00 +00:00
|
|
|
/// Activation of the Push and Shove router
|
2019-06-24 15:27:05 +00:00
|
|
|
static TOOL_ACTION routeSingleTrack;
|
2015-02-18 16:53:46 +00:00
|
|
|
|
2015-02-18 00:29:54 +00:00
|
|
|
/// Activation of the Push and Shove router (differential pair mode)
|
2019-06-24 15:27:05 +00:00
|
|
|
static TOOL_ACTION routeDiffPair;
|
2015-02-18 00:29:54 +00:00
|
|
|
|
2024-02-08 14:21:28 +00:00
|
|
|
static TOOL_ACTION tuneSingleTrack;
|
|
|
|
static TOOL_ACTION tuneDiffPair;
|
2023-10-11 16:10:48 +00:00
|
|
|
static TOOL_ACTION tuneSkew;
|
2015-02-18 00:29:54 +00:00
|
|
|
|
2020-02-07 19:57:24 +00:00
|
|
|
static TOOL_ACTION routerUndoLastSegment;
|
|
|
|
|
2022-07-14 16:38:39 +00:00
|
|
|
static TOOL_ACTION routerContinueFromEnd;
|
|
|
|
static TOOL_ACTION routerAttemptFinish;
|
2022-08-22 12:19:22 +00:00
|
|
|
static TOOL_ACTION routerRouteSelected;
|
|
|
|
static TOOL_ACTION routerRouteSelectedFromEnd;
|
|
|
|
static TOOL_ACTION routerAutorouteSelected;
|
2022-07-14 16:38:39 +00:00
|
|
|
|
2015-02-18 00:29:54 +00:00
|
|
|
/// Activation of the Push and Shove settings dialogs
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION routerSettingsDialog;
|
|
|
|
static TOOL_ACTION routerDiffPairDialog;
|
2015-02-18 16:53:46 +00:00
|
|
|
|
2020-04-19 14:39:16 +00:00
|
|
|
/// Actions to enable switching modes via hotkey assignments
|
|
|
|
static TOOL_ACTION routerHighlightMode;
|
|
|
|
static TOOL_ACTION routerShoveMode;
|
|
|
|
static TOOL_ACTION routerWalkaroundMode;
|
2021-10-28 22:46:05 +00:00
|
|
|
static TOOL_ACTION cycleRouterMode;
|
2015-02-18 00:29:54 +00:00
|
|
|
|
|
|
|
/// Activation of the Push and Shove router (inline dragging mode)
|
|
|
|
static TOOL_ACTION routerInlineDrag;
|
2017-08-31 02:35:30 +00:00
|
|
|
|
2023-10-06 17:04:00 +00:00
|
|
|
/// Generator tool
|
2023-10-19 00:31:01 +00:00
|
|
|
static TOOL_ACTION regenerateAllTuning;
|
2023-10-06 17:04:00 +00:00
|
|
|
static TOOL_ACTION regenerateAll;
|
|
|
|
static TOOL_ACTION regenerateSelected;
|
|
|
|
static TOOL_ACTION regenerateItem;
|
|
|
|
static TOOL_ACTION genStartEdit;
|
|
|
|
static TOOL_ACTION genUpdateEdit;
|
|
|
|
static TOOL_ACTION genPushEdit;
|
|
|
|
static TOOL_ACTION genRevertEdit;
|
|
|
|
static TOOL_ACTION genRemove;
|
|
|
|
|
2023-10-07 05:30:29 +00:00
|
|
|
static TOOL_ACTION generatorsShowManager;
|
|
|
|
|
2014-03-24 07:45:05 +00:00
|
|
|
// Point Editor
|
2015-06-19 15:32:33 +00:00
|
|
|
static TOOL_ACTION pointEditorAddCorner;
|
|
|
|
static TOOL_ACTION pointEditorRemoveCorner;
|
2014-07-09 14:50:31 +00:00
|
|
|
|
2022-12-05 18:27:00 +00:00
|
|
|
static TOOL_ACTION pointEditorArcKeepCenter;
|
|
|
|
static TOOL_ACTION pointEditorArcKeepEndpoint;
|
|
|
|
|
2023-08-05 15:43:10 +00:00
|
|
|
static TOOL_ACTION pointEditorMoveCorner;
|
|
|
|
static TOOL_ACTION pointEditorMoveMidpoint;
|
|
|
|
|
2022-12-05 18:27:00 +00:00
|
|
|
|
2020-09-24 01:05:46 +00:00
|
|
|
// Group Tool
|
|
|
|
static TOOL_ACTION groupProperties;
|
|
|
|
static TOOL_ACTION pickNewGroupMember;
|
|
|
|
|
|
|
|
|
|
|
|
// Placement Tool
|
2014-07-09 12:23:13 +00:00
|
|
|
static TOOL_ACTION alignTop;
|
|
|
|
static TOOL_ACTION alignBottom;
|
|
|
|
static TOOL_ACTION alignLeft;
|
|
|
|
static TOOL_ACTION alignRight;
|
2018-02-08 16:01:36 +00:00
|
|
|
static TOOL_ACTION alignCenterX;
|
|
|
|
static TOOL_ACTION alignCenterY;
|
Rework item distribution
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.
The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.
The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.
This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.
Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
2024-05-04 07:41:21 +00:00
|
|
|
static TOOL_ACTION distributeHorizontallyCenters;
|
|
|
|
static TOOL_ACTION distributeHorizontallyGaps;
|
|
|
|
static TOOL_ACTION distributeVerticallyCenters;
|
|
|
|
static TOOL_ACTION distributeVerticallyGaps;
|
2014-07-09 12:23:13 +00:00
|
|
|
|
2017-05-10 13:55:03 +00:00
|
|
|
// Position Relative Tool
|
|
|
|
/// Activation of the position relative tool
|
|
|
|
static TOOL_ACTION positionRelative;
|
2017-02-20 18:10:20 +00:00
|
|
|
|
2017-05-10 13:55:03 +00:00
|
|
|
/// Selection of anchor item for position relative tool
|
|
|
|
static TOOL_ACTION selectpositionRelativeItem;
|
2014-03-24 07:45:05 +00:00
|
|
|
|
|
|
|
// Display modes
|
2019-05-15 22:49:48 +00:00
|
|
|
static TOOL_ACTION showRatsnest;
|
2018-04-30 07:52:49 +00:00
|
|
|
static TOOL_ACTION ratsnestLineMode;
|
2021-10-04 12:42:08 +00:00
|
|
|
static TOOL_ACTION netColorModeCycle;
|
|
|
|
static TOOL_ACTION ratsnestModeCycle;
|
2014-03-24 07:45:05 +00:00
|
|
|
static TOOL_ACTION trackDisplayMode;
|
|
|
|
static TOOL_ACTION padDisplayMode;
|
|
|
|
static TOOL_ACTION viaDisplayMode;
|
2021-07-26 17:56:11 +00:00
|
|
|
static TOOL_ACTION zoneDisplayFilled;
|
|
|
|
static TOOL_ACTION zoneDisplayOutline;
|
|
|
|
static TOOL_ACTION zoneDisplayFractured;
|
|
|
|
static TOOL_ACTION zoneDisplayTriangulated;
|
2019-06-21 10:26:59 +00:00
|
|
|
static TOOL_ACTION zoneDisplayToggle;
|
2020-05-23 17:14:49 +00:00
|
|
|
static TOOL_ACTION showPadNumbers;
|
2014-03-24 07:45:05 +00:00
|
|
|
|
|
|
|
// Layer control
|
|
|
|
static TOOL_ACTION layerTop;
|
|
|
|
static TOOL_ACTION layerInner1;
|
|
|
|
static TOOL_ACTION layerInner2;
|
|
|
|
static TOOL_ACTION layerInner3;
|
|
|
|
static TOOL_ACTION layerInner4;
|
|
|
|
static TOOL_ACTION layerInner5;
|
|
|
|
static TOOL_ACTION layerInner6;
|
2019-06-21 10:43:39 +00:00
|
|
|
static TOOL_ACTION layerInner7;
|
|
|
|
static TOOL_ACTION layerInner8;
|
|
|
|
static TOOL_ACTION layerInner9;
|
|
|
|
static TOOL_ACTION layerInner10;
|
|
|
|
static TOOL_ACTION layerInner11;
|
|
|
|
static TOOL_ACTION layerInner12;
|
|
|
|
static TOOL_ACTION layerInner13;
|
|
|
|
static TOOL_ACTION layerInner14;
|
|
|
|
static TOOL_ACTION layerInner15;
|
|
|
|
static TOOL_ACTION layerInner16;
|
|
|
|
static TOOL_ACTION layerInner17;
|
|
|
|
static TOOL_ACTION layerInner18;
|
|
|
|
static TOOL_ACTION layerInner19;
|
|
|
|
static TOOL_ACTION layerInner20;
|
|
|
|
static TOOL_ACTION layerInner21;
|
|
|
|
static TOOL_ACTION layerInner22;
|
|
|
|
static TOOL_ACTION layerInner23;
|
|
|
|
static TOOL_ACTION layerInner24;
|
|
|
|
static TOOL_ACTION layerInner25;
|
|
|
|
static TOOL_ACTION layerInner26;
|
|
|
|
static TOOL_ACTION layerInner27;
|
|
|
|
static TOOL_ACTION layerInner28;
|
|
|
|
static TOOL_ACTION layerInner29;
|
|
|
|
static TOOL_ACTION layerInner30;
|
2014-03-24 07:45:05 +00:00
|
|
|
static TOOL_ACTION layerBottom;
|
|
|
|
static TOOL_ACTION layerNext;
|
|
|
|
static TOOL_ACTION layerPrev;
|
|
|
|
static TOOL_ACTION layerAlphaInc;
|
|
|
|
static TOOL_ACTION layerAlphaDec;
|
2015-05-18 11:48:11 +00:00
|
|
|
static TOOL_ACTION layerToggle;
|
2014-03-24 07:45:05 +00:00
|
|
|
|
2023-10-05 12:34:25 +00:00
|
|
|
// Group to link all actions that directly select layers
|
|
|
|
static TOOL_ACTION_GROUP layerDirectSwitchActions();
|
|
|
|
|
2014-07-09 14:25:50 +00:00
|
|
|
static TOOL_ACTION layerChanged; // notification
|
|
|
|
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION flipBoard;
|
|
|
|
|
2014-03-24 07:45:05 +00:00
|
|
|
// Track & via size control
|
|
|
|
static TOOL_ACTION trackWidthInc;
|
|
|
|
static TOOL_ACTION trackWidthDec;
|
|
|
|
static TOOL_ACTION viaSizeInc;
|
|
|
|
static TOOL_ACTION viaSizeDec;
|
|
|
|
|
2014-05-13 09:22:51 +00:00
|
|
|
static TOOL_ACTION trackViaSizeChanged; // notification
|
|
|
|
|
2022-09-03 18:29:02 +00:00
|
|
|
static TOOL_ACTION assignNetClass;
|
|
|
|
|
2014-07-09 14:57:01 +00:00
|
|
|
// Zone actions
|
2022-11-29 17:22:25 +00:00
|
|
|
static TOOL_ACTION zoneFill;
|
2014-07-09 14:57:01 +00:00
|
|
|
static TOOL_ACTION zoneFillAll;
|
2022-02-24 09:59:54 +00:00
|
|
|
static TOOL_ACTION zoneFillDirty;
|
2022-11-29 17:22:25 +00:00
|
|
|
static TOOL_ACTION zoneUnfill;
|
2014-12-08 22:41:47 +00:00
|
|
|
static TOOL_ACTION zoneUnfillAll;
|
2015-06-19 15:32:33 +00:00
|
|
|
static TOOL_ACTION zoneMerge;
|
2014-07-09 13:02:56 +00:00
|
|
|
|
2017-02-06 03:45:56 +00:00
|
|
|
/// Duplicate zone onto another layer
|
|
|
|
static TOOL_ACTION zoneDuplicate;
|
|
|
|
|
2021-03-19 23:06:29 +00:00
|
|
|
/// Scripting Actions
|
|
|
|
static TOOL_ACTION pluginsShowFolder;
|
|
|
|
|
2019-06-03 20:06:58 +00:00
|
|
|
// Global edit tool
|
2019-06-04 20:59:59 +00:00
|
|
|
static TOOL_ACTION boardSetup;
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION editTracksAndVias;
|
|
|
|
static TOOL_ACTION editTextAndGraphics;
|
2023-05-12 21:03:54 +00:00
|
|
|
static TOOL_ACTION editTeardrops;
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION globalDeletions;
|
|
|
|
static TOOL_ACTION cleanupTracksAndVias;
|
2020-06-17 12:46:50 +00:00
|
|
|
static TOOL_ACTION cleanupGraphics;
|
2019-06-03 20:06:58 +00:00
|
|
|
static TOOL_ACTION updateFootprint;
|
|
|
|
static TOOL_ACTION updateFootprints;
|
|
|
|
static TOOL_ACTION changeFootprint;
|
|
|
|
static TOOL_ACTION changeFootprints;
|
|
|
|
static TOOL_ACTION swapLayers;
|
2020-07-27 19:41:50 +00:00
|
|
|
static TOOL_ACTION removeUnusedPads;
|
2019-06-03 20:06:58 +00:00
|
|
|
|
2019-06-04 20:59:59 +00:00
|
|
|
static TOOL_ACTION importNetlist;
|
|
|
|
|
|
|
|
static TOOL_ACTION importSpecctraSession;
|
|
|
|
static TOOL_ACTION exportSpecctraDSN;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2019-06-04 20:59:59 +00:00
|
|
|
static TOOL_ACTION generateGerbers;
|
|
|
|
static TOOL_ACTION generateDrillFiles;
|
|
|
|
static TOOL_ACTION generatePosFile;
|
|
|
|
static TOOL_ACTION generateReportFile;
|
2023-06-12 18:12:39 +00:00
|
|
|
static TOOL_ACTION generateIPC2581File;
|
2019-06-04 20:59:59 +00:00
|
|
|
static TOOL_ACTION generateD356File;
|
|
|
|
static TOOL_ACTION generateBOM;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2019-06-03 13:49:17 +00:00
|
|
|
static TOOL_ACTION runDRC;
|
2019-06-04 18:46:52 +00:00
|
|
|
|
2020-06-27 11:57:40 +00:00
|
|
|
static TOOL_ACTION editFpInFpEditor;
|
2021-10-25 16:23:22 +00:00
|
|
|
static TOOL_ACTION editLibFpInFpEditor;
|
|
|
|
|
2019-06-04 21:29:51 +00:00
|
|
|
static TOOL_ACTION showLayersManager;
|
2024-03-04 23:00:26 +00:00
|
|
|
static TOOL_ACTION showNetInspector;
|
2019-06-03 13:49:17 +00:00
|
|
|
static TOOL_ACTION showPythonConsole;
|
2024-02-24 15:10:50 +00:00
|
|
|
static TOOL_ACTION zonesManager;
|
2019-06-03 13:49:17 +00:00
|
|
|
|
2014-07-09 13:02:56 +00:00
|
|
|
// Module editor tools
|
2019-06-03 23:50:44 +00:00
|
|
|
|
2021-03-29 11:01:03 +00:00
|
|
|
static TOOL_ACTION showFootprintTree;
|
|
|
|
static TOOL_ACTION hideFootprintTree;
|
2024-05-04 20:17:26 +00:00
|
|
|
static TOOL_ACTION footprintTreeSearch;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2019-06-04 18:46:52 +00:00
|
|
|
// We don't use ACTION::new here because we need to distinguish between New Library
|
|
|
|
// and New Footprint.
|
|
|
|
static TOOL_ACTION newFootprint;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2019-06-04 18:46:52 +00:00
|
|
|
// Create a new footprint using the Footprint Wizard
|
|
|
|
static TOOL_ACTION createFootprint;
|
|
|
|
|
2019-06-06 11:45:28 +00:00
|
|
|
static TOOL_ACTION editFootprint;
|
2022-04-21 10:57:15 +00:00
|
|
|
static TOOL_ACTION duplicateFootprint;
|
|
|
|
static TOOL_ACTION renameFootprint;
|
2019-06-03 23:50:44 +00:00
|
|
|
static TOOL_ACTION deleteFootprint;
|
2019-06-06 11:45:28 +00:00
|
|
|
static TOOL_ACTION cutFootprint;
|
|
|
|
static TOOL_ACTION copyFootprint;
|
|
|
|
static TOOL_ACTION pasteFootprint;
|
|
|
|
static TOOL_ACTION importFootprint;
|
|
|
|
static TOOL_ACTION exportFootprint;
|
2024-02-29 19:01:59 +00:00
|
|
|
static TOOL_ACTION openWithTextEditor;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2019-06-03 23:50:44 +00:00
|
|
|
static TOOL_ACTION footprintProperties;
|
2019-06-04 18:46:52 +00:00
|
|
|
static TOOL_ACTION defaultPadProperties;
|
2019-06-03 23:50:44 +00:00
|
|
|
|
2020-11-21 20:42:27 +00:00
|
|
|
static TOOL_ACTION checkFootprint;
|
|
|
|
|
2014-07-09 13:02:56 +00:00
|
|
|
/// Activation of the drawing tool (placing a PAD)
|
|
|
|
static TOOL_ACTION placePad;
|
|
|
|
|
2020-06-27 11:57:40 +00:00
|
|
|
static TOOL_ACTION explodePad;
|
|
|
|
static TOOL_ACTION recombinePad;
|
2017-10-19 21:14:01 +00:00
|
|
|
|
2014-07-09 13:02:56 +00:00
|
|
|
/// Tool for quick pad enumeration
|
|
|
|
static TOOL_ACTION enumeratePads;
|
|
|
|
|
2015-02-12 03:22:24 +00:00
|
|
|
/// Tool for creating an array of objects
|
|
|
|
static TOOL_ACTION createArray;
|
|
|
|
|
2020-11-14 21:21:54 +00:00
|
|
|
/// Display footprint graphics as outlines
|
2020-05-26 22:21:38 +00:00
|
|
|
static TOOL_ACTION graphicsOutlines;
|
2014-07-09 13:10:32 +00:00
|
|
|
|
2020-05-26 22:21:38 +00:00
|
|
|
/// Display texts as lines
|
|
|
|
static TOOL_ACTION textOutlines;
|
2019-12-23 17:11:45 +00:00
|
|
|
|
2017-01-21 21:06:18 +00:00
|
|
|
// Pad tools
|
2019-06-03 23:50:44 +00:00
|
|
|
|
2017-01-21 21:06:18 +00:00
|
|
|
/// Copy the selected pad's settings to the board design settings
|
2017-02-03 18:56:56 +00:00
|
|
|
static TOOL_ACTION copyPadSettings;
|
2017-01-21 21:06:18 +00:00
|
|
|
|
2019-06-04 18:46:52 +00:00
|
|
|
/// Copy the default pad settings to the selected pad
|
2017-02-03 18:56:56 +00:00
|
|
|
static TOOL_ACTION applyPadSettings;
|
2017-01-21 21:06:18 +00:00
|
|
|
|
2020-11-14 21:21:54 +00:00
|
|
|
/// Copy the current pad's settings to other pads in the footprint or on the board
|
2017-01-21 21:06:18 +00:00
|
|
|
static TOOL_ACTION pushPadSettings;
|
|
|
|
|
2017-02-23 06:23:17 +00:00
|
|
|
// Microwave tools
|
|
|
|
static TOOL_ACTION microwaveCreateGap;
|
|
|
|
|
|
|
|
static TOOL_ACTION microwaveCreateStub;
|
|
|
|
|
|
|
|
static TOOL_ACTION microwaveCreateStubArc;
|
|
|
|
|
|
|
|
static TOOL_ACTION microwaveCreateFunctionShape;
|
|
|
|
|
|
|
|
static TOOL_ACTION microwaveCreateLine;
|
|
|
|
|
2022-05-29 13:16:13 +00:00
|
|
|
// Constrained drawing
|
|
|
|
static TOOL_ACTION toggleHV45Mode;
|
2021-09-02 22:32:15 +00:00
|
|
|
|
2016-05-09 08:29:06 +00:00
|
|
|
// Locking
|
|
|
|
static TOOL_ACTION toggleLock;
|
|
|
|
static TOOL_ACTION lock;
|
|
|
|
static TOOL_ACTION unlock;
|
|
|
|
|
2020-08-11 19:37:07 +00:00
|
|
|
// Grouping
|
2021-02-16 20:45:25 +00:00
|
|
|
static TOOL_ACTION group;
|
|
|
|
static TOOL_ACTION ungroup;
|
|
|
|
static TOOL_ACTION removeFromGroup;
|
2020-08-11 19:37:07 +00:00
|
|
|
static TOOL_ACTION groupEnter;
|
2020-09-02 01:09:34 +00:00
|
|
|
static TOOL_ACTION groupLeave;
|
2020-08-11 19:37:07 +00:00
|
|
|
|
2014-03-24 07:45:05 +00:00
|
|
|
// Miscellaneous
|
2014-07-15 09:50:00 +00:00
|
|
|
static TOOL_ACTION selectionTool;
|
2015-06-18 15:51:51 +00:00
|
|
|
static TOOL_ACTION pickerTool;
|
2017-03-09 09:09:13 +00:00
|
|
|
static TOOL_ACTION measureTool;
|
2020-07-11 01:06:17 +00:00
|
|
|
static TOOL_ACTION drillOrigin;
|
2023-11-20 12:23:16 +00:00
|
|
|
static TOOL_ACTION drillResetOrigin;
|
2020-07-11 01:06:17 +00:00
|
|
|
static TOOL_ACTION placeFileOrigin;
|
|
|
|
static TOOL_ACTION appendBoard;
|
|
|
|
static TOOL_ACTION showEeschema;
|
|
|
|
static TOOL_ACTION boardStatistics;
|
2020-04-21 01:44:17 +00:00
|
|
|
static TOOL_ACTION boardReannotate;
|
2020-08-11 14:01:26 +00:00
|
|
|
static TOOL_ACTION repairBoard;
|
2021-05-21 16:52:11 +00:00
|
|
|
static TOOL_ACTION repairFootprint;
|
2020-09-10 19:58:05 +00:00
|
|
|
static TOOL_ACTION inspectClearance;
|
2020-09-22 23:16:02 +00:00
|
|
|
static TOOL_ACTION inspectConstraints;
|
2023-03-09 17:41:18 +00:00
|
|
|
static TOOL_ACTION diffFootprint;
|
2023-07-11 13:05:39 +00:00
|
|
|
static TOOL_ACTION showFootprintAssociations;
|
2020-09-22 23:16:02 +00:00
|
|
|
|
2020-07-11 01:06:17 +00:00
|
|
|
// Appearance controls
|
2021-05-29 15:53:55 +00:00
|
|
|
static TOOL_ACTION clearHighlight; // Turns off highlight and resets previous highlight
|
|
|
|
static TOOL_ACTION highlightNet; // Highlights a net by code (cross-probe highlight)
|
|
|
|
static TOOL_ACTION toggleLastNetHighlight; // Toggles between current and previous highlight
|
|
|
|
static TOOL_ACTION toggleNetHighlight; // Toggles between highlight off and highlight on
|
|
|
|
static TOOL_ACTION highlightNetSelection; // Turns on highlight and takes net from selection
|
|
|
|
static TOOL_ACTION highlightItem; // Select component via cross-probe
|
2019-01-01 21:54:10 +00:00
|
|
|
|
|
|
|
// Ratsnest
|
2022-09-03 18:29:02 +00:00
|
|
|
static TOOL_ACTION hideNetInRatsnest;
|
|
|
|
static TOOL_ACTION showNetInRatsnest;
|
2019-05-15 22:49:48 +00:00
|
|
|
static TOOL_ACTION localRatsnestTool;
|
2022-09-03 18:29:02 +00:00
|
|
|
static TOOL_ACTION hideLocalRatsnest;
|
2019-01-01 21:54:10 +00:00
|
|
|
static TOOL_ACTION updateLocalRatsnest;
|
2014-03-24 07:45:05 +00:00
|
|
|
|
2014-10-13 13:25:16 +00:00
|
|
|
/// Find an item
|
|
|
|
static TOOL_ACTION find;
|
|
|
|
|
2014-10-13 13:22:14 +00:00
|
|
|
/// Find an item and start moving
|
2019-07-26 19:19:17 +00:00
|
|
|
static TOOL_ACTION getAndPlace;
|
2014-10-13 13:22:14 +00:00
|
|
|
|
2018-08-24 10:54:45 +00:00
|
|
|
static TOOL_ACTION autoplaceOffboardComponents;
|
|
|
|
static TOOL_ACTION autoplaceSelectedComponents;
|
2015-02-18 00:10:20 +00:00
|
|
|
|
2018-11-13 13:30:56 +00:00
|
|
|
// convert tool
|
|
|
|
static TOOL_ACTION convertToPoly;
|
|
|
|
static TOOL_ACTION convertToZone;
|
|
|
|
static TOOL_ACTION convertToKeepout;
|
|
|
|
static TOOL_ACTION convertToLines;
|
|
|
|
static TOOL_ACTION convertToArc;
|
|
|
|
static TOOL_ACTION convertToTracks;
|
2022-09-14 22:28:09 +00:00
|
|
|
|
|
|
|
/// Drag and drop
|
|
|
|
static TOOL_ACTION ddAppendBoard;
|
|
|
|
static TOOL_ACTION ddImportFootprint;
|
2023-08-17 13:25:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class PCB_EVENTS
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// Hotkey feedback
|
|
|
|
const static TOOL_EVENT SnappingModeChangedByKeyEvent;
|
2013-09-27 18:52:34 +00:00
|
|
|
};
|
2015-02-18 00:04:47 +00:00
|
|
|
|
|
|
|
#endif
|