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 
71  case ID_PCB_CIRCLE_BUTT:
74 
75  case ID_PCB_ARC_BUTT:
78 
82 
85 
86  case ID_PCB_MIRE_BUTT:
88 
91 
94 
97 
101 
102  case ID_ZOOM_IN: // toolbar button "Zoom In"
104 
105  case ID_ZOOM_OUT: // toolbar button "Zoom In"
107 
108  case ID_ZOOM_PAGE: // toolbar button "Fit on Screen"
110 
113 
116 
119 
122 
125 
128 
131 
134 
137 
138  case ID_FIND_ITEMS:
139  return PCB_ACTIONS::find.MakeEvent();
140 
143 
144  case ID_NO_TOOL_SELECTED:
146 
147  case ID_ZOOM_SELECTION:
149 
153 
156 
160 
163 
164  case ID_APPEND_FILE:
166 
169 
172 
175 
178 
181 
184  }
185 
187 }
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:166
static TOOL_ACTION placeDXF
Activation of the drawing tool (placing a drawing from DXF file)
Definition: pcb_actions.h:169
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:366
static TOOL_ACTION drawArc
Activation of the drawing tool (arc)
Definition: pcb_actions.h:139
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:324
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:247
static TOOL_ACTION drawZoneKeepout
Activation of the drawing tool (drawing a keepout area)
Definition: pcb_actions.h:154
Definition: id.h:232
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:246
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:328
static TOOL_ACTION placePad
Activation of the drawing tool (placing a PAD)
Definition: pcb_actions.h:289
static TOOL_ACTION routerActivateSingle
Activation of the Push and Shove router.
Definition: pcb_actions.h:186
static TOOL_ACTION highlightNetCursor
Definition: pcb_actions.h:365
static TOOL_ACTION setAnchor
Activation of the drawing tool (placing the footprint anchor)
Definition: pcb_actions.h:172
static TOOL_ACTION deleteItemCursor
Definition: pcb_actions.h:363
static TOOL_ACTION routerActivateTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:192
static TOOL_ACTION placeText
Activation of the drawing tool (text)
Definition: pcb_actions.h:142
static TOOL_ACTION showLocalRatsnest
Definition: pcb_actions.h:370
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
static TOOL_ACTION highContrastMode
Definition: pcb_actions.h:248
static TOOL_ACTION zoomTool
Definition: pcb_actions.h:357
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:368
static TOOL_ACTION routerActivateTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:198
static TOOL_ACTION drawDimension
Activation of the drawing tool (dimension)
Definition: pcb_actions.h:145
static TOOL_ACTION find
Find an item.
Definition: pcb_actions.h:374
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:320
static TOOL_ACTION routerActivateTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:195
static TOOL_ACTION drawVia
Activation of the drawing tool (drawing a VIA)
Definition: pcb_actions.h:151
static TOOL_ACTION placeTarget
Activation of the drawing tool (placing a TARGET)
Definition: pcb_actions.h:163
static TOOL_ACTION selectionTool
Definition: pcb_actions.h:356
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:304
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:322
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:243
static TOOL_ACTION drawCircle
Activation of the drawing tool (circle)
Definition: pcb_actions.h:136
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:244
static TOOL_ACTION moduleTextOutlines
Display module texts as outlines.
Definition: pcb_actions.h:307
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:326
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:201
static TOOL_ACTION findMove
Find an item and start moving.
Definition: pcb_actions.h:377
static TOOL_ACTION gridSetOrigin
Definition: actions.h:64
static TOOL_ACTION routerActivateDiffPair
Activation of the Push and Shove router (differential pair mode)
Definition: pcb_actions.h:189
static TOOL_ACTION drawZone
Activation of the drawing tool (drawing a ZONE)
Definition: pcb_actions.h:148
static TOOL_ACTION measureTool
Definition: pcb_actions.h:360
static TOOL_ACTION trackDisplayMode
Definition: pcb_actions.h:242
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:245
static TOOL_ACTION routerActivateDpDimensionsDialog
Definition: pcb_actions.h:202