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 
36 enum class ZONE_MODE
37 {
38  ADD,
39  CUTOUT,
40  SIMILAR,
42 };
43 
44 
51 class PCB_ACTIONS : public ACTIONS
52 {
53 public:
54  // Selection Tool
57 
60 
63 
67 
71 
74 
78 
81 
84 
87 
90 
92  static TOOL_ACTION move;
93  static TOOL_ACTION drag;
94 
97 
101 
104 
107 
110 
113 
116 
119 
122 
126 
128 
131 
134 
137 
138 
139  // Drawing Tool Activations
158 
161 
164 
167 
168  // Push and Shove Router Tool
169 
172 
175 
178 
181 
184 
186 
190 
195 
198 
199  // Point Editor
202 
205 
206  // Placement tool
215 
216  // Position Relative Tool
219 
222 
223  // Display modes
235 
236  // Layer control
274 
275  static TOOL_ACTION layerChanged; // notification
276 
278 
279  // Track & via size control
284 
285  static TOOL_ACTION trackViaSizeChanged; // notification
286 
287  // Zone actions
293 
296 
297  // Global edit tool
309 
311 
314 
321 
324 
329 
330  // Module editor tools
331 
333 
334  // We don't use ACTION::new here because we need to distinguish between New Library
335  // and New Footprint.
337 
338  // Create a new footprint using the Footprint Wizard
340 
341  // We don't use ACTION::save here because we need to distinguish between saving to
342  // the library and saving to the board (which have different tooltips and icons).
345 
353 
356 
359 
362 
365 
368 
371 
374 
375  // Pad tools
376 
379 
382 
385 
386  // Microwave tools
388 
390 
392 
394 
396 
397  // Locking
401 
402  // Miscellaneous
412 
413  // Appearance controls
422 
423  // Ratsnest
427 
430 
433 
436 
438  virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override;
439 };
440 
441 #endif
static TOOL_ACTION selectItems
Selects a list of items (specified as the event parameter)
Definition: pcb_actions.h:69
static TOOL_ACTION alignRight
Definition: pcb_actions.h:210
static TOOL_ACTION selectionClear
Clears the current selection.
Definition: pcb_actions.h:62
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition: pcb_actions.h:56
static TOOL_ACTION layerBottom
Definition: pcb_actions.h:268
static TOOL_ACTION toggleLock
Definition: pcb_actions.h:398
static TOOL_ACTION layerInner26
Definition: pcb_actions.h:263
static TOOL_ACTION drawLine
Definition: pcb_actions.h:140
static TOOL_ACTION saveToBoard
Definition: pcb_actions.h:343
static TOOL_ACTION placeModule
Definition: pcb_actions.h:153
static TOOL_ACTION placeImportedGraphics
Definition: pcb_actions.h:154
static TOOL_ACTION explodePad
Definition: pcb_actions.h:360
static TOOL_ACTION move
move or drag an item
Definition: pcb_actions.h:92
static TOOL_ACTION footprintProperties
Definition: pcb_actions.h:354
static TOOL_ACTION deleteFull
Definition: pcb_actions.h:125
static TOOL_ACTION unlock
Definition: pcb_actions.h:400
static TOOL_ACTION globalDeletions
Definition: pcb_actions.h:301
static TOOL_ACTION layerNext
Definition: pcb_actions.h:269
static TOOL_ACTION layerInner2
Definition: pcb_actions.h:239
static TOOL_ACTION selectLayerPair
Definition: pcb_actions.h:127
static TOOL_ACTION generateGerbers
Definition: pcb_actions.h:315
Add a new zone with the same settings as an existing one.
static TOOL_ACTION editFpInFpEditor
Definition: pcb_actions.h:325
static TOOL_ACTION incWidth
Increase width of currently drawn line.
Definition: pcb_actions.h:160
static TOOL_ACTION layerInner5
Definition: pcb_actions.h:242
static TOOL_ACTION changeTrackWidth
Updates selected tracks & vias to the current track & via dimensions.
Definition: pcb_actions.h:109
static TOOL_ACTION autoplaceOffboardComponents
Definition: pcb_actions.h:434
static TOOL_ACTION drawSimilarZone
Definition: pcb_actions.h:151
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:407
static TOOL_ACTION lock
Definition: pcb_actions.h:399
static TOOL_ACTION layerInner6
Definition: pcb_actions.h:243
static TOOL_ACTION routerDiffPairDialog
Definition: pcb_actions.h:189
static TOOL_ACTION zoneFillAll
Definition: pcb_actions.h:289
static TOOL_ACTION viaSizeInc
Definition: pcb_actions.h:282
static TOOL_ACTION drawArc
Definition: pcb_actions.h:144
static TOOL_ACTION hideNet
Definition: pcb_actions.h:420
static TOOL_ACTION layerInner7
Definition: pcb_actions.h:244
static TOOL_ACTION layerInner8
Definition: pcb_actions.h:245
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:391
static TOOL_ACTION highlightItem
Definition: pcb_actions.h:419
static TOOL_ACTION layerInner21
Definition: pcb_actions.h:258
static TOOL_ACTION ratsnestLineMode
Definition: pcb_actions.h:225
static TOOL_ACTION cleanupGraphics
Definition: pcb_actions.h:303
static TOOL_ACTION autoplaceSelectedComponents
Definition: pcb_actions.h:435
static TOOL_ACTION layerAlphaDec
Definition: pcb_actions.h:272
static TOOL_ACTION boardStatistics
Definition: pcb_actions.h:411
static TOOL_ACTION routerUndoLastSegment
Definition: pcb_actions.h:185
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:231
static TOOL_ACTION unselectItem
Definition: pcb_actions.h:66
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:136
static TOOL_ACTION drawZoneKeepout
Definition: pcb_actions.h:149
static TOOL_ACTION enumeratePads
Tool for quick pad enumeration.
Definition: pcb_actions.h:364
static TOOL_ACTION unselectItems
Definition: pcb_actions.h:70
static TOOL_ACTION layerAlphaInc
Definition: pcb_actions.h:271
static TOOL_ACTION placeFileOrigin
Definition: pcb_actions.h:408
static TOOL_ACTION routerTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:180
static TOOL_ACTION alignCenterY
Definition: pcb_actions.h:212
static TOOL_ACTION properties
Activation of the edit tool.
Definition: pcb_actions.h:112
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:230
static TOOL_ACTION trackWidthDec
Definition: pcb_actions.h:281
static TOOL_ACTION selectionMenu
Runs a selection menu to select from a list of items.
Definition: pcb_actions.h:73
static TOOL_ACTION drawPolygon
Definition: pcb_actions.h:141
static TOOL_ACTION selectConnection
Selects tracks between junctions or expands an existing selection to pads or the entire connection.
Definition: pcb_actions.h:77
static TOOL_ACTION routerHighlightMode
Actions to enable switching modes via hotkey assignments.
Definition: pcb_actions.h:192
static TOOL_ACTION selectpositionRelativeItem
Selection of anchor item for position relative tool.
Definition: pcb_actions.h:221
static TOOL_ACTION getAndPlace
Find an item and start moving.
Definition: pcb_actions.h:432
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:395
static TOOL_ACTION trackViaSizeChanged
Definition: pcb_actions.h:285
static TOOL_ACTION showPythonConsole
Definition: pcb_actions.h:328
static TOOL_ACTION placePad
Activation of the drawing tool (placing a PAD)
Definition: pcb_actions.h:358
static TOOL_ACTION drag45Degree
Definition: pcb_actions.h:135
static TOOL_ACTION mirror
Mirroring of selected items.
Definition: pcb_actions.h:106
static TOOL_ACTION changeFootprint
Definition: pcb_actions.h:306
static TOOL_ACTION showLayersManager
Definition: pcb_actions.h:326
static TOOL_ACTION updateFootprint
Definition: pcb_actions.h:304
static TOOL_ACTION distributeVertically
Definition: pcb_actions.h:214
static TOOL_ACTION updateUnits
Definition: pcb_actions.h:406
static TOOL_ACTION swapLayers
Definition: pcb_actions.h:308
static TOOL_ACTION localRatsnestTool
Definition: pcb_actions.h:424
static TOOL_ACTION zoomFootprintAutomatically
Definition: pcb_actions.h:234
static TOOL_ACTION toggleLastNetHighlight
Definition: pcb_actions.h:416
static TOOL_ACTION changeFootprints
Definition: pcb_actions.h:307
static TOOL_ACTION layerInner3
Definition: pcb_actions.h:240
static TOOL_ACTION setAnchor
Definition: pcb_actions.h:155
static TOOL_ACTION layerInner24
Definition: pcb_actions.h:261
static TOOL_ACTION editTracksAndVias
Definition: pcb_actions.h:299
static TOOL_ACTION generateReportFile
Definition: pcb_actions.h:318
static TOOL_ACTION placeText
Definition: pcb_actions.h:145
static TOOL_ACTION zoneFill
Definition: pcb_actions.h:288
static TOOL_ACTION layerInner11
Definition: pcb_actions.h:248
static TOOL_ACTION alignBottom
Definition: pcb_actions.h:208
static TOOL_ACTION generateD356File
Definition: pcb_actions.h:319
static TOOL_ACTION createFootprint
Definition: pcb_actions.h:339
static TOOL_ACTION decWidth
Decrease width of currently drawn line.
Definition: pcb_actions.h:163
static TOOL_ACTION cutFootprint
Definition: pcb_actions.h:348
static TOOL_ACTION routerTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:183
static TOOL_ACTION moveExact
Activation of the exact move tool.
Definition: pcb_actions.h:115
static TOOL_ACTION copyFootprint
Definition: pcb_actions.h:349
static TOOL_ACTION layerTop
Definition: pcb_actions.h:237
static TOOL_ACTION distributeHorizontally
Definition: pcb_actions.h:213
static TOOL_ACTION pushPadSettings
Copy the current pad's settings to other pads in the module or on the board.
Definition: pcb_actions.h:384
static TOOL_ACTION cleanupTracksAndVias
Definition: pcb_actions.h:302
static TOOL_ACTION layerInner23
Definition: pcb_actions.h:260
static TOOL_ACTION highlightNetTool
Definition: pcb_actions.h:417
TOOL_MANAGER.
Definition: tool_manager.h:51
static TOOL_ACTION duplicate
Activation of the duplication tool.
Definition: pcb_actions.h:118
static TOOL_ACTION trackWidthInc
Definition: pcb_actions.h:280
static TOOL_ACTION duplicateIncrement
Activation of the duplication tool with incrementing (e.g. pad number)
Definition: pcb_actions.h:121
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:409
static TOOL_ACTION zoneDisplayToggle
Definition: pcb_actions.h:232
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:188
static TOOL_ACTION toggleFootprintTree
Definition: pcb_actions.h:332
static TOOL_ACTION rotateCw
Rotation of selected objects.
Definition: pcb_actions.h:99
static TOOL_ACTION layerInner13
Definition: pcb_actions.h:250
static TOOL_ACTION layerPrev
Definition: pcb_actions.h:270
static TOOL_ACTION drawDimension
Definition: pcb_actions.h:146
static TOOL_ACTION importNetlist
Definition: pcb_actions.h:310
static TOOL_ACTION find
Find an item.
Definition: pcb_actions.h:429
static TOOL_ACTION copyPadSettings
Copy the selected pad's settings to the board design settings.
Definition: pcb_actions.h:378
static TOOL_ACTION exportFootprint
Definition: pcb_actions.h:352
static TOOL_ACTION showPadNumbers
Definition: pcb_actions.h:233
static TOOL_ACTION pickerTool
Definition: pcb_actions.h:404
static TOOL_ACTION layerInner25
Definition: pcb_actions.h:262
static TOOL_ACTION editFootprint
Definition: pcb_actions.h:346
static TOOL_ACTION layerInner18
Definition: pcb_actions.h:255
static TOOL_ACTION pointEditorAddCorner
Break outline (insert additional points to an edge)
Definition: pcb_actions.h:201
static TOOL_ACTION pointEditorRemoveCorner
Removes a corner.
Definition: pcb_actions.h:204
TOOL_EVENT.
Definition: tool_event.h:171
static TOOL_ACTION createArray
Tool for creating an array of objects.
Definition: pcb_actions.h:367
static TOOL_ACTION applyPadSettings
Copy the default pad settings to the selected pad.
Definition: pcb_actions.h:381
static TOOL_ACTION zoneMerge
Definition: pcb_actions.h:292
static TOOL_ACTION alignLeft
Definition: pcb_actions.h:209
static TOOL_ACTION layerInner30
Definition: pcb_actions.h:267
static TOOL_ACTION recombinePad
Definition: pcb_actions.h:361
static TOOL_ACTION layerInner29
Definition: pcb_actions.h:266
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:224
static TOOL_ACTION drawRectangle
Definition: pcb_actions.h:142
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:387
static TOOL_ACTION layerInner10
Definition: pcb_actions.h:247
static TOOL_ACTION drawVia
Definition: pcb_actions.h:148
static TOOL_ACTION alignTop
Definition: pcb_actions.h:207
static TOOL_ACTION showEeschema
Definition: pcb_actions.h:410
static TOOL_ACTION generatePosFile
Definition: pcb_actions.h:317
static TOOL_ACTION drawZoneCutout
Definition: pcb_actions.h:150
static TOOL_ACTION routerWalkaroundMode
Definition: pcb_actions.h:194
static TOOL_ACTION layerInner15
Definition: pcb_actions.h:252
static TOOL_ACTION placeTarget
Definition: pcb_actions.h:152
static TOOL_ACTION routerInlineDrag
Activation of the Push and Shove router (inline dragging mode)
Definition: pcb_actions.h:197
static TOOL_ACTION hideDynamicRatsnest
Definition: pcb_actions.h:425
static TOOL_ACTION layerInner28
Definition: pcb_actions.h:265
static TOOL_ACTION zoneUnfillAll
Definition: pcb_actions.h:291
static TOOL_ACTION importFootprint
Definition: pcb_actions.h:351
ZONE_MODE
Definition: pcb_actions.h:36
static TOOL_ACTION selectionTool
Definition: pcb_actions.h:403
static TOOL_ACTION boardSetup
Definition: pcb_actions.h:298
static TOOL_ACTION layerInner27
Definition: pcb_actions.h:264
Make a cutout to an existing zone.
static TOOL_ACTION inlineBreakTrack
Breaks track when router is not activated.
Definition: pcb_actions.h:133
static TOOL_ACTION layerInner17
Definition: pcb_actions.h:254
static TOOL_ACTION drag
Definition: pcb_actions.h:93
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:389
static TOOL_ACTION zoneUnfill
Definition: pcb_actions.h:290
static TOOL_ACTION breakTrack
Break a single track into two segments at the cursor.
Definition: pcb_actions.h:130
static TOOL_ACTION clearHighlight
Definition: pcb_actions.h:414
static TOOL_ACTION layerInner20
Definition: pcb_actions.h:257
static TOOL_ACTION updateFootprints
Definition: pcb_actions.h:305
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:227
static TOOL_ACTION importSpecctraSession
Definition: pcb_actions.h:312
static TOOL_ACTION rotateCcw
Definition: pcb_actions.h:100
static TOOL_ACTION drawCircle
Definition: pcb_actions.h:143
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:228
static TOOL_ACTION graphicsOutlines
Display module edges as outlines.
Definition: pcb_actions.h:370
static TOOL_ACTION filterSelection
Filters the items in the current selection (invokes dialog)
Definition: pcb_actions.h:89
static TOOL_ACTION zoneDuplicate
Duplicate zone onto another layer.
Definition: pcb_actions.h:295
static TOOL_ACTION saveToLibrary
Definition: pcb_actions.h:344
static TOOL_ACTION flip
Flipping of selected objects.
Definition: pcb_actions.h:103
static TOOL_ACTION generateBOM
Definition: pcb_actions.h:320
static TOOL_ACTION layerInner22
Definition: pcb_actions.h:259
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:393
static TOOL_ACTION defaultPadProperties
Definition: pcb_actions.h:355
static TOOL_ACTION arcPosture
Switch posture when drawing arc.
Definition: pcb_actions.h:166
static TOOL_ACTION layerChanged
Definition: pcb_actions.h:275
PCB_ACTIONS.
Definition: pcb_actions.h:51
static TOOL_ACTION showNet
Definition: pcb_actions.h:421
static TOOL_ACTION exportSpecctraDSN
Definition: pcb_actions.h:313
static TOOL_ACTION showMicrowaveToolbar
Definition: pcb_actions.h:327
static TOOL_ACTION editTextAndGraphics
Definition: pcb_actions.h:300
static TOOL_ACTION highlightNet
Definition: pcb_actions.h:415
static TOOL_ACTION highlightNetSelection
Definition: pcb_actions.h:418
static TOOL_ACTION selectOnSheetFromEeschema
Selects all components on sheet from Eeschema crossprobing.
Definition: pcb_actions.h:83
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
Definition: pcb_actions.h:171
static TOOL_ACTION listNets
Definition: pcb_actions.h:322
static TOOL_ACTION layerInner14
Definition: pcb_actions.h:251
TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION layerInner9
Definition: pcb_actions.h:246
static TOOL_ACTION selectItem
Selects an item (specified as the event parameter).
Definition: pcb_actions.h:65
static TOOL_ACTION runDRC
Definition: pcb_actions.h:323
static TOOL_ACTION positionRelative
Activation of the position relative tool.
Definition: pcb_actions.h:218
static TOOL_ACTION layerInner16
Definition: pcb_actions.h:253
static TOOL_ACTION deleteLastPoint
Definition: pcb_actions.h:156
boost::optional< T > OPT
Definition: optional.h:7
ACTIONS.
Definition: actions.h:43
static TOOL_ACTION pasteFootprint
Definition: pcb_actions.h:350
static TOOL_ACTION layerInner4
Definition: pcb_actions.h:241
static TOOL_ACTION updateLocalRatsnest
Definition: pcb_actions.h:426
static TOOL_ACTION flipBoard
Definition: pcb_actions.h:277
static TOOL_ACTION remove
Deleting a BOARD_ITEM.
Definition: pcb_actions.h:124
static TOOL_ACTION layerInner19
Definition: pcb_actions.h:256
virtual OPT< TOOL_EVENT > TranslateLegacyId(int aId) override
Definition: pcb_actions.cpp:35
static TOOL_ACTION layerInner1
Definition: pcb_actions.h:238
static TOOL_ACTION moveWithReference
move with a reference point
Definition: pcb_actions.h:96
static TOOL_ACTION alignCenterX
Definition: pcb_actions.h:211
static TOOL_ACTION routerShoveMode
Definition: pcb_actions.h:193
static TOOL_ACTION viaSizeDec
Definition: pcb_actions.h:283
static TOOL_ACTION drawZone
Definition: pcb_actions.h:147
static TOOL_ACTION deleteFootprint
Definition: pcb_actions.h:347
static TOOL_ACTION measureTool
Definition: pcb_actions.h:405
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
Definition: pcb_actions.h:59
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:226
static TOOL_ACTION newFootprint
Definition: pcb_actions.h:336
static TOOL_ACTION generateDrillFiles
Definition: pcb_actions.h:316
static TOOL_ACTION layerInner12
Definition: pcb_actions.h:249
static TOOL_ACTION selectSameSheet
Selects all components on the same sheet as the selected footprint.
Definition: pcb_actions.h:86
static TOOL_ACTION closeOutline
Definition: pcb_actions.h:157
static TOOL_ACTION textOutlines
Display texts as lines.
Definition: pcb_actions.h:373
static TOOL_ACTION layerToggle
Definition: pcb_actions.h:273
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:229
static TOOL_ACTION routerTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:177
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:174