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 <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 <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.InteractiveSelection", AS_GLOBAL,
37  0, "",
38  "",
39  "",
40  NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
41 
43  0, "",
44  "",
45  "",
46  NULL, AF_ACTIVATE ); // 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", AS_GLOBAL,
51  0, "",
52  _( "View selected footprint" ),
53  _( "View the selected footprint in the footprint viewer" ),
54  show_footprint_xpm );
55 
56 
57 // Actions to handle management tasks
58 TOOL_ACTION CVPCB_ACTIONS::showEquFileTable( "cvpcb.Control.ShowEquFileTable", AS_GLOBAL,
59  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  library_table_xpm );
64 
65 TOOL_ACTION CVPCB_ACTIONS::saveAssociations( "cvpcb.Control.SaveAssocations", AS_GLOBAL,
66  MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
67  _( "Save to Schematic" ),
68  _( "Save footprint associations in schematic symbol footprint fields" ),
69  save_xpm );
70 
71 // Actions to navigate the display
72 TOOL_ACTION CVPCB_ACTIONS::changeFocusRight( "cvpcb.Control.changeFocusRight", AS_GLOBAL,
73  WXK_TAB, "",
74  "",
75  "",
76  nullptr, AF_NONE,
78 
79 TOOL_ACTION CVPCB_ACTIONS::changeFocusLeft( "cvpcb.Control.changeFocusLeft", AS_GLOBAL,
80  MD_SHIFT + WXK_TAB, "",
81  "",
82  "",
83  nullptr, AF_NONE,
85 
86 // Actions to navigate the component list
87 TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( "cvpcb.Control.GotoNextNA", AS_GLOBAL,
88  0, "",
89  _( "Select next unassociated symbol" ),
90  _( "Select next unassociated symbol" ),
91  right_xpm, AF_NONE,
93 
94 TOOL_ACTION CVPCB_ACTIONS::gotoPreviousNA( "cvpcb.Control.GotoPreviousNA", AS_GLOBAL,
95  0, "",
96  _( "Select previous unassociated symbol" ),
97  _( "Select previous unassociated symbol" ),
98  left_xpm, AF_NONE,
100 
101 
102 // Actions to modify component associations
103 TOOL_ACTION CVPCB_ACTIONS::associate( "cvpcb.Association.Associate", AS_GLOBAL,
104  WXK_RETURN, "",
105  _( "Associate footprint" ),
106  _( "Associate selected footprint with selected components" ),
107  auto_associe_xpm );
108 
109 TOOL_ACTION CVPCB_ACTIONS::autoAssociate( "cvpcb.Association.AutoAssociate", AS_GLOBAL,
110  0, "",
111  _( "Automatically associate footprints" ),
112  _( "Perform automatic footprint association" ),
113  auto_associe_xpm );
114 
115 TOOL_ACTION CVPCB_ACTIONS::deleteAssoc( "cvpcb.Association.Delete", AS_GLOBAL,
116  WXK_DELETE, "",
117  _( "Delete association" ),
118  _( "Delete selected footprint associations" ),
119  delete_association_xpm );
120 
121 TOOL_ACTION CVPCB_ACTIONS::deleteAll( "cvpcb.Association.DeleteAll", AS_GLOBAL,
122  0, "",
123  _( "Delete all footprint associations" ),
124  _( "Delete all footprint associations" ),
125  delete_association_xpm );
126 
127 
128 // Actions to filter the footprint list
129 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( "cvpcb.Control.FilterFPbyFPFilters",
130  AS_GLOBAL, 0, "",
131  _( "Use symbol footprint filters" ),
132  _( "Filter footprint list by footprint filters defined in the symbol" ),
133  module_filtered_list_xpm, AF_NONE,
135 
136 TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( "cvpcb.Control.FilterFPByPin",
137  AS_GLOBAL, 0, "",
138  _( "Filter by pin count" ),
139  _( "Filter footprint list by pin count" ),
140  module_pin_filtered_list_xpm, AF_NONE,
142 
143 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyLibrary( "cvpcb.Control.FilterFPbyLibrary",
144  AS_GLOBAL, 0, "",
145  _( "Filter by library" ),
146  _( "Filter footprint list by library" ),
147  module_library_list_xpm, AF_NONE,
149 
150 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyTextPattern( "cvpcb.Control.FilterFPbyTextPattern",
151  AS_GLOBAL, 0, "",
152  _( "Filter by display name" ),
153  _( "Filter footprint list using plain text matching or regular expressions" ),
154  module_name_filtered_list_xpm, AF_NONE,
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
Definition: cvpcb_actions.h:52
static TOOL_ACTION FilterFPbyFPFilters
Footprint Filtering actions.
Definition: cvpcb_actions.h:69
static TOOL_ACTION showEquFileTable
Definition: cvpcb_actions.h:60
#define LEGACY_HK_NAME(x)
Definition: actions.h:35
static TOOL_ACTION gotoNextNA
Definition: cvpcb_actions.h:56
static TOOL_ACTION gotoPreviousNA
Navigate the component tree.
Definition: cvpcb_actions.h:55
static TOOL_ACTION selectionActivate
Activation actions.
Definition: cvpcb_actions.h:44
static TOOL_ACTION changeFocusLeft
Definition: cvpcb_actions.h:49
static TOOL_ACTION changeFocusRight
Window control actions.
Definition: cvpcb_actions.h:48
#define _(s)
static TOOL_ACTION FilterFPbyLibrary
Definition: cvpcb_actions.h:71
static TOOL_ACTION deleteAll
Definition: cvpcb_actions.h:65
static TOOL_ACTION deleteAssoc
Definition: cvpcb_actions.h:66
All active tools
Definition: tool_event.h:147
static TOOL_ACTION saveAssociations
Management actions.
Definition: cvpcb_actions.h:59
static TOOL_ACTION autoAssociate
Footprint Association actions.
Definition: cvpcb_actions.h:63
static TOOL_ACTION FilterFPbyTextPattern
Definition: cvpcb_actions.h:72
static TOOL_ACTION filterFPbyPin
Definition: cvpcb_actions.h:70
static TOOL_ACTION controlActivate
Definition: cvpcb_actions.h:45
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION associate
Definition: cvpcb_actions.h:64