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 .Tooltip( _( "View the selected footprint in the footprint viewer" ) )
57 .Icon( BITMAPS::show_footprint ) );
58
59
60// Actions to handle management tasks
62 .Name( "cvpcb.Control.ShowEquFileTable" )
63 .Scope( AS_GLOBAL )
64 .FriendlyName( _( "Manage Footprint Association Files..." ) )
65 .Tooltip( _( "Edit the footprint association files list. These files are used to "
66 "automatically assign footprint names from symbol values." ) ) );
67
69 .Name( "cvpcb.Control.SaveAssociationsToSchematic" )
70 .Scope( AS_GLOBAL )
71 .DefaultHotkey( MD_CTRL + 'S' )
72 .LegacyHotkeyName( "Save" )
73 .FriendlyName( _( "Save to Schematic" ) )
74 .Tooltip( _( "Save footprint associations in schematic symbol footprint fields" ) )
75 .Icon( BITMAPS::save ) );
76
78 .Name( "cvpcb.Control.SaveAssociationsToFile" )
79 .Scope( AS_GLOBAL )
80 .DefaultHotkey( MD_CTRL + 'S' )
81 .LegacyHotkeyName( "Save" )
82 .FriendlyName( _( "Save to Schematic and File" ) )
83 .Tooltip( _( "Save footprint associations in schematic symbol footprint fields and schematic files" ) )
84 .Icon( BITMAPS::save ) );
85
86// Actions to navigate the display
88 .Name( "cvpcb.Control.changeFocusRight" )
89 .Scope( AS_GLOBAL )
90 .DefaultHotkey( WXK_TAB )
91 .Flags( AF_NONE )
93
95 .Name( "cvpcb.Control.changeFocusLeft" )
96 .Scope( AS_GLOBAL )
97 .DefaultHotkey( MD_SHIFT + static_cast<int>( WXK_TAB ) )
98 .Flags( AF_NONE )
100
101// Actions to navigate the component list
103 .Name( "cvpcb.Control.GotoNextNA" )
104 .Scope( AS_GLOBAL )
105 .FriendlyName( _( "Select next unassigned symbol" ) )
106 .Tooltip( _( "Select next symbol with no footprint assignment" ) )
107 .Icon( BITMAPS::right )
108 .Flags( AF_NONE )
109 .Parameter( CVPCB_MAINFRAME::ITEM_NEXT ) );
110
112 .Name( "cvpcb.Control.GotoPreviousNA" )
113 .Scope( AS_GLOBAL )
114 .FriendlyName( _( "Select previous unassigned symbol" ) )
115 .Tooltip( _( "Select previous symbol with no footprint assignment" ) )
116 .Icon( BITMAPS::left )
117 .Flags( AF_NONE )
118 .Parameter( CVPCB_MAINFRAME::ITEM_PREV ) );
119
120
121// Actions to modify component associations
123 .Name( "cvpcb.Association.Associate" )
124 .Scope( AS_GLOBAL )
125 .DefaultHotkey( WXK_RETURN )
126 .FriendlyName( _( "Assign footprint" ) )
127 .Tooltip( _( "Assign footprint to selected symbols" ) )
128 .Icon( BITMAPS::auto_associate ) );
129
131 .Name( "cvpcb.Association.AutoAssociate" )
132 .Scope( AS_GLOBAL )
133 .FriendlyName( _( "Automatically assign footprints" ) )
134 .Tooltip( _( "Perform automatic footprint assignment" ) )
135 .Icon( BITMAPS::auto_associate ) );
136
138 .Name( "cvpcb.Association.Delete" )
139 .Scope( AS_GLOBAL )
140 .DefaultHotkey( WXK_DELETE )
141 .FriendlyName( _( "Delete association" ) )
142 .Tooltip( _( "Delete selected footprint associations" ) )
144
146 .Name( "cvpcb.Association.DeleteAll" )
147 .Scope( AS_GLOBAL )
148 .FriendlyName( _( "Delete all footprint associations" ) )
149 .Tooltip( _( "Delete all footprint associations" ) )
151
152
153// Actions to filter the footprint list
155 .Name( "cvpcb.Control.FilterFPbyFPFilters" )
156 .Scope( AS_GLOBAL )
157 .FriendlyName( _( "Use symbol footprint filters" ) )
158 .Tooltip( _( "Filter footprint list by footprint filters defined in the symbol" ) )
160 .Flags( AF_NONE )
162
164 .Name( "cvpcb.Control.FilterFPByPin" )
165 .Scope( AS_GLOBAL )
166 .FriendlyName( _( "Filter by pin count" ) )
167 .Tooltip( _( "Filter footprint list by pin count" ) )
169 .Flags( AF_NONE )
171
173 .Name( "cvpcb.Control.FilterFPbyLibrary" )
174 .Scope( AS_GLOBAL )
175 .FriendlyName( _( "Filter by library" ) )
176 .Tooltip( _( "Filter footprint list by library" ) )
178 .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