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 
67 
68  case ID_PCB_CIRCLE_BUTT:
71 
72  case ID_PCB_ARC_BUTT:
75 
79 
82 
83  case ID_PCB_MIRE_BUTT:
85 
88 
91 
94 
98 
99  case ID_ZOOM_IN: // toolbar button "Zoom In"
101 
102  case ID_ZOOM_OUT: // toolbar button "Zoom In"
104 
105  case ID_ZOOM_PAGE: // toolbar button "Fit on Screen"
107 
110 
113 
116 
119 
122 
125 
128 
131 
134 
135  case ID_FIND_ITEMS:
136  return PCB_ACTIONS::find.MakeEvent();
137 
140 
141  case ID_NO_TOOL_SELECTED:
143 
144  case ID_ZOOM_SELECTION:
146 
150 
153 
157 
160 
161  case ID_APPEND_FILE:
163 
166 
169 
172 
175 
178 
181  }
182 
184 }
static TOOL_ACTION drawLine
Activation of the drawing tool (line)
Definition: pcb_actions.h:119
static TOOL_ACTION placeModule
Activation of the drawing tool (placing a MODULE)
Definition: pcb_actions.h:149
static TOOL_ACTION placeDXF
Activation of the drawing tool (placing a drawing from DXF file)
Definition: pcb_actions.h:152
virtual boost::optional< TOOL_EVENT > TranslateLegacyId(int aId) override
>
Definition: pcb_actions.cpp:30
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
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 drillOrigin
Definition: pcb_actions.h:344
static TOOL_ACTION drawArc
Activation of the drawing tool (arc)
Definition: pcb_actions.h:125
static TOOL_ACTION microwaveCreateStubArc
Definition: pcb_actions.h:302
static TOOL_ACTION zoneDisplayOutlines
Definition: pcb_actions.h:225
static TOOL_ACTION drawZoneKeepout
Activation of the drawing tool (drawing a keepout area)
Definition: pcb_actions.h:137
Definition: id.h:232
static TOOL_ACTION zoneDisplayDisable
Definition: pcb_actions.h:224
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION microwaveCreateLine
Definition: pcb_actions.h:306
static TOOL_ACTION placePad
Activation of the drawing tool (placing a PAD)
Definition: pcb_actions.h:267
static TOOL_ACTION routerActivateSingle
Activation of the Push and Shove router.
Definition: pcb_actions.h:169
static TOOL_ACTION highlightNetCursor
Definition: pcb_actions.h:343
static TOOL_ACTION setAnchor
Activation of the drawing tool (placing the footprint anchor)
Definition: pcb_actions.h:155
static TOOL_ACTION deleteItemCursor
Definition: pcb_actions.h:341
static TOOL_ACTION routerActivateTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
Definition: pcb_actions.h:175
static TOOL_ACTION placeText
Activation of the drawing tool (text)
Definition: pcb_actions.h:128
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
static TOOL_ACTION highContrastMode
Definition: pcb_actions.h:226
static TOOL_ACTION zoomTool
Definition: pcb_actions.h:335
static TOOL_ACTION appendBoard
Definition: pcb_actions.h:346
static TOOL_ACTION routerActivateTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
Definition: pcb_actions.h:181
static TOOL_ACTION toBeDone
Definition: pcb_actions.h:348
static TOOL_ACTION drawDimension
Activation of the drawing tool (dimension)
Definition: pcb_actions.h:131
static TOOL_ACTION find
Find an item.
Definition: pcb_actions.h:351
static TOOL_ACTION microwaveCreateGap
Definition: pcb_actions.h:298
static TOOL_ACTION routerActivateTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
Definition: pcb_actions.h:178
static TOOL_ACTION placeTarget
Activation of the drawing tool (placing a TARGET)
Definition: pcb_actions.h:146
static TOOL_ACTION selectionTool
Definition: pcb_actions.h:334
static TOOL_ACTION moduleEdgeOutlines
Display module edges as outlines.
Definition: pcb_actions.h:282
static TOOL_ACTION microwaveCreateStub
Definition: pcb_actions.h:300
static TOOL_ACTION padDisplayMode
Definition: pcb_actions.h:221
static TOOL_ACTION drawCircle
Activation of the drawing tool (circle)
Definition: pcb_actions.h:122
static TOOL_ACTION viaDisplayMode
Definition: pcb_actions.h:222
static TOOL_ACTION moduleTextOutlines
Display module texts as outlines.
Definition: pcb_actions.h:285
static TOOL_ACTION microwaveCreateFunctionShape
Definition: pcb_actions.h:304
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:184
static TOOL_ACTION findMove
Find an item and start moving.
Definition: pcb_actions.h:354
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:172
static TOOL_ACTION drawZone
Activation of the drawing tool (drawing a ZONE)
Definition: pcb_actions.h:134
static TOOL_ACTION measureTool
Definition: pcb_actions.h:338
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 trackDisplayMode
Definition: pcb_actions.h:220
static TOOL_ACTION zoneDisplayEnable
Definition: pcb_actions.h:223
static TOOL_ACTION routerActivateDpDimensionsDialog
Definition: pcb_actions.h:185