KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema/menubar.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) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2009 Wayne Stambaugh <[email protected]>
6 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 * Copyright (C) 2019 CERN
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#include <bitmaps.h>
28#include <file_history.h>
29#include <kiface_base.h>
30#include <schematic.h>
31#include <tool/action_manager.h>
32#include <tool/action_menu.h>
33#include <tool/tool_manager.h>
35#include <tools/ee_actions.h>
36#include "eeschema_id.h"
37#include "sch_edit_frame.h"
38#include <widgets/wx_menubar.h>
39#include <advanced_config.h>
40
41
43{
45 // wxWidgets handles the Mac Application menu behind the scenes, but that means
46 // we always have to start from scratch with a new wxMenuBar.
47 wxMenuBar* oldMenuBar = GetMenuBar();
48 WX_MENUBAR* menuBar = new WX_MENUBAR();
49
50 //-- File menu -----------------------------------------------------------
51 //
52 ACTION_MENU* fileMenu = new ACTION_MENU( false, selTool );
53 static ACTION_MENU* openRecentMenu;
54
55 if( Kiface().IsSingle() ) // When not under a project mgr
56 {
57 FILE_HISTORY& fileHistory = GetFileHistory();
58
59 // Add this menu to the list of menus managed by the file history
60 // (the file history will be updated when adding/removing files in history)
61 if( !openRecentMenu )
62 {
63 openRecentMenu = new ACTION_MENU( false, selTool );
64 openRecentMenu->SetIcon( BITMAPS::recent );
65
66 fileHistory.UseMenu( openRecentMenu );
67 fileHistory.AddFilesToMenu( openRecentMenu );
68 }
69
70 // Ensure the title is up to date after changing language
71 openRecentMenu->SetTitle( _( "Open Recent" ) );
72 fileHistory.UpdateClearText( openRecentMenu, _( "Clear Recent Files" ) );
73
74 fileMenu->Add( ACTIONS::doNew );
75 fileMenu->Add( ACTIONS::open );
76
77 wxMenuItem* item = fileMenu->Add( openRecentMenu->Clone() );
78
79 // Add the file menu condition here since it needs the item ID for the submenu
81 cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) );
82 RegisterUIUpdateHandler( item->GetId(), cond );
83 fileMenu->AppendSeparator();
84 }
85
86 fileMenu->Add( ACTIONS::save );
87
88 if( Kiface().IsSingle() )
89 fileMenu->Add( ACTIONS::saveAs );
90 else
92
93 fileMenu->Add( ACTIONS::revert );
94
95 fileMenu->AppendSeparator();
96
97 fileMenu->Add( _( "Insert Schematic Sheet Content..." ),
98 _( "Append schematic sheet content from another project to the current sheet" ),
100 BITMAPS::add_document );
101
102 fileMenu->AppendSeparator();
103
104 // Import submenu
105 ACTION_MENU* submenuImport = new ACTION_MENU( false, selTool );
106 submenuImport->SetTitle( _( "Import" ) );
107 submenuImport->SetIcon( BITMAPS::import );
108
109 submenuImport->Add( _( "Non-KiCad Schematic..." ),
110 _( "Replace current schematic sheet with one imported from another application" ),
112 BITMAPS::import_document );
113
115 _( "Footprint Assignments..." ) );
116 submenuImport->Add( EE_ACTIONS::importGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
117
118 fileMenu->Add( submenuImport );
119
120
121 // Export submenu
122 ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
123 submenuExport->SetTitle( _( "Export" ) );
124 submenuExport->SetIcon( BITMAPS::export_file );
126 _( "Drawing to Clipboard" ) );
127 submenuExport->Add( EE_ACTIONS::exportNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
129 _( "Symbols to Library..." ) );
131 _( "Symbols to New Library..." ) );
132 fileMenu->Add( submenuExport );
133
134 fileMenu->AppendSeparator();
135 fileMenu->Add( EE_ACTIONS::schematicSetup );
136
137 fileMenu->AppendSeparator();
138 fileMenu->Add( ACTIONS::pageSettings );
139 fileMenu->Add( ACTIONS::print );
140 fileMenu->Add( ACTIONS::plot );
141
142 fileMenu->AppendSeparator();
143 fileMenu->AddQuitOrClose( &Kiface(), _( "Schematic Editor" ) );
144
145
146 //-- Edit menu -----------------------------------------------------------
147 //
148 ACTION_MENU* editMenu = new ACTION_MENU( false, selTool );
149
150 editMenu->Add( ACTIONS::undo );
151 editMenu->Add( ACTIONS::redo );
152
153 editMenu->AppendSeparator();
154 editMenu->Add( ACTIONS::cut );
155 editMenu->Add( ACTIONS::copy );
156 editMenu->Add( ACTIONS::paste );
157 editMenu->Add( ACTIONS::pasteSpecial );
158 editMenu->Add( ACTIONS::doDelete );
159
160 editMenu->AppendSeparator();
161 editMenu->Add( ACTIONS::selectAll );
162 editMenu->Add( ACTIONS::unselectAll );
163
164 editMenu->AppendSeparator();
165 editMenu->Add( ACTIONS::find );
166 editMenu->Add( ACTIONS::findAndReplace );
167
168 editMenu->AppendSeparator();
169 editMenu->Add( ACTIONS::deleteTool );
171 editMenu->Add( EE_ACTIONS::changeSymbols );
172 editMenu->Add( EE_ACTIONS::editPageNumber );
173
174 ACTION_MENU* submenuAttributes = new ACTION_MENU( false, selTool );
175 submenuAttributes->SetTitle( _( "Attributes" ) );
176
177 submenuAttributes->Add( EE_ACTIONS::setExcludeFromSimulation );
178 submenuAttributes->Add( EE_ACTIONS::unsetExcludeFromSimulation );
179 submenuAttributes->Add( EE_ACTIONS::toggleExcludeFromSimulation );
180
181 submenuAttributes->AppendSeparator();
182 submenuAttributes->Add( EE_ACTIONS::setExcludeFromBOM );
183 submenuAttributes->Add( EE_ACTIONS::unsetExcludeFromBOM );
184 submenuAttributes->Add( EE_ACTIONS::toggleExcludeFromBOM );
185
186 submenuAttributes->AppendSeparator();
187 submenuAttributes->Add( EE_ACTIONS::setExcludeFromBoard );
188 submenuAttributes->Add( EE_ACTIONS::unsetExcludeFromBoard );
189 submenuAttributes->Add( EE_ACTIONS::toggleExcludeFromBoard );
190
191 submenuAttributes->AppendSeparator();
192 submenuAttributes->Add( EE_ACTIONS::setDNP );
193 submenuAttributes->Add( EE_ACTIONS::unsetDNP );
194 submenuAttributes->Add( EE_ACTIONS::toggleDNP );
195
196 editMenu->Add( submenuAttributes );
197
198 //-- View menu -----------------------------------------------------------
199 //
200 ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
201
202 viewMenu->Add( ACTIONS::showSymbolBrowser );
206
207 if( ADVANCED_CFG::GetCfg().m_IncrementalConnectivity )
209
210 viewMenu->AppendSeparator();
211 viewMenu->Add( EE_ACTIONS::navigateBack );
212 viewMenu->Add( EE_ACTIONS::navigateUp );
213 viewMenu->Add( EE_ACTIONS::navigateForward );
215 viewMenu->Add( EE_ACTIONS::navigateNext );
216
217 viewMenu->AppendSeparator();
218 viewMenu->Add( ACTIONS::zoomInCenter );
219 viewMenu->Add( ACTIONS::zoomOutCenter );
220 viewMenu->Add( ACTIONS::zoomFitScreen );
221 viewMenu->Add( ACTIONS::zoomFitObjects );
222 viewMenu->Add( ACTIONS::zoomTool );
223 viewMenu->Add( ACTIONS::zoomRedraw );
224
225 viewMenu->AppendSeparator();
234
235#ifdef __APPLE__
236 viewMenu->AppendSeparator();
237#endif
238
239 //-- Place menu -----------------------------------------------------------
240 //
241 ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
242
243 placeMenu->Add( EE_ACTIONS::placeSymbol );
244 placeMenu->Add( EE_ACTIONS::placePower );
245 placeMenu->Add( EE_ACTIONS::drawWire );
246 placeMenu->Add( EE_ACTIONS::drawBus );
248 placeMenu->Add( EE_ACTIONS::placeNoConnect );
249 placeMenu->Add( EE_ACTIONS::placeJunction );
250 placeMenu->Add( EE_ACTIONS::placeLabel );
251 placeMenu->Add( EE_ACTIONS::placeClassLabel );
252 placeMenu->Add( EE_ACTIONS::placeGlobalLabel );
253
254 placeMenu->AppendSeparator();
255 placeMenu->Add( EE_ACTIONS::placeHierLabel );
256 placeMenu->Add( EE_ACTIONS::drawSheet );
257 placeMenu->Add( EE_ACTIONS::placeSheetPin );
259
260 placeMenu->AppendSeparator();
262 placeMenu->Add( EE_ACTIONS::drawTextBox );
263 placeMenu->Add( EE_ACTIONS::drawTable );
264 placeMenu->Add( EE_ACTIONS::drawRectangle );
265 placeMenu->Add( EE_ACTIONS::drawCircle );
266 placeMenu->Add( EE_ACTIONS::drawArc );
267 placeMenu->Add( EE_ACTIONS::drawLines );
268 placeMenu->Add( EE_ACTIONS::placeImage );
269
270
271 //-- Inspect menu -----------------------------------------------
272 //
273 ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
274
275 inspectMenu->Add( EE_ACTIONS::showBusSyntaxHelp );
276
277 inspectMenu->AppendSeparator();
278 inspectMenu->Add( EE_ACTIONS::runERC );
279 inspectMenu->Add( ACTIONS::prevMarker );
280 inspectMenu->Add( ACTIONS::nextMarker );
281 inspectMenu->Add( ACTIONS::excludeMarker );
282
283 inspectMenu->AppendSeparator();
284 inspectMenu->Add( EE_ACTIONS::diffSymbol );
285
286 inspectMenu->AppendSeparator();
287 inspectMenu->Add( EE_ACTIONS::showSimulator );
288
289
290 //-- Tools menu -----------------------------------------------
291 //
292 ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool );
293
294 wxMenuItem* update = toolsMenu->Add( ACTIONS::updatePcbFromSchematic );
295 update->Enable( !Kiface().IsSingle() );
296
297 toolsMenu->Add( EE_ACTIONS::showPcbNew );
298
299 if( !Kiface().IsSingle() )
300 toolsMenu->Add( ACTIONS::showProjectManager );
301
302 toolsMenu->AppendSeparator();
303 toolsMenu->Add( ACTIONS::showSymbolEditor );
304 toolsMenu->Add( EE_ACTIONS::updateSymbols );
305
306 toolsMenu->AppendSeparator();
307 toolsMenu->Add( EE_ACTIONS::rescueSymbols );
308 toolsMenu->Add( EE_ACTIONS::remapSymbols );
309
310 if( ADVANCED_CFG::GetCfg().m_ShowRepairSchematic )
311 toolsMenu->Add( EE_ACTIONS::repairSchematic );
312
313 toolsMenu->AppendSeparator();
314 toolsMenu->Add( EE_ACTIONS::editSymbolFields );
316
317 toolsMenu->AppendSeparator();
318 toolsMenu->Add( EE_ACTIONS::annotate );
319
320 toolsMenu->AppendSeparator();
321 toolsMenu->Add( EE_ACTIONS::assignFootprints );
322 toolsMenu->Add( EE_ACTIONS::generateBOM );
324
325 toolsMenu->AppendSeparator();
326 update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
327 update->Enable( !Kiface().IsSingle() );
328
329 //-- Preferences menu -----------------------------------------------
330 //
331 ACTION_MENU* prefsMenu = new ACTION_MENU( false, selTool );
332
333 prefsMenu->Add( ACTIONS::configurePaths );
334 prefsMenu->Add( ACTIONS::showSymbolLibTable );
335 prefsMenu->Add( ACTIONS::openPreferences );
336
337 prefsMenu->AppendSeparator();
338 AddMenuLanguageList( prefsMenu, selTool );
339
340
341 //-- Menubar -------------------------------------------------------------
342 //
343 menuBar->Append( fileMenu, _( "&File" ) );
344 menuBar->Append( editMenu, _( "&Edit" ) );
345 menuBar->Append( viewMenu, _( "&View" ) );
346 menuBar->Append( placeMenu, _( "&Place" ) );
347 menuBar->Append( inspectMenu, _( "&Inspect" ) );
348 menuBar->Append( toolsMenu, _( "&Tools" ) );
349 menuBar->Append( prefsMenu, _( "P&references" ) );
350 AddStandardHelpMenu( menuBar );
351
352 SetMenuBar( menuBar );
353 delete oldMenuBar;
354}
355
356
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:199
static TOOL_ACTION paste
Definition: actions.h:70
static TOOL_ACTION excludeMarker
Definition: actions.h:111
static TOOL_ACTION nextMarker
Definition: actions.h:110
static TOOL_ACTION zoomRedraw
Definition: actions.h:114
static TOOL_ACTION unselectAll
Definition: actions.h:73
static TOOL_ACTION revert
Definition: actions.h:55
static TOOL_ACTION zoomOutCenter
Definition: actions.h:118
static TOOL_ACTION saveAs
Definition: actions.h:52
static TOOL_ACTION copy
Definition: actions.h:69
static TOOL_ACTION showSymbolLibTable
Definition: actions.h:213
static TOOL_ACTION showSymbolEditor
Definition: actions.h:196
static TOOL_ACTION showSymbolBrowser
Definition: actions.h:195
static TOOL_ACTION pasteSpecial
Definition: actions.h:71
static TOOL_ACTION findAndReplace
Definition: actions.h:100
static TOOL_ACTION openPreferences
Definition: actions.h:211
static TOOL_ACTION plot
Definition: actions.h:58
static TOOL_ACTION open
Definition: actions.h:50
static TOOL_ACTION pageSettings
Definition: actions.h:56
static TOOL_ACTION showSearch
Definition: actions.h:98
static TOOL_ACTION undo
Definition: actions.h:66
static TOOL_ACTION prevMarker
Definition: actions.h:109
static TOOL_ACTION doDelete
Definition: actions.h:75
static TOOL_ACTION save
Definition: actions.h:51
static TOOL_ACTION zoomFitScreen
Definition: actions.h:124
static TOOL_ACTION redo
Definition: actions.h:67
static TOOL_ACTION deleteTool
Definition: actions.h:76
static TOOL_ACTION zoomTool
Definition: actions.h:127
static TOOL_ACTION updateSchematicFromPcb
Definition: actions.h:200
static TOOL_ACTION print
Definition: actions.h:57
static TOOL_ACTION showProperties
Definition: actions.h:201
static TOOL_ACTION doNew
Definition: actions.h:47
static TOOL_ACTION zoomFitObjects
Definition: actions.h:125
static TOOL_ACTION zoomInCenter
Definition: actions.h:117
static TOOL_ACTION cut
Definition: actions.h:68
static TOOL_ACTION configurePaths
Definition: actions.h:212
static TOOL_ACTION showProjectManager
Definition: actions.h:193
static TOOL_ACTION selectAll
Definition: actions.h:72
static TOOL_ACTION find
Definition: actions.h:99
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:49
void AddQuitOrClose(KIFACE_BASE *aKiface, wxString aAppname="")
Add either a standard Quit or Close item to the menu.
static constexpr bool CHECK
Definition: action_menu.h:201
ACTION_MENU * Clone() const
Create a deep, recursive copy of this ACTION_MENU.
void SetTitle(const wxString &aTitle) override
Set title for the menu.
Definition: action_menu.cpp:92
static constexpr bool NORMAL
Definition: action_menu.h:200
void SetIcon(BITMAPS aIcon)
Assign an icon for the entry.
Definition: action_menu.cpp:78
wxMenuItem * Add(const wxString &aLabel, int aId, BITMAPS aIcon)
Add a wxWidgets-style entry to the menu.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to Master...
void SetMenuBar(wxMenuBar *menu_bar) override
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
virtual void RegisterUIUpdateHandler(int aID, const ACTION_CONDITIONS &aConditions) override
Register a UI update handler for the control with ID aID.
void AddStandardHelpMenu(wxMenuBar *aMenuBar)
Adds the standard KiCad help menu to the menubar.
static TOOL_ACTION importFPAssignments
Definition: ee_actions.h:173
static TOOL_ACTION repairSchematic
Definition: ee_actions.h:256
static TOOL_ACTION remapSymbols
Definition: ee_actions.h:167
static TOOL_ACTION unsetDNP
Definition: ee_actions.h:193
static TOOL_ACTION runERC
Definition: ee_actions.h:148
static TOOL_ACTION toggleExcludeFromSimulation
Definition: ee_actions.h:188
static TOOL_ACTION unsetExcludeFromSimulation
Definition: ee_actions.h:187
static TOOL_ACTION toggleHiddenPins
Definition: ee_actions.h:231
static TOOL_ACTION setExcludeFromBoard
Definition: ee_actions.h:189
static TOOL_ACTION drawTable
Definition: ee_actions.h:99
static TOOL_ACTION syncAllSheetsPins
Definition: ee_actions.h:96
static TOOL_ACTION toggleExcludeFromBoard
Definition: ee_actions.h:191
static TOOL_ACTION navigateForward
Definition: ee_actions.h:219
static TOOL_ACTION setDNP
Definition: ee_actions.h:192
static TOOL_ACTION placeSymbol
Definition: ee_actions.h:79
static TOOL_ACTION navigateBack
Definition: ee_actions.h:220
static TOOL_ACTION toggleERCWarnings
Definition: ee_actions.h:236
static TOOL_ACTION toggleERCExclusions
Definition: ee_actions.h:238
static TOOL_ACTION placeClassLabel
Definition: ee_actions.h:88
static TOOL_ACTION drawWire
Definition: ee_actions.h:81
static TOOL_ACTION toggleExcludeFromBOM
Definition: ee_actions.h:185
static TOOL_ACTION drawCircle
Definition: ee_actions.h:101
static TOOL_ACTION drawBus
Definition: ee_actions.h:82
static TOOL_ACTION generateBOMLegacy
Definition: ee_actions.h:176
static TOOL_ACTION toggleERCErrors
Definition: ee_actions.h:237
static TOOL_ACTION placePower
Definition: ee_actions.h:80
static TOOL_ACTION placeSheetPin
Definition: ee_actions.h:92
static TOOL_ACTION drawLines
Definition: ee_actions.h:103
static TOOL_ACTION toggleOPCurrents
Definition: ee_actions.h:240
static TOOL_ACTION showSimulator
Definition: ee_actions.h:274
static TOOL_ACTION exportNetlist
Definition: ee_actions.h:174
static TOOL_ACTION assignFootprints
Definition: ee_actions.h:158
static TOOL_ACTION unsetExcludeFromBOM
Definition: ee_actions.h:184
static TOOL_ACTION diffSymbol
Definition: ee_actions.h:163
static TOOL_ACTION rescueSymbols
Definition: ee_actions.h:166
static TOOL_ACTION importGraphics
Definition: ee_actions.h:252
static TOOL_ACTION toggleHiddenFields
Definition: ee_actions.h:232
static TOOL_ACTION placeGlobalLabel
Definition: ee_actions.h:89
static TOOL_ACTION exportSymbolsToLibrary
Definition: ee_actions.h:179
static TOOL_ACTION placeHierLabel
Definition: ee_actions.h:90
static TOOL_ACTION drawSheetOnClipboard
Definition: ee_actions.h:251
static TOOL_ACTION editSymbolFields
Definition: ee_actions.h:150
static TOOL_ACTION drawTextBox
Definition: ee_actions.h:98
static TOOL_ACTION showNetNavigator
Definition: ee_actions.h:291
static TOOL_ACTION editPageNumber
Definition: ee_actions.h:161
static TOOL_ACTION drawRectangle
Definition: ee_actions.h:100
static TOOL_ACTION annotate
Definition: ee_actions.h:149
static TOOL_ACTION placeImage
Definition: ee_actions.h:104
static TOOL_ACTION toggleDirectiveLabels
Definition: ee_actions.h:235
static TOOL_ACTION updateSymbols
Definition: ee_actions.h:155
static TOOL_ACTION showHierarchy
Definition: ee_actions.h:223
static TOOL_ACTION placeSchematicText
Definition: ee_actions.h:97
static TOOL_ACTION setExcludeFromBOM
Definition: ee_actions.h:183
static TOOL_ACTION toggleOPVoltages
Definition: ee_actions.h:239
static TOOL_ACTION changeSymbols
Definition: ee_actions.h:154
static TOOL_ACTION setExcludeFromSimulation
Definition: ee_actions.h:186
static TOOL_ACTION unsetExcludeFromBoard
Definition: ee_actions.h:190
static TOOL_ACTION drawArc
Definition: ee_actions.h:102
static TOOL_ACTION drawSheet
Definition: ee_actions.h:91
static TOOL_ACTION navigateNext
Definition: ee_actions.h:222
static TOOL_ACTION navigateUp
Definition: ee_actions.h:218
static TOOL_ACTION editSymbolLibraryLinks
Definition: ee_actions.h:151
static TOOL_ACTION placeLabel
Definition: ee_actions.h:87
static TOOL_ACTION saveCurrSheetCopyAs
Definition: ee_actions.h:42
static TOOL_ACTION editTextAndGraphics
Definition: ee_actions.h:228
static TOOL_ACTION showPcbNew
Definition: ee_actions.h:172
static TOOL_ACTION placeBusWireEntry
Definition: ee_actions.h:86
static TOOL_ACTION toggleDNP
Definition: ee_actions.h:194
static TOOL_ACTION placeJunction
Definition: ee_actions.h:85
static TOOL_ACTION generateBOM
Definition: ee_actions.h:175
static TOOL_ACTION navigatePrevious
Definition: ee_actions.h:221
static TOOL_ACTION placeNoConnect
Definition: ee_actions.h:84
static TOOL_ACTION showBusSyntaxHelp
Definition: ee_actions.h:164
static TOOL_ACTION schematicSetup
Definition: ee_actions.h:160
static TOOL_ACTION exportSymbolsToNewLibrary
Definition: ee_actions.h:180
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: file_history.h:43
static SELECTION_CONDITION FileHistoryNotEmpty(const FILE_HISTORY &aHistory)
Create a SELECTION_CONDITION that can be used to enable a menu item when the file history has items i...
void UpdateClearText(wxMenu *aMenu, wxString aClearText)
Update the text displayed on the menu item that clears the entire menu.
void AddFilesToMenu() override
Add the files to all registered menus.
Definition: file_history.h:98
void doReCreateMenuBar() override
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:167
Wrapper around a wxMenuBar object that prevents the accelerator table from being used.
Definition: wx_menubar.h:47
#define _(s)
@ ID_IMPORT_NON_KICAD_SCH
Definition: eeschema_id.h:57
@ ID_APPEND_PROJECT
Definition: id.h:74
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
ACTION_CONDITIONS & Enable(const SELECTION_CONDITION &aCondition)