KiCad PCB EDA Suite
cvpcb_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 <[email protected]>
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 <bitmaps.h>
22 
23 #include <cvpcb_mainframe.h>
24 #include <listboxes.h>
25 #include <tools/cvpcb_actions.h>
26 
27 // Actions, being statically-defined, require specialized I18N handling. We continue to
28 // use the _() macro so that string harvesting by the I18N framework doesn't have to be
29 // specialized, but we don't translate on initialization and instead do it in the getters.
30 
31 #undef _
32 #define _(s) s
33 
34 
35 // Selection tool action for the footprint viewer window
36 TOOL_ACTION CVPCB_ACTIONS::selectionActivate( "cvpcb.FootprintViewerInteractiveSelection",
37  AS_GLOBAL, 0, "",
38  "",
39  "", // No description, it is not supposed to be shown anywhere
41 
43  AS_GLOBAL, 0, "",
44  "",
45  "", // No description, it is not supposed to be shown anywhere
47 
48 
49 // Action to show the footprint viewer window
50 TOOL_ACTION CVPCB_ACTIONS::showFootprintViewer( "cvpcb.Control.ShowFootprintViewer",
51  AS_GLOBAL, 0, "",
52  _( "View selected footprint" ),
53  _( "View the selected footprint in the footprint viewer" ),
55 
56 
57 // Actions to handle management tasks
58 TOOL_ACTION CVPCB_ACTIONS::showEquFileTable( "cvpcb.Control.ShowEquFileTable",
59  AS_GLOBAL, 0, "",
60  _( "Manage Footprint Association Files" ),
61  _( "Configure footprint association file (.equ) list. These files are "
62  "used to automatically assign footprint names from symbol values." ) );
63 
64 TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToSchematic( "cvpcb.Control.SaveAssociationsToSchematic",
65  AS_GLOBAL,
66  MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
67  _( "Save to Schematic" ),
68  _( "Save footprint associations in schematic symbol footprint fields" ),
69  BITMAPS::save );
70 
71 TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToFile( "cvpcb.Control.SaveAssociationsToFile",
72  AS_GLOBAL,
73  MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
74  _( "Save to Schematic and File" ),
75  _( "Save footprint associations in schematic symbol footprint fields and schematic files" ),
76  BITMAPS::save );
77 
78 // Actions to navigate the display
79 TOOL_ACTION CVPCB_ACTIONS::changeFocusRight( "cvpcb.Control.changeFocusRight",
80  AS_GLOBAL,
81  WXK_TAB, "",
82  "",
83  "",
86 
87 TOOL_ACTION CVPCB_ACTIONS::changeFocusLeft( "cvpcb.Control.changeFocusLeft",
88  AS_GLOBAL,
89  MD_SHIFT + WXK_TAB, "",
90  "",
91  "",
94 
95 // Actions to navigate the component list
96 TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( "cvpcb.Control.GotoNextNA",
97  AS_GLOBAL, 0, "",
98  _( "Select next unassigned symbol" ),
99  _( "Select next symbol with no footprint assignment" ),
101  (void*) CVPCB_MAINFRAME::ITEM_NEXT );
102 
103 TOOL_ACTION CVPCB_ACTIONS::gotoPreviousNA( "cvpcb.Control.GotoPreviousNA",
104  AS_GLOBAL, 0, "",
105  _( "Select previous unassigned symbol" ),
106  _( "Select previous symbol with no footprint assignment" ),
108  (void*) CVPCB_MAINFRAME::ITEM_PREV );
109 
110 
111 // Actions to modify component associations
112 TOOL_ACTION CVPCB_ACTIONS::associate( "cvpcb.Association.Associate",
113  AS_GLOBAL,
114  WXK_RETURN, "",
115  _( "Assign footprint" ),
116  _( "Assign footprint to selected symbols" ),
118 
119 TOOL_ACTION CVPCB_ACTIONS::autoAssociate( "cvpcb.Association.AutoAssociate",
120  AS_GLOBAL, 0, "",
121  _( "Automatically assign footprints" ),
122  _( "Perform automatic footprint assignment" ),
124 
125 TOOL_ACTION CVPCB_ACTIONS::deleteAssoc( "cvpcb.Association.Delete",
126  AS_GLOBAL,
127  WXK_DELETE, "",
128  _( "Delete association" ),
129  _( "Delete selected footprint associations" ),
131 
132 TOOL_ACTION CVPCB_ACTIONS::deleteAll( "cvpcb.Association.DeleteAll",
133  AS_GLOBAL, 0, "",
134  _( "Delete all footprint associations" ),
135  _( "Delete all footprint associations" ),
137 
138 
139 // Actions to filter the footprint list
140 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( "cvpcb.Control.FilterFPbyFPFilters",
141  AS_GLOBAL, 0, "",
142  _( "Use symbol footprint filters" ),
143  _( "Filter footprint list by footprint filters defined in the symbol" ),
146 
147 TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( "cvpcb.Control.FilterFPByPin",
148  AS_GLOBAL, 0, "",
149  _( "Filter by pin count" ),
150  _( "Filter footprint list by pin count" ),
153 
154 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyLibrary( "cvpcb.Control.FilterFPbyLibrary",
155  AS_GLOBAL, 0, "",
156  _( "Filter by library" ),
157  _( "Filter footprint list by library" ),
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
Definition: cvpcb_actions.h:49
static TOOL_ACTION saveAssociationsToSchematic
Management actions.
Definition: cvpcb_actions.h:56
static TOOL_ACTION FilterFPbyFPFilters
Footprint Filtering actions.
Definition: cvpcb_actions.h:67
static TOOL_ACTION showEquFileTable
Definition: cvpcb_actions.h:58
#define LEGACY_HK_NAME(x)
Definition: actions.h:32
static TOOL_ACTION gotoNextNA
Definition: cvpcb_actions.h:53
static TOOL_ACTION saveAssociationsToFile
Definition: cvpcb_actions.h:57
static TOOL_ACTION gotoPreviousNA
Navigate the component tree.
Definition: cvpcb_actions.h:52
static TOOL_ACTION selectionActivate
Activation actions.
Definition: cvpcb_actions.h:41
static TOOL_ACTION changeFocusLeft
Definition: cvpcb_actions.h:46
static TOOL_ACTION changeFocusRight
Window control actions.
Definition: cvpcb_actions.h:45
#define _(s)
static TOOL_ACTION FilterFPbyLibrary
Definition: cvpcb_actions.h:69
static TOOL_ACTION deleteAll
Definition: cvpcb_actions.h:63
Action activates a tool.
Definition: tool_action.h:52
static TOOL_ACTION deleteAssoc
Definition: cvpcb_actions.h:64
static TOOL_ACTION autoAssociate
Footprint Association actions.
Definition: cvpcb_actions.h:61
static TOOL_ACTION filterFPbyPin
Definition: cvpcb_actions.h:68
static TOOL_ACTION controlActivate
Definition: cvpcb_actions.h:42
Represent a single user action.
Definition: tool_action.h:67
static TOOL_ACTION associate
Definition: cvpcb_actions.h:62