KiCad PCB EDA Suite
3d_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) 2017 Jon Evans <jon@craftyjon.com>
5  * Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #include <tool/tool_manager.h>
22 #include <bitmaps.h>
23 #include "3d_actions.h"
24 
25 
26 // Actions, being statically-defined, require specialized I18N handling. We continue to
27 // use the _() macro so that string harvesting by the I18N framework doesn't have to be
28 // specialized, but we don't translate on initialization and instead do it in the getters.
29 
30 #undef _
31 #define _(s) s
32 
33 
34 TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( "3DViewer.Control.pivotCenter",
35  AS_GLOBAL,
36  ' ', "",
37  "Center pivot rotation (Middle mouse click)" );
38 
39 TOOL_ACTION EDA_3D_ACTIONS::moveLeft( "3DViewer.Control.moveLeft",
40  AS_GLOBAL,
41  WXK_LEFT, "",
42  "Move board Left" );
43 
44 TOOL_ACTION EDA_3D_ACTIONS::moveRight( "3DViewer.Control.moveRight",
45  AS_GLOBAL,
46  WXK_RIGHT, "",
47  "Move board Right" );
48 
49 TOOL_ACTION EDA_3D_ACTIONS::moveUp( "3DViewer.Control.moveUp",
50  AS_GLOBAL,
51  WXK_UP, "",
52  "Move board Up" );
53 
54 TOOL_ACTION EDA_3D_ACTIONS::moveDown( "3DViewer.Control.moveDown",
55  AS_GLOBAL,
56  WXK_DOWN, "",
57  "Move board Down" );
58 
59 TOOL_ACTION EDA_3D_ACTIONS::homeView( "3DViewer.Control.homeView",
60  AS_GLOBAL,
61  WXK_HOME, "",
62  "Home view" );
63 
64 TOOL_ACTION EDA_3D_ACTIONS::resetView( "3DViewer.Control.resetView",
65  AS_GLOBAL,
66  'R', "",
67  "Reset view" );
68 
69 TOOL_ACTION EDA_3D_ACTIONS::viewFront( "3DViewer.Control.viewFront",
70  AS_GLOBAL,
71  'Y', "",
72  "View Front" );
73 
74 TOOL_ACTION EDA_3D_ACTIONS::viewBack( "3DViewer.Control.viewBack",
75  AS_GLOBAL,
76  MD_SHIFT + 'Y', "",
77  "View Back" );
78 
79 TOOL_ACTION EDA_3D_ACTIONS::viewLeft( "3DViewer.Control.viewLeft",
80  AS_GLOBAL,
81  MD_SHIFT + 'X', "",
82  "View Left" );
83 
84 TOOL_ACTION EDA_3D_ACTIONS::viewRight( "3DViewer.Control.viewRight",
85  AS_GLOBAL,
86  'X', "",
87  "View Right" );
88 
89 TOOL_ACTION EDA_3D_ACTIONS::viewTop( "3DViewer.Control.viewTop",
90  AS_GLOBAL,
91  'Z', "",
92  "View Top" );
93 
94 TOOL_ACTION EDA_3D_ACTIONS::viewBottom( "3DViewer.Control.viewBottom",
95  AS_GLOBAL,
96  MD_SHIFT + 'Z', "",
97  "View Bottom" );
98 
99 TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
100  AS_GLOBAL,
101  WXK_TAB, "",
102  "Rotate 45 degrees over Z axis" );
103 
104 TOOL_ACTION EDA_3D_ACTIONS::zoomIn( "3DViewer.Control.zoomIn",
105  AS_GLOBAL,
106  WXK_F1, "",
107  "Zoom in " );
108 
109 TOOL_ACTION EDA_3D_ACTIONS::zoomOut( "3DViewer.Control.zoomOut",
110  AS_GLOBAL,
111  WXK_F2, "",
112  "Zoom out" );
113 
114 TOOL_ACTION EDA_3D_ACTIONS::attributesTHT( "3DViewer.Control.attributesTHT",
115  AS_GLOBAL,
116  'T', "",
117  "Toggle 3D models with type Through Hole" );
118 
119 TOOL_ACTION EDA_3D_ACTIONS::attributesSMD( "3DViewer.Control.attributesSMD",
120  AS_GLOBAL,
121  'S', "",
122  "Toggle 3D models with type Surface Mount" );
123 
124 TOOL_ACTION EDA_3D_ACTIONS::attributesVirtual( "3DViewer.Control.attributesVirtual",
125  AS_GLOBAL,
126  'V', "",
127  "Toggle 3D models with type Virtual" );
128 
129 
static TOOL_ACTION homeView
Definition: 3d_actions.h:49
static TOOL_ACTION pivotCenter
Definition: 3d_actions.h:44
static TOOL_ACTION zoomIn
Definition: 3d_actions.h:60
static TOOL_ACTION attributesVirtual
Definition: 3d_actions.h:64
static TOOL_ACTION resetView
Definition: 3d_actions.h:50
static TOOL_ACTION viewRight
Definition: 3d_actions.h:55
static TOOL_ACTION viewLeft
Definition: 3d_actions.h:54
static TOOL_ACTION zoomOut
Definition: 3d_actions.h:61
static TOOL_ACTION rotate45axisZ
Definition: 3d_actions.h:59
static TOOL_ACTION moveLeft
Definition: 3d_actions.h:45
static TOOL_ACTION viewBottom
Definition: 3d_actions.h:57
All active tools
Definition: tool_event.h:147
static TOOL_ACTION viewTop
Definition: 3d_actions.h:56
static TOOL_ACTION viewBack
Definition: 3d_actions.h:53
static TOOL_ACTION attributesSMD
Definition: 3d_actions.h:63
static TOOL_ACTION moveDown
Definition: 3d_actions.h:48
static TOOL_ACTION attributesTHT
Definition: 3d_actions.h:62
static TOOL_ACTION viewFront
Definition: 3d_actions.h:52
TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION moveUp
Definition: 3d_actions.h:47
static TOOL_ACTION moveRight
Definition: 3d_actions.h:46