KiCad PCB EDA Suite
pcb_actions.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2013-2016 CERN
5  * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
6  * @author Maciej Suminski <maciej.suminski@cern.ch>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #ifndef __PCB_ACTIONS_H
27 #define __PCB_ACTIONS_H
28 
29 #include <tool/tool_action.h>
30 #include <tool/actions.h>
31 #include <core/optional.h>
32 
33 class TOOL_EVENT;
34 class TOOL_MANAGER;
35 
42 class PCB_ACTIONS : public ACTIONS
43 {
44 public:
45  // Selection Tool
48 
51 
54 
57 
60 
63 
66 
69 
72 
75 
78 
81 
84 
87 
90 
91  // Edit Tool
94 
96  static TOOL_ACTION move;
97 
100 
103 
106 
109 
112 
115 
118 
121 
124 
127 
130 
134 
137 
140 
143 
144 
145  // Drawing Tool
148 
149  // Activation of the drawing tool (graphic polygons)
151 
154 
157 
160 
163 
166 
169 
172 
175 
178 
181 
184 
187 
190 
193 
196 
199 
200  // Push and Shove Router Tool
201 
204 
207 
210 
213 
216 
220 
221 
224 
225  // Point Editor
228 
231 
232  // Placement tool
235 
238 
241 
244 
247 
250 
253 
256 
257  // Position Relative Tool
260 
263 
264  // Display modes
275 
276  // Layer control
290 
291  static TOOL_ACTION layerChanged; // notification
292 
293  // Track & via size control
298 
299  static TOOL_ACTION trackViaSizeChanged; // notification
300 
301  // Zone actions
308 
311 
312  // Module editor tools
315 
318 
321 
324 
327 
330 
333 
336 
339 
340  // Pad tools
343 
346 
349 
350  // Microwave tools
352 
354 
356 
358 
360 
361  // Locking
365 
366  // Miscellaneous
384 
385  // Ratsnest
389 
392 
395 
397 
400 
402  virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override;
403 
405  virtual void RegisterAllTools( TOOL_MANAGER* aToolManager ) override;
406 };
407 
408 #endif
static TOOL_ACTION selectItems
Selects a list of items (specified as the event parameter)
Definition: pcb_actions.h:59
static TOOL_ACTION alignRight
Align items to the right edge of selection bounding box.
Definition: pcb_actions.h:243
static TOOL_ACTION selectionClear
Clears the current selection.
Definition: pcb_actions.h:53
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition: pcb_actions.h:47
static TOOL_ACTION layerBottom
Definition: pcb_actions.h:284
static TOOL_ACTION toggleLock
Definition: pcb_actions.h:362
static TOOL_ACTION drawLine
Activation of the drawing tool (line)
Definition: pcb_actions.h:147
static TOOL_ACTION placeModule
Activation of the drawing tool (placing a MODULE)
Definition: pcb_actions.h:183
static TOOL_ACTION placeImportedGraphics
Activation of the drawing tool (placing a drawing imported from DXF or SVG file)
Definition: pcb_actions.h:186
static TOOL_ACTION move
move an item
Definition: pcb_actions.h:96
static TOOL_ACTION unlock
Definition: pcb_actions.h:364
static TOOL_ACTION layerNext
Definition: pcb_actions.h:285
static TOOL_ACTION layerInner2
Definition: pcb_actions.h:279
static TOOL_ACTION editActivate
Activation of the edit tool.
Definition: pcb_actions.h:93
static TOOL_ACTION incWidth
Increase width of currently drawn line.
Definition: pcb_actions.h:192
static TOOL_ACTION layerInner5
Definition: pcb_actions.h:282
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:398
static TOOL_ACTION drawSimilarZone
Activation of the drawing tool (drawing a similar ZONE to another one)
Definition: pcb_actions.h:177
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:379
static TOOL_ACTION lock
Definition: pcb_actions.h:363
static TOOL_ACTION layerInner6
Definition: pcb_actions.h:283
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:303
static TOOL_ACTION viaSizeInc
Definition: pcb_actions.h:296
static TOOL_ACTION drawArc
Activation of the drawing tool (arc)
Definition: pcb_actions.h:156
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:355
static TOOL_ACTION showHelp
Definition: pcb_actions.h:382
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:399
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:288
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:271
static TOOL_ACTION unselectItem
Unselects an item (specified as the event parameter).
Definition: pcb_actions.h:62
static TOOL_ACTION selectNet
Selects all connections belonging to a single net.
Definition: pcb_actions.h:80
static TOOL_ACTION dragFreeAngle
Definition: pcb_actions.h:142
static TOOL_ACTION explodePadToShapes
Definition: pcb_actions.h:317
static TOOL_ACTION zoneDeleteSegzone
Definition: pcb_actions.h:307
static TOOL_ACTION drawZoneKeepout
Activation of the drawing tool (drawing a keepout area)
Definition: pcb_actions.h:171
static TOOL_ACTION enumeratePads
Tool for quick pad enumeration.
Definition: pcb_actions.h:320
static TOOL_ACTION unselectItems
Unselects a list of items (specified as the event parameter)
Definition: pcb_actions.h:65
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:287
static TOOL_ACTION alignCenterY
Align items to the center of selection bounding box.
Definition: pcb_actions.h:249
static TOOL_ACTION properties
Activation of the edit tool.
Definition: pcb_actions.h:111
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:270
static TOOL_ACTION trackWidthDec
Definition: pcb_actions.h:295
static TOOL_ACTION selectionMenu
Runs a selection menu to select from a list of items.
Definition: pcb_actions.h:68
static TOOL_ACTION selectConnection
Selects a connection between junctions.
Definition: pcb_actions.h:71
static TOOL_ACTION selectpositionRelativeItem
Selection of anchor item for position relative tool.
Definition: pcb_actions.h:262
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:359
static TOOL_ACTION removeAlt
Definition: pcb_actions.h:133
static TOOL_ACTION trackViaSizeChanged
Definition: pcb_actions.h:299
static TOOL_ACTION placePad
Activation of the drawing tool (placing a PAD)
Definition: pcb_actions.h:314
static TOOL_ACTION drag45Degree
Definition: pcb_actions.h:141
static TOOL_ACTION mirror
Mirroring of selected items.
Definition: pcb_actions.h:108
static TOOL_ACTION distributeVertically
Distributes items evenly along the vertical axis.
Definition: pcb_actions.h:255
static TOOL_ACTION routerActivateSingle
Activation of the Push and Shove router.
Definition: pcb_actions.h:203
static TOOL_ACTION updateUnits
Definition: pcb_actions.h:373
static TOOL_ACTION pasteFromClipboard
Paste from clipboard.
Definition: pcb_actions.h:329
static TOOL_ACTION switchUnits
Definition: pcb_actions.h:372
static TOOL_ACTION highlightNetCursor
Definition: pcb_actions.h:377
static TOOL_ACTION layerInner3
Definition: pcb_actions.h:280
static TOOL_ACTION setAnchor
Activation of the drawing tool (placing the footprint anchor)
Definition: pcb_actions.h:189
static TOOL_ACTION deleteItemCursor
Definition: pcb_actions.h:374
static TOOL_ACTION routerActivateTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:209
static TOOL_ACTION placeText
Activation of the drawing tool (text)
Definition: pcb_actions.h:159
static TOOL_ACTION showLocalRatsnest
Definition: pcb_actions.h:386
static TOOL_ACTION zoneFill
Definition: pcb_actions.h:302
static TOOL_ACTION resetCoords
Definition: pcb_actions.h:369
static TOOL_ACTION selectionModified
Modified selection notification.
Definition: pcb_actions.h:114
static TOOL_ACTION crossProbeSchToPcb
Definition: pcb_actions.h:380
static TOOL_ACTION alignBottom
Align items to the bottom edge of selection bounding box.
Definition: pcb_actions.h:237
static TOOL_ACTION decWidth
Decrease width of currently drawn line.
Definition: pcb_actions.h:195
static TOOL_ACTION drawGraphicPolygon
Definition: pcb_actions.h:150
static TOOL_ACTION moveExact
Activation of the exact move tool.
Definition: pcb_actions.h:117
static TOOL_ACTION layerTop
Definition: pcb_actions.h:277
static TOOL_ACTION distributeHorizontally
Distributes items evenly along the horizontal axis.
Definition: pcb_actions.h:252
static TOOL_ACTION pushPadSettings
Copy the current pad's settings to other pads in the module or on the board.
Definition: pcb_actions.h:348
Class TOOL_MANAGER.
Definition: tool_manager.h:49
static TOOL_ACTION highContrastMode
Definition: pcb_actions.h:272
static TOOL_ACTION duplicate
Activation of the duplication tool.
Definition: pcb_actions.h:120
static TOOL_ACTION trackWidthInc
Definition: pcb_actions.h:294
static TOOL_ACTION duplicateIncrement
Activation of the duplication tool with incrementing (e.g. pad number)
Definition: pcb_actions.h:123
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:381
static TOOL_ACTION rotateCw
Rotation of selected objects clockwise.
Definition: pcb_actions.h:99
static TOOL_ACTION layerPrev
Definition: pcb_actions.h:286
static TOOL_ACTION routerActivateTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:215
static TOOL_ACTION toBeDone
Definition: pcb_actions.h:383
static TOOL_ACTION drawDimension
Activation of the drawing tool (dimension)
Definition: pcb_actions.h:162
static TOOL_ACTION find
Find an item.
Definition: pcb_actions.h:391
static TOOL_ACTION copyPadSettings
Copy the selected pad's settings to the board design settings.
Definition: pcb_actions.h:342
static TOOL_ACTION hideLocalRatsnest
Definition: pcb_actions.h:387
static TOOL_ACTION pickerTool
Definition: pcb_actions.h:368
static TOOL_ACTION pointEditorAddCorner
Break outline (insert additional points to an edge)
Definition: pcb_actions.h:227
static TOOL_ACTION pointEditorRemoveCorner
Removes a corner.
Definition: pcb_actions.h:230
Class TOOL_EVENT.
Definition: tool_event.h:168
static TOOL_ACTION createArray
Tool for creating an array of objects.
Definition: pcb_actions.h:323
static TOOL_ACTION applyPadSettings
Copy the pad settings in the board design settings to the selected pad.
Definition: pcb_actions.h:345
static TOOL_ACTION zoneMerge
Definition: pcb_actions.h:306
static TOOL_ACTION alignLeft
Align items to the left edge of selection bounding box.
Definition: pcb_actions.h:240
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:351
static TOOL_ACTION routerActivateTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:212
static TOOL_ACTION drawVia
Activation of the drawing tool (drawing a VIA)
Definition: pcb_actions.h:168
static TOOL_ACTION alignTop
Align items to the top edge of selection bounding box.
Definition: pcb_actions.h:234
static TOOL_ACTION exchangeFootprints
Exchange footprints of modules.
Definition: pcb_actions.h:129
static TOOL_ACTION selectCopper
Selects whole copper connection.
Definition: pcb_actions.h:77
static TOOL_ACTION cutToClipboard
Paste from clipboard.
Definition: pcb_actions.h:332
static TOOL_ACTION drawZoneCutout
Activation of the drawing tool (drawing a ZONE cutout)
Definition: pcb_actions.h:174
static TOOL_ACTION placeTarget
Activation of the drawing tool (placing a TARGET)
Definition: pcb_actions.h:180
static TOOL_ACTION copyToClipboard
Copy selected items to clipboard.
Definition: pcb_actions.h:326
static TOOL_ACTION routerInlineDrag
Activation of the Push and Shove router (inline dragging mode)
Definition: pcb_actions.h:223
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:305
virtual void RegisterAllTools(TOOL_MANAGER *aToolManager) override
static TOOL_ACTION selectionTool
Definition: pcb_actions.h:367
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:335
static TOOL_ACTION inlineBreakTrack
Breaks track when router is not activated.
Definition: pcb_actions.h:139
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:353
static TOOL_ACTION zoneUnfill
Definition: pcb_actions.h:304
static TOOL_ACTION expandSelectedConnection
Expands the current selection to select a connection between two junctions.
Definition: pcb_actions.h:74
static TOOL_ACTION breakTrack
Break a single track into two segments at the cursor.
Definition: pcb_actions.h:136
static TOOL_ACTION clearHighlight
Definition: pcb_actions.h:375
static TOOL_ACTION updateFootprints
Update footprints to reflect any changes in the library.
Definition: pcb_actions.h:126
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:266
static TOOL_ACTION rotateCcw
Rotation of selected objects counter-clockwise.
Definition: pcb_actions.h:102
static TOOL_ACTION drawCircle
Activation of the drawing tool (circle)
Definition: pcb_actions.h:153
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:267
static TOOL_ACTION filterSelection
Filters the items in the current selection (invokes dialog)
Definition: pcb_actions.h:89
static TOOL_ACTION moduleTextOutlines
Display module texts as outlines.
Definition: pcb_actions.h:338
static TOOL_ACTION zoneDuplicate
Duplicate zone onto another layer.
Definition: pcb_actions.h:310
static TOOL_ACTION createPadFromShapes
Definition: pcb_actions.h:316
static TOOL_ACTION flip
Flipping of selected objects.
Definition: pcb_actions.h:105
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:357
static TOOL_ACTION arcPosture
Switch posture when drawing arc.
Definition: pcb_actions.h:198
static TOOL_ACTION layerChanged
Definition: pcb_actions.h:291
Class PCB_ACTIONS.
Definition: pcb_actions.h:42
static TOOL_ACTION highContrastInc
Definition: pcb_actions.h:273
static TOOL_ACTION highlightNet
Definition: pcb_actions.h:376
static TOOL_ACTION highlightNetSelection
Definition: pcb_actions.h:378
static TOOL_ACTION switchCursor
Definition: pcb_actions.h:371
static TOOL_ACTION routerActivateSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:218
static TOOL_ACTION selectOnSheetFromEeschema
Selects all components on sheet from Eeschema crossprobing.
Definition: pcb_actions.h:83
static TOOL_ACTION editFootprintInFpEditor
Definition: pcb_actions.h:396
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION selectItem
Selects an item (specified as the event parameter).
Definition: pcb_actions.h:56
static TOOL_ACTION graphicDisplayMode
Definition: pcb_actions.h:268
static TOOL_ACTION positionRelative
Activation of the position relative tool.
Definition: pcb_actions.h:259
boost::optional< T > OPT
Definition: optional.h:7
Class ACTIONS.
Definition: actions.h:41
static TOOL_ACTION layerInner4
Definition: pcb_actions.h:281
static TOOL_ACTION findMove
Find an item and start moving.
Definition: pcb_actions.h:394
static TOOL_ACTION updateLocalRatsnest
Definition: pcb_actions.h:388
static TOOL_ACTION remove
Deleting a BOARD_ITEM.
Definition: pcb_actions.h:132
virtual OPT< TOOL_EVENT > TranslateLegacyId(int aId) override
Definition: pcb_actions.cpp:30
static TOOL_ACTION layerInner1
Definition: pcb_actions.h:278
static TOOL_ACTION alignCenterX
Align items to the middle of selection bounding box.
Definition: pcb_actions.h:246
static TOOL_ACTION routerActivateDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:206
static TOOL_ACTION highContrastDec
Definition: pcb_actions.h:274
static TOOL_ACTION viaSizeDec
Definition: pcb_actions.h:297
static TOOL_ACTION drawZone
Activation of the drawing tool (drawing a ZONE)
Definition: pcb_actions.h:165
static TOOL_ACTION measureTool
Definition: pcb_actions.h:370
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
Definition: pcb_actions.h:50
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:265
static TOOL_ACTION selectSameSheet
Selects all components on the same sheet as the selected footprint.
Definition: pcb_actions.h:86
static TOOL_ACTION layerToggle
Definition: pcb_actions.h:289
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:269
static TOOL_ACTION routerActivateDpDimensionsDialog
Definition: pcb_actions.h:219