KiCad PCB EDA Suite
actions.cpp
Go to the documentation of this file.
1 #include <tool/actions.h>
2 #include <hotkeys.h>
3 #include <bitmaps.h>
4 
5 // These members are static in class ACTIONS: Build them here:
6 
7 // Generic Actions
8 TOOL_ACTION ACTIONS::cancelInteractive( "common.Interactive.cancel",
9  AS_GLOBAL, 0, // ESC key is handled in the dispatcher
10  _( "Cancel" ), _( "Cancel current tool" ),
11  cancel_xpm, AF_NONE );
12 
13 // View Controls
14 TOOL_ACTION ACTIONS::zoomIn( "common.Control.zoomIn",
16  _( "Zoom In" ), "", zoom_in_xpm );
17 
18 TOOL_ACTION ACTIONS::zoomOut( "common.Control.zoomOut",
20  _( "Zoom Out" ), "", zoom_out_xpm );
21 
22 TOOL_ACTION ACTIONS::zoomInCenter( "common.Control.zoomInCenter",
23  AS_GLOBAL, 0,
24  "", "" );
25 
26 TOOL_ACTION ACTIONS::zoomOutCenter( "common.Control.zoomOutCenter",
27  AS_GLOBAL, 0,
28  "", "" );
29 
30 TOOL_ACTION ACTIONS::zoomCenter( "common.Control.zoomCenter",
32  _( "Center" ), "", zoom_center_on_screen_xpm );
33 
34 TOOL_ACTION ACTIONS::zoomFitScreen( "common.Control.zoomFitScreen",
36  _( "Zoom Auto" ), "", zoom_fit_in_page_xpm );
37 
38 TOOL_ACTION ACTIONS::zoomTool( "common.Control.zoomTool",
40  _( "Zoom to Selection" ), "", NULL, AF_ACTIVATE );
41 
42 TOOL_ACTION ACTIONS::zoomPreset( "common.Control.zoomPreset",
43  AS_GLOBAL, 0,
44  "", "" );
45 
46 TOOL_ACTION ACTIONS::centerContents( "common.Control.centerContents",
47  AS_GLOBAL, 0,
48  "", "" );
49 
50 // Cursor control
51 TOOL_ACTION ACTIONS::cursorUp( "common.Control.cursorUp",
52  AS_GLOBAL, WXK_UP,
53  "", "", NULL, AF_NONE, (void*) CURSOR_UP );
54 
55 TOOL_ACTION ACTIONS::cursorDown( "common.Control.cursorDown",
56  AS_GLOBAL, WXK_DOWN,
57  "", "" , NULL, AF_NONE, (void*) CURSOR_DOWN );
58 
59 TOOL_ACTION ACTIONS::cursorLeft( "common.Control.cursorLeft",
60  AS_GLOBAL, WXK_LEFT,
61  "", "" , NULL, AF_NONE, (void*) CURSOR_LEFT );
62 
63 TOOL_ACTION ACTIONS::cursorRight( "common.Control.cursorRight",
64  AS_GLOBAL, WXK_RIGHT,
65  "", "" , NULL, AF_NONE, (void*) CURSOR_RIGHT );
66 
67 
68 TOOL_ACTION ACTIONS::cursorUpFast( "common.Control.cursorUpFast",
69  AS_GLOBAL, MD_CTRL + WXK_UP,
70  "", "", NULL, AF_NONE, (void*) ( CURSOR_UP | CURSOR_FAST_MOVE ) );
71 
72 TOOL_ACTION ACTIONS::cursorDownFast( "common.Control.cursorDownFast",
73  AS_GLOBAL, MD_CTRL + WXK_DOWN,
74  "", "" , NULL, AF_NONE, (void*) ( CURSOR_DOWN | CURSOR_FAST_MOVE ) );
75 
76 TOOL_ACTION ACTIONS::cursorLeftFast( "common.Control.cursorLeftFast",
77  AS_GLOBAL, MD_CTRL + WXK_LEFT,
78  "", "" , NULL, AF_NONE, (void*) ( CURSOR_LEFT | CURSOR_FAST_MOVE ) );
79 
80 TOOL_ACTION ACTIONS::cursorRightFast( "common.Control.cursorRightFast",
81  AS_GLOBAL, MD_CTRL + WXK_RIGHT,
82  "", "" , NULL, AF_NONE, (void*) ( CURSOR_RIGHT | CURSOR_FAST_MOVE ) );
83 
84 
85 TOOL_ACTION ACTIONS::cursorClick( "common.Control.cursorClick",
87  "", "", NULL, AF_NONE, (void*) CURSOR_CLICK );
88 
89 TOOL_ACTION ACTIONS::cursorDblClick( "common.Control.cursorDblClick",
91  "", "", NULL, AF_NONE, (void*) CURSOR_DBL_CLICK );
92 
93 
94 TOOL_ACTION ACTIONS::panUp( "common.Control.panUp",
95  AS_GLOBAL, MD_SHIFT + WXK_UP,
96  "", "", NULL, AF_NONE, (void*) CURSOR_UP );
97 
98 TOOL_ACTION ACTIONS::panDown( "common.Control.panDown",
99  AS_GLOBAL, MD_SHIFT + WXK_DOWN,
100  "", "" , NULL, AF_NONE, (void*) CURSOR_DOWN );
101 
102 TOOL_ACTION ACTIONS::panLeft( "common.Control.panLeft",
103  AS_GLOBAL, MD_SHIFT + WXK_LEFT,
104  "", "" , NULL, AF_NONE, (void*) CURSOR_LEFT );
105 
106 TOOL_ACTION ACTIONS::panRight( "common.Control.panRight",
107  AS_GLOBAL, MD_SHIFT + WXK_RIGHT,
108  "", "" , NULL, AF_NONE, (void*) CURSOR_RIGHT );
109 
110 // Grid control
111 TOOL_ACTION ACTIONS::gridFast1( "common.Control.gridFast1",
113  "", "" );
114 
115 TOOL_ACTION ACTIONS::gridFast2( "common.Control.gridFast2",
117  "", "" );
118 
119 TOOL_ACTION ACTIONS::gridNext( "common.Control.gridNext",
121  "", "" );
122 
123 TOOL_ACTION ACTIONS::gridPrev( "common.Control.gridPrev",
125  "", "" );
126 
127 TOOL_ACTION ACTIONS::gridSetOrigin( "common.Control.gridSetOrigin",
129  "", "" );
130 
131 TOOL_ACTION ACTIONS::gridResetOrigin( "common.Control.gridResetOrigin",
133  "", "" );
134 
135 TOOL_ACTION ACTIONS::gridPreset( "common.Control.gridPreset",
136  AS_GLOBAL, 0,
137  "", "" );
static TOOL_ACTION zoomPreset
Definition: actions.h:57
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
static TOOL_ACTION zoomTool
Definition: actions.h:58
static TOOL_ACTION gridResetOrigin
Definition: actions.h:87
static TOOL_ACTION cancelInteractive
Definition: actions.h:45
static TOOL_ACTION cursorRight
Definition: actions.h:65
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION cursorRightFast
Definition: actions.h:70
static int LegacyHotKey(int aHotKey)
Creates a hot key code that refers to a legacy hot key setting, instead of a particular key...
Definition: tool_action.h:174
static TOOL_ACTION gridFast1
Definition: actions.h:82
static TOOL_ACTION panLeft
Definition: actions.h:78
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
Pcbnew hotkeys.
static TOOL_ACTION centerContents
Definition: actions.h:59
static TOOL_ACTION gridFast2
Definition: actions.h:83
static TOOL_ACTION gridPreset
Definition: actions.h:88
static TOOL_ACTION gridPrev
Definition: actions.h:85
static TOOL_ACTION panDown
Definition: actions.h:77
static TOOL_ACTION cursorUpFast
Definition: actions.h:67
static TOOL_ACTION cursorDownFast
Definition: actions.h:68
static TOOL_ACTION cursorLeft
Definition: actions.h:64
static TOOL_ACTION panRight
Definition: actions.h:79
static TOOL_ACTION cursorLeftFast
Definition: actions.h:69
All active tools
Definition: tool_event.h:144
static TOOL_ACTION zoomCenter
Definition: actions.h:55
static TOOL_ACTION cursorUp
Cursor control with keyboard.
Definition: actions.h:62
static TOOL_ACTION cursorDblClick
Definition: actions.h:73
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION gridNext
Definition: actions.h:84
static TOOL_ACTION panUp
Definition: actions.h:76
static TOOL_ACTION zoomIn
Definition: actions.h:51
static TOOL_ACTION zoomOut
Definition: actions.h:52
static TOOL_ACTION gridSetOrigin
Definition: actions.h:86
static TOOL_ACTION cursorDown
Definition: actions.h:63
static TOOL_ACTION cursorClick
Definition: actions.h:72