KiCad PCB EDA Suite
ee_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) 2019 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 #ifndef EESCHEMA_ACTIONS_H
25 #define EESCHEMA_ACTIONS_H
26 
27 #include <tool/tool_action.h>
28 #include <tool/actions.h>
29 #include <core/optional.h>
30 
31 class TOOL_EVENT;
32 class TOOL_MANAGER;
33 
34 extern char g_lastBusEntryShape;
35 
42 class EE_ACTIONS : public ACTIONS
43 {
44 public:
45  // Selection Tool
48 
51 
55 
58 
62 
66 
69 
70  // Locking
72  static TOOL_ACTION lock;
74 
75  // Schematic Tools
104 
105  // Symbol Tools
114 
115  // Editing
146 
153 
155  static TOOL_ACTION cut;
158 
159  // Miscellaneous
176 
177  // SPICE
180 
181  // Net highlighting
186 
188  virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override;
189 };
190 
191 
192 //
193 // For LibEdit
194 //
195 inline VECTOR2I mapCoords( const wxPoint& aCoord )
196 {
197  return VECTOR2I( aCoord.x, -aCoord.y );
198 }
199 
200 inline wxPoint mapCoords( const VECTOR2I& aCoord )
201 {
202  return wxPoint( aCoord.x, -aCoord.y );
203 }
204 
205 inline wxPoint mapCoords( const int x, const int y )
206 {
207  return wxPoint( x, -y );
208 }
209 
210 
211 
212 
213 #endif
static TOOL_ACTION pinTable
Definition: ee_actions.h:166
static TOOL_ACTION properties
Definition: ee_actions.h:124
static TOOL_ACTION showDatasheet
Inspection.
Definition: ee_actions.h:148
static TOOL_ACTION placeSymbolText
Definition: ee_actions.h:107
static TOOL_ACTION drawSymbolLines
Definition: ee_actions.h:111
static TOOL_ACTION deleteItemCursor
Definition: ee_actions.h:167
static TOOL_ACTION navigateHierarchy
Definition: ee_actions.h:162
static TOOL_ACTION finishSheet
Definition: ee_actions.h:103
static TOOL_ACTION addHierLabel
Definition: ee_actions.h:135
static TOOL_ACTION breakBus
Definition: ee_actions.h:143
static TOOL_ACTION duplicate
Definition: ee_actions.h:118
char g_lastBusEntryShape
Definition: ee_actions.cpp:29
static TOOL_ACTION paste
Definition: ee_actions.h:157
static TOOL_ACTION toShapeBackslash
Definition: ee_actions.h:137
static TOOL_ACTION addItemsToSel
Selects a list of items (specified as the event parameter)
Definition: ee_actions.h:64
static TOOL_ACTION pointEditorAddCorner
Definition: ee_actions.h:144
static TOOL_ACTION mirrorY
Definition: ee_actions.h:123
static TOOL_ACTION placeJunction
Definition: ee_actions.h:86
static TOOL_ACTION selectConnection
If current selection is a wire or bus, expand to entire connection.
Definition: ee_actions.h:54
static TOOL_ACTION unlock
Definition: ee_actions.h:73
static TOOL_ACTION unfoldBus
Definition: ee_actions.h:84
static TOOL_ACTION finishLineWireOrBus
Definition: ee_actions.h:99
static TOOL_ACTION refreshPreview
Definition: ee_actions.h:168
static TOOL_ACTION toText
Definition: ee_actions.h:141
static TOOL_ACTION autoplaceFields
Definition: ee_actions.h:128
static TOOL_ACTION placeBusBusEntry
Definition: ee_actions.h:88
static TOOL_ACTION placeBusWireEntry
Definition: ee_actions.h:87
static TOOL_ACTION showComponentTree
Definition: ee_actions.h:174
static TOOL_ACTION removeItemsFromSel
Definition: ee_actions.h:65
VECTOR2< int > VECTOR2I
Definition: vector2d.h:587
static TOOL_ACTION convertDeMorgan
Definition: ee_actions.h:129
static TOOL_ACTION updateNetHighlighting
Definition: ee_actions.h:184
static TOOL_ACTION pushPinNameSize
Definition: ee_actions.h:171
static TOOL_ACTION editSymbolUnit
Definition: ee_actions.h:130
static TOOL_ACTION breakWire
Definition: ee_actions.h:142
static TOOL_ACTION rotateCW
Definition: ee_actions.h:120
static TOOL_ACTION finishLine
Definition: ee_actions.h:102
static TOOL_ACTION drawSymbolRectangle
Definition: ee_actions.h:108
static TOOL_ACTION leaveSheet
Definition: ee_actions.h:161
static TOOL_ACTION removeItemFromSel
Definition: ee_actions.h:61
static TOOL_ACTION showMarkerInfo
Definition: ee_actions.h:149
static TOOL_ACTION drawSheet
Definition: ee_actions.h:92
Class TOOL_MANAGER.
Definition: tool_manager.h:49
static TOOL_ACTION cleanupSheetPins
Definition: ee_actions.h:163
static TOOL_ACTION rotateCCW
Definition: ee_actions.h:121
static TOOL_ACTION placeSymbolPin
Definition: ee_actions.h:106
static TOOL_ACTION editFootprint
Definition: ee_actions.h:127
static TOOL_ACTION placePower
Definition: ee_actions.h:79
static TOOL_ACTION addItemToSel
Selects an item (specified as the event parameter).
Definition: ee_actions.h:60
static TOOL_ACTION pointEditorRemoveCorner
Definition: ee_actions.h:145
static TOOL_ACTION startLines
Definition: ee_actions.h:96
static TOOL_ACTION toggleLock
Definition: ee_actions.h:71
static TOOL_ACTION drawWire
Definition: ee_actions.h:81
static TOOL_ACTION simTune
Definition: ee_actions.h:179
static TOOL_ACTION placeSheetPin
Definition: ee_actions.h:93
static TOOL_ACTION explicitCrossProbe
Definition: ee_actions.h:169
static TOOL_ACTION placeSchematicText
Definition: ee_actions.h:95
static TOOL_ACTION symbolProperties
Definition: ee_actions.h:165
Class TOOL_EVENT.
Definition: tool_event.h:167
static TOOL_ACTION placeImage
Definition: ee_actions.h:98
static TOOL_ACTION repeatDrawItem
Definition: ee_actions.h:119
static TOOL_ACTION drawSymbolCircle
Definition: ee_actions.h:109
static TOOL_ACTION addJunction
Definition: ee_actions.h:132
static TOOL_ACTION pushPinLength
Definition: ee_actions.h:170
static TOOL_ACTION mirrorX
Definition: ee_actions.h:122
static TOOL_ACTION doDelete
Definition: ee_actions.h:131
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition: ee_actions.h:47
static TOOL_ACTION importSheetPin
Definition: ee_actions.h:94
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:57
static TOOL_ACTION placeSymbol
Definition: ee_actions.h:78
static TOOL_ACTION finishDrawing
Definition: ee_actions.h:113
static TOOL_ACTION lock
Definition: ee_actions.h:72
static TOOL_ACTION placeHierarchicalLabel
Definition: ee_actions.h:91
static TOOL_ACTION showElectricalTypes
Definition: ee_actions.h:173
static TOOL_ACTION highlightNetCursor
Definition: ee_actions.h:185
Class EESCHEMA_ACTIONS.
Definition: ee_actions.h:42
static TOOL_ACTION drawBus
Definition: ee_actions.h:83
static TOOL_ACTION placeLabel
Definition: ee_actions.h:89
static TOOL_ACTION editValue
Definition: ee_actions.h:126
static TOOL_ACTION showLibraryBrowser
Definition: ee_actions.h:152
virtual OPT< TOOL_EVENT > TranslateLegacyId(int aId) override
Definition: ee_actions.cpp:32
static TOOL_ACTION showSymbolEditor
Definition: ee_actions.h:150
static TOOL_ACTION toggleHiddenPins
Definition: ee_actions.h:164
static TOOL_ACTION drag
Definition: ee_actions.h:117
static TOOL_ACTION selectionMenu
Runs a selection menu to select from a list of items.
Definition: ee_actions.h:68
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION placeNoConnect
Definition: ee_actions.h:85
static TOOL_ACTION selectNode
Select the junction, wire or bus segment under the cursor.
Definition: ee_actions.h:50
static TOOL_ACTION pickerTool
Definition: ee_actions.h:77
static TOOL_ACTION startWire
Definition: ee_actions.h:80
static TOOL_ACTION drawSymbolArc
Definition: ee_actions.h:110
static TOOL_ACTION enterSheet
Definition: ee_actions.h:160
boost::optional< T > OPT
Definition: optional.h:7
static TOOL_ACTION clearHighlight
Definition: ee_actions.h:183
static TOOL_ACTION pushPinNumSize
Definition: ee_actions.h:172
static TOOL_ACTION startBus
Definition: ee_actions.h:82
Class ACTIONS.
Definition: actions.h:41
static TOOL_ACTION addLabel
Definition: ee_actions.h:133
static TOOL_ACTION move
Definition: ee_actions.h:116
static TOOL_ACTION simProbe
Definition: ee_actions.h:178
static TOOL_ACTION toLabel
Definition: ee_actions.h:138
static TOOL_ACTION drawLines
Definition: ee_actions.h:97
static TOOL_ACTION highlightNet
Definition: ee_actions.h:182
static TOOL_ACTION toHLabel
Definition: ee_actions.h:139
static TOOL_ACTION addGlobalLabel
Definition: ee_actions.h:134
static TOOL_ACTION selectionTool
Definition: ee_actions.h:76
static TOOL_ACTION editReference
Definition: ee_actions.h:125
static TOOL_ACTION copy
Definition: ee_actions.h:156
static TOOL_ACTION placeGlobalLabel
Definition: ee_actions.h:90
static TOOL_ACTION cut
Clipboard.
Definition: ee_actions.h:155
static TOOL_ACTION finishBus
Definition: ee_actions.h:101
static TOOL_ACTION toggleForceHV
Definition: ee_actions.h:175
static TOOL_ACTION toGLabel
Definition: ee_actions.h:140
static TOOL_ACTION editWithSymbolEditor
Definition: ee_actions.h:151
static TOOL_ACTION finishWire
Definition: ee_actions.h:100
static TOOL_ACTION placeSymbolAnchor
Definition: ee_actions.h:112
static TOOL_ACTION toShapeSlash
Definition: ee_actions.h:136
VECTOR2I mapCoords(const wxPoint &aCoord)
Definition: ee_actions.h:195