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.FootprintViewerInteractiveSelection",
37  AS_GLOBAL, 0, "",
38  "",
39  "",
40  NULL, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
41 
43  AS_GLOBAL, 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",
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." ),
64 
65 TOOL_ACTION CVPCB_ACTIONS::saveAssociations( "cvpcb.Control.SaveAssocations",
66  AS_GLOBAL,
67  MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
68  _( "Save to Schematic" ),
69  _( "Save footprint associations in schematic symbol footprint fields" ),
70  save_xpm );
71 
72 // Actions to navigate the display
73 TOOL_ACTION CVPCB_ACTIONS::changeFocusRight( "cvpcb.Control.changeFocusRight",
74  AS_GLOBAL,
75  WXK_TAB, "",
76  "",
77  "",
78  nullptr, AF_NONE,
80 
81 TOOL_ACTION CVPCB_ACTIONS::changeFocusLeft( "cvpcb.Control.changeFocusLeft",
82  AS_GLOBAL,
83  MD_SHIFT + WXK_TAB, "",
84  "",
85  "",
86  nullptr, AF_NONE,
88 
89 // Actions to navigate the component list
90 TOOL_ACTION CVPCB_ACTIONS::gotoNextNA( "cvpcb.Control.GotoNextNA",
91  AS_GLOBAL, 0, "",
92  _( "Select next unassociated symbol" ),
93  _( "Select next unassociated symbol" ),
96 
97 TOOL_ACTION CVPCB_ACTIONS::gotoPreviousNA( "cvpcb.Control.GotoPreviousNA",
98  AS_GLOBAL, 0, "",
99  _( "Select previous unassociated symbol" ),
100  _( "Select previous unassociated symbol" ),
101  left_xpm, AF_NONE,
102  (void*) CVPCB_MAINFRAME::ITEM_PREV );
103 
104 
105 // Actions to modify component associations
106 TOOL_ACTION CVPCB_ACTIONS::associate( "cvpcb.Association.Associate",
107  AS_GLOBAL,
108  WXK_RETURN, "",
109  _( "Associate footprint" ),
110  _( "Associate selected footprint with selected components" ),
112 
113 TOOL_ACTION CVPCB_ACTIONS::autoAssociate( "cvpcb.Association.AutoAssociate",
114  AS_GLOBAL, 0, "",
115  _( "Automatically associate footprints" ),
116  _( "Perform automatic footprint association" ),
118 
119 TOOL_ACTION CVPCB_ACTIONS::deleteAssoc( "cvpcb.Association.Delete",
120  AS_GLOBAL,
121  WXK_DELETE, "",
122  _( "Delete association" ),
123  _( "Delete selected footprint associations" ),
125 
126 TOOL_ACTION CVPCB_ACTIONS::deleteAll( "cvpcb.Association.DeleteAll",
127  AS_GLOBAL, 0, "",
128  _( "Delete all footprint associations" ),
129  _( "Delete all footprint associations" ),
131 
132 
133 // Actions to filter the footprint list
134 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyFPFilters( "cvpcb.Control.FilterFPbyFPFilters",
135  AS_GLOBAL, 0, "",
136  _( "Use symbol footprint filters" ),
137  _( "Filter footprint list by footprint filters defined in the symbol" ),
140 
141 TOOL_ACTION CVPCB_ACTIONS::filterFPbyPin( "cvpcb.Control.FilterFPByPin",
142  AS_GLOBAL, 0, "",
143  _( "Filter by pin count" ),
144  _( "Filter footprint list by pin count" ),
147 
148 TOOL_ACTION CVPCB_ACTIONS::FilterFPbyLibrary( "cvpcb.Control.FilterFPbyLibrary",
149  AS_GLOBAL, 0, "",
150  _( "Filter by library" ),
151  _( "Filter footprint list by library" ),
154 
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
Definition: cvpcb_actions.h:52
const BITMAP_OPAQUE right_xpm[1]
Definition: right.cpp:49
const BITMAP_OPAQUE auto_associe_xpm[1]
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
const BITMAP_OPAQUE left_xpm[1]
Definition: left.cpp:48
static TOOL_ACTION changeFocusLeft
Definition: cvpcb_actions.h:49
static TOOL_ACTION changeFocusRight
Window control actions.
Definition: cvpcb_actions.h:48
#define _(s)
const BITMAP_OPAQUE library_table_xpm[1]
static TOOL_ACTION FilterFPbyLibrary
Definition: cvpcb_actions.h:71
const BITMAP_OPAQUE show_footprint_xpm[1]
static TOOL_ACTION deleteAll
Definition: cvpcb_actions.h:65
#define NULL
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
const BITMAP_OPAQUE module_library_list_xpm[1]
static TOOL_ACTION filterFPbyPin
Definition: cvpcb_actions.h:70
const BITMAP_OPAQUE module_pin_filtered_list_xpm[1]
static TOOL_ACTION controlActivate
Definition: cvpcb_actions.h:45
TOOL_ACTION.
Definition: tool_action.h:46
const BITMAP_OPAQUE delete_association_xpm[1]
const BITMAP_OPAQUE save_xpm[1]
Definition: save.cpp:69
static TOOL_ACTION associate
Definition: cvpcb_actions.h:64
const BITMAP_OPAQUE module_filtered_list_xpm[1]