KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 * Copyright (C) 2023 CERN
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#include "tool/tool_action.h"
23#include <bitmaps.h>
24
25#include <cvpcb_mainframe.h>
26#include <listboxes.h>
27#include <tools/cvpcb_actions.h>
28
29// Actions, being statically-defined, require specialized I18N handling. We continue to
30// use the _() macro so that string harvesting by the I18N framework doesn't have to be
31// specialized, but we don't translate on initialization and instead do it in the getters.
32
33#undef _
34#define _(s) s
35
36
37// Selection tool action for the footprint viewer window
38// No description, it is not supposed to be shown anywhere
40 .Name( "cvpcb.FootprintViewerInteractiveSelection" )
41 .Scope( AS_GLOBAL )
42 .Flags( AF_ACTIVATE ) );
43
44// No description, it is not supposed to be shown anywhere
46 .Name( "cvpcb.Control" )
47 .Scope( AS_GLOBAL )
48 .Flags( AF_ACTIVATE ) );
49
50
51// Action to show the footprint viewer window
53 .Name( "cvpcb.Control.ShowFootprintViewer" )
54 .Scope( AS_GLOBAL )
55 .FriendlyName( _( "View Selected Footprint" ) )
56 .Icon( BITMAPS::show_footprint ) );
57
58
59// Actions to handle management tasks
61 .Name( "cvpcb.Control.ShowEquFileTable" )
62 .Scope( AS_GLOBAL )
63 .FriendlyName( _( "Manage Footprint Association Files..." ) )
64 .Tooltip( _( "Edit the footprint association files list. These files are used to "
65 "automatically assign footprints based on symbol values." ) ) );
66
68 .Name( "cvpcb.Control.SaveAssociationsToSchematic" )
69 .Scope( AS_GLOBAL )
70 .DefaultHotkey( MD_CTRL + 'S' )
71 .LegacyHotkeyName( "Save" )
72 .FriendlyName( _( "Save to Schematic" ) )
73 .Tooltip( _( "Save footprint assignments in 'footprint' fields of schematic symbols" ) )
74 .Icon( BITMAPS::save ) );
75
77 .Name( "cvpcb.Control.SaveAssociationsToFile" )
78 .Scope( AS_GLOBAL )
79 .DefaultHotkey( MD_CTRL + 'S' )
80 .LegacyHotkeyName( "Save" )
81 .FriendlyName( _( "Save to Schematic and File" ) )
82 .Tooltip( _( "Save footprint assignments in 'footprint' fields of schematic symbols and then save schematic files" ) )
83 .Icon( BITMAPS::save ) );
84
85// Actions to navigate the display
87 .Name( "cvpcb.Control.changeFocusRight" )
88 .Scope( AS_GLOBAL )
89 .DefaultHotkey( WXK_TAB )
90 .Flags( AF_NONE )
92
94 .Name( "cvpcb.Control.changeFocusLeft" )
95 .Scope( AS_GLOBAL )
96 .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_TAB ) )
97 .Flags( AF_NONE )
99
100// Actions to navigate the component list
102 .Name( "cvpcb.Control.GotoNextNA" )
103 .Scope( AS_GLOBAL )
104 .FriendlyName( _( "Select Next Unassigned Symbol" ) )
105 .Tooltip( _( "Select next symbol with no footprint assignment" ) )
106 .Icon( BITMAPS::right )
107 .Flags( AF_NONE )
108 .Parameter( CVPCB_MAINFRAME::ITEM_NEXT ) );
109
111 .Name( "cvpcb.Control.GotoPreviousNA" )
112 .Scope( AS_GLOBAL )
113 .FriendlyName( _( "Select Previous Unassigned Symbol" ) )
114 .Tooltip( _( "Select previous symbol with no footprint assignment" ) )
115 .Icon( BITMAPS::left )
116 .Flags( AF_NONE )
117 .Parameter( CVPCB_MAINFRAME::ITEM_PREV ) );
118
119
120// Actions to modify component associations
122 .Name( "cvpcb.Association.Associate" )
123 .Scope( AS_GLOBAL )
124 .DefaultHotkey( WXK_RETURN )
125 .FriendlyName( _( "Assign Footprint" ) )
126 .Icon( BITMAPS::auto_associate ) );
127
129 .Name( "cvpcb.Association.AutoAssociate" )
130 .Scope( AS_GLOBAL )
131 .FriendlyName( _( "Automatically Assign Footprints" ) )
132 .Tooltip( _( "Assign footprints automatically using a footprint association file" ) )
133 .Icon( BITMAPS::auto_associate ) );
134
136 .Name( "cvpcb.Association.Delete" )
137 .Scope( AS_GLOBAL )
138 .DefaultHotkey( WXK_DELETE )
139 .FriendlyName( _( "Delete Footprint Assignment" ) )
141
143 .Name( "cvpcb.Association.DeleteAll" )
144 .Scope( AS_GLOBAL )
145 .FriendlyName( _( "Delete All Footprint Assignments" ) )
147
148
149// Actions to filter the footprint list
151 .Name( "cvpcb.Control.FilterFPbyFPFilters" )
152 .Scope( AS_GLOBAL )
153 .FriendlyName( _( "Use symbol footprint filters" ) )
154 .Tooltip( _( "Filter footprint list by footprint filters defined in the symbol" ) )
156 .Flags( AF_NONE )
158
160 .Name( "cvpcb.Control.FilterFPByPin" )
161 .Scope( AS_GLOBAL )
162 .FriendlyName( _( "Filter by pin count" ) )
163 .Tooltip( _( "Filter footprint list by pin count" ) )
165 .Flags( AF_NONE )
167
169 .Name( "cvpcb.Control.FilterFPbyLibrary" )
170 .Scope( AS_GLOBAL )
171 .FriendlyName( _( "Filter by library" ) )
172 .Tooltip( _( "Filter footprint list by library" ) )
174 .Flags( AF_NONE )
@ module_library_list
@ module_filtered_list
@ show_footprint
@ auto_associate
@ module_pin_filtered_list
@ delete_association
static TOOL_ACTION deleteAll
Definition: cvpcb_actions.h:63
static TOOL_ACTION showEquFileTable
Definition: cvpcb_actions.h:58
static TOOL_ACTION gotoPreviousNA
Navigate the component tree.
Definition: cvpcb_actions.h:52
static TOOL_ACTION changeFocusLeft
Definition: cvpcb_actions.h:46
static TOOL_ACTION gotoNextNA
Definition: cvpcb_actions.h:53
static TOOL_ACTION saveAssociationsToFile
Definition: cvpcb_actions.h:57
static TOOL_ACTION FilterFPbyLibrary
Definition: cvpcb_actions.h:69
static TOOL_ACTION filterFPbyPin
Definition: cvpcb_actions.h:68
static TOOL_ACTION deleteAssoc
Definition: cvpcb_actions.h:64
static TOOL_ACTION associate
Definition: cvpcb_actions.h:62
static TOOL_ACTION changeFocusRight
Window control actions.
Definition: cvpcb_actions.h:45
static TOOL_ACTION autoAssociate
Footprint Association actions.
Definition: cvpcb_actions.h:61
static TOOL_ACTION controlActivate
Definition: cvpcb_actions.h:42
static TOOL_ACTION FilterFPbyFPFilters
Footprint Filtering actions.
Definition: cvpcb_actions.h:67
static TOOL_ACTION saveAssociationsToSchematic
Management actions.
Definition: cvpcb_actions.h:56
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
Definition: cvpcb_actions.h:49
static TOOL_ACTION selectionActivate
Activation actions.
Definition: cvpcb_actions.h:41
@ ITEM_NEXT
The next item.
@ ITEM_PREV
The previous item.
@ FILTERING_BY_COMPONENT_FP_FILTERS
Definition: listboxes.h:95
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe.
Definition: tool_action.h:102
Represent a single user action.
Definition: tool_action.h:269
#define _(s)
@ AS_GLOBAL
Global action (toolbar/main menu event, global shortcut)
Definition: tool_action.h:48
@ AF_ACTIVATE
Action activates a tool.
Definition: tool_action.h:55
@ AF_NONE
Definition: tool_action.h:54
@ MD_CTRL
Definition: tool_event.h:143
@ MD_SHIFT
Definition: tool_event.h:142