KiCad PCB EDA Suite
pcb_actions.cpp
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 #include "pcb_actions.h"
27 #include <pcbnew_id.h>
28 
29 
31 {
32  switch( aId )
33  {
34  case ID_PCB_MODULE_BUTT:
36 
37  case ID_TRACK_BUTT:
39 
40  case ID_DIFF_PAIR_BUTT:
42 
45 
48 
51 
54 
57 
58  case ID_PCB_ZONES_BUTT:
60 
63 
66 
70 
74 
75  case ID_PCB_CIRCLE_BUTT:
78 
79  case ID_PCB_ARC_BUTT:
82 
86 
89 
90  case ID_PCB_MIRE_BUTT:
92 
95 
98 
101 
105 
106  case ID_ZOOM_IN: // toolbar button "Zoom In"
107  case ID_VIEWER_ZOOM_IN:
109 
110  case ID_ZOOM_OUT: // toolbar button "Zoom In"
111  case ID_VIEWER_ZOOM_OUT:
113 
114  case ID_ZOOM_PAGE: // toolbar button "Fit on Screen"
115  case ID_VIEWER_ZOOM_PAGE:
117 
120 
123 
126 
129 
132 
135 
138 
141 
144 
145  case ID_FIND_ITEMS:
146  return PCB_ACTIONS::find.MakeEvent();
147 
150 
151  case ID_NO_TOOL_SELECTED:
153 
154  case ID_ZOOM_SELECTION:
155  return ACTIONS::zoomTool.MakeEvent();
156 
160 
163 
167 
170 
171  case ID_APPEND_FILE:
173 
176 
179 
182 
185 
188 
191 
192  case ID_EDIT_CUT:
194 
195  case ID_EDIT_COPY:
197 
198  case ID_EDIT_PASTE:
200  }
201 
203 }
static TOOL_ACTION drawLine
Activation of the drawing tool (line)
Definition: pcb_actions.h:133
static TOOL_ACTION placeModule
Activation of the drawing tool (placing a MODULE)
Definition: pcb_actions.h:169
static TOOL_ACTION placeDXF
Activation of the drawing tool (placing a drawing from DXF file)
Definition: pcb_actions.h:172
virtual boost::optional< TOOL_EVENT > TranslateLegacyId(int aId) override
>
Definition: pcb_actions.cpp:30
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
static TOOL_ACTION drillOrigin
Definition: pcb_actions.h:374
static TOOL_ACTION drawArc
Activation of the drawing tool (arc)
Definition: pcb_actions.h:142
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:333
static TOOL_ACTION zoomTool
Definition: actions.h:58
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:250
static TOOL_ACTION drawZoneKeepout
Activation of the drawing tool (drawing a keepout area)
Definition: pcb_actions.h:157
Definition: id.h:232
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:249
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:337
static TOOL_ACTION placePad
Activation of the drawing tool (placing a PAD)
Definition: pcb_actions.h:292
static TOOL_ACTION routerActivateSingle
Activation of the Push and Shove router.
Definition: pcb_actions.h:189
static TOOL_ACTION pasteFromClipboard
Paste from clipboard.
Definition: pcb_actions.h:307
static TOOL_ACTION highlightNetCursor
Definition: pcb_actions.h:373
static TOOL_ACTION setAnchor
Activation of the drawing tool (placing the footprint anchor)
Definition: pcb_actions.h:175
static TOOL_ACTION deleteItemCursor
Definition: pcb_actions.h:371
static TOOL_ACTION routerActivateTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:195
static TOOL_ACTION placeText
Activation of the drawing tool (text)
Definition: pcb_actions.h:145
static TOOL_ACTION showLocalRatsnest
Definition: pcb_actions.h:378
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
static TOOL_ACTION drawGraphicPolygon
Definition: pcb_actions.h:136
static TOOL_ACTION highContrastMode
Definition: pcb_actions.h:251
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:376
static TOOL_ACTION routerActivateTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:201
static TOOL_ACTION drawDimension
Activation of the drawing tool (dimension)
Definition: pcb_actions.h:148
static TOOL_ACTION find
Find an item.
Definition: pcb_actions.h:382
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:329
static TOOL_ACTION routerActivateTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:198
static TOOL_ACTION drawVia
Activation of the drawing tool (drawing a VIA)
Definition: pcb_actions.h:154
static TOOL_ACTION cutToClipboard
Paste from clipboard.
Definition: pcb_actions.h:310
static TOOL_ACTION placeTarget
Activation of the drawing tool (placing a TARGET)
Definition: pcb_actions.h:166
static TOOL_ACTION copyToClipboard
Copy selected items to clipboard.
Definition: pcb_actions.h:304
static TOOL_ACTION selectionTool
Definition: pcb_actions.h:365
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:313
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY
Definition: pcbframe.cpp:253
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:331
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:246
static TOOL_ACTION drawCircle
Activation of the drawing tool (circle)
Definition: pcb_actions.h:139
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:247
static TOOL_ACTION moduleTextOutlines
Display module texts as outlines.
Definition: pcb_actions.h:316
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:335
TOOL_EVENT MakeEvent() const
Function HasHotKey() Checks if the action has a hot key assigned.
Definition: tool_action.h:104
static TOOL_ACTION routerActivateSettingsDialog
Activation of the Push and Shove settings dialogs.
Definition: pcb_actions.h:204
static TOOL_ACTION findMove
Find an item and start moving.
Definition: pcb_actions.h:385
static TOOL_ACTION gridSetOrigin
Definition: actions.h:65
static TOOL_ACTION routerActivateDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:192
static TOOL_ACTION drawZone
Activation of the drawing tool (drawing a ZONE)
Definition: pcb_actions.h:151
static TOOL_ACTION measureTool
Definition: pcb_actions.h:368
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:245
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar ID_PCB_MEASUREMENT_TOOL
Definition: pcbframe.cpp:262
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:248
static TOOL_ACTION routerActivateDpDimensionsDialog
Definition: pcb_actions.h:205