34#include <python_scripting.h>
48 wxMenuBar* oldMenuBar = GetMenuBar();
67 openRecentMenu->
SetIcon( BITMAPS::recent );
69 fileHistory.UseMenu( openRecentMenu );
74 openRecentMenu->
SetTitle(
_(
"Open Recent" ) );
80 wxMenuItem* item = fileMenu->
Add( openRecentMenu->
Clone() );
89 fileMenu->AppendSeparator();
104 fileMenu->AppendSeparator();
105 fileMenu->
Add(
_(
"Resc&ue" ),
106 _(
"Clear board and get last rescue file automatically saved by PCB editor" ),
112 submenuImport->
SetTitle(
_(
"Import" ) );
113 submenuImport->
SetIcon( BITMAPS::import );
118 submenuImport->
Add(
_(
"Non-KiCad Board File..." ),
119 _(
"Import board file from other applications" ),
122 fileMenu->AppendSeparator();
123 fileMenu->
Add( submenuImport );
127 submenuExport->
SetTitle(
_(
"Export" ) );
128 submenuExport->
SetIcon( BITMAPS::export_file );
131 submenuExport->
Add(
_(
"GenCAD..." ),
_(
"Export GenCAD board representation" ),
133 submenuExport->
Add(
_(
"VRML..." ),
_(
"Export VRML 3D board representation" ),
135 submenuExport->
Add(
_(
"IDFv3..." ),
_(
"Export IDF 3D board representation" ),
137 submenuExport->
Add(
_(
"STEP..." ),
_(
"Export STEP 3D board representation" ),
139 submenuExport->
Add(
_(
"SVG..." ),
_(
"Export SVG board representation" ),
141 submenuExport->
Add(
_(
"Footprint Association (.cmp) File..." ),
142 _(
"Export footprint association file (*.cmp) for schematic back annotation" ),
144 submenuExport->
Add(
_(
"Hyperlynx..." ), wxEmptyString,
150 submenuExport->AppendSeparator();
151 submenuExport->
Add(
_(
"Footprints to Library..." ),
152 _(
"Add footprints used on board to an existing footprint library\n"
153 "(does not remove other footprints from this library)" ),
156 submenuExport->
Add(
_(
"Footprints to New Library..." ),
157 _(
"Create a new footprint library containing the footprints used on board\n"
158 "(if the library already exists it will be replaced)" ),
161 fileMenu->
Add( submenuExport );
165 submenuFabOutputs->
SetTitle(
_(
"Fabrication Outputs" ) );
166 submenuFabOutputs->
SetIcon( BITMAPS::fabrication );
174 fileMenu->
Add( submenuFabOutputs );
176 fileMenu->AppendSeparator();
179 fileMenu->AppendSeparator();
184 fileMenu->AppendSeparator();
194 editMenu->AppendSeparator();
201 editMenu->AppendSeparator();
205 editMenu->AppendSeparator();
208 editMenu->AppendSeparator();
215 editMenu->AppendSeparator();
219 editMenu->AppendSeparator();
231 viewMenu->AppendSeparator();
239 viewMenu->AppendSeparator();
242 drawingModeSubMenu->
SetTitle(
_(
"&Drawing Mode" ) );
243 drawingModeSubMenu->
SetIcon( BITMAPS::add_zone );
254 drawingModeSubMenu->AppendSeparator();
259 drawingModeSubMenu->AppendSeparator();
263 viewMenu->
Add( drawingModeSubMenu );
267 contrastModeSubMenu->
SetTitle(
_(
"&Contrast Mode" ) );
268 contrastModeSubMenu->
SetIcon( BITMAPS::contrast_mode );
273 viewMenu->
Add( contrastModeSubMenu );
277 viewMenu->AppendSeparator();
283 viewMenu->AppendSeparator();
296 muwaveSubmenu->
SetTitle(
_(
"Add Microwave Shape" ) );
297 muwaveSubmenu->
SetIcon( BITMAPS::mw_add_line );
303 placeMenu->
Add( muwaveSubmenu );
305 placeMenu->AppendSeparator();
315 placeMenu->AppendSeparator();
322 placeMenu->AppendSeparator();
326 placeMenu->AppendSeparator();
329 placeMenu->AppendSeparator();
332 placeMenu->AppendSeparator();
335 autoplaceSubmenu->
SetTitle(
_(
"Auto-Place Footprints" ) );
336 autoplaceSubmenu->
SetIcon( BITMAPS::mode_module );
341 placeMenu->
Add( autoplaceSubmenu );
350 routeMenu->AppendSeparator();
354 routeMenu->AppendSeparator();
359 routeMenu->AppendSeparator();
371 inspectMenu->AppendSeparator();
377 inspectMenu->AppendSeparator();
389 update->Enable( !
Kiface().IsSingle() );
393 if( !
Kiface().IsSingle() )
396 toolsMenu->AppendSeparator();
400 toolsMenu->AppendSeparator();
406 toolsMenu->AppendSeparator();
409 update->Enable( !
Kiface().IsSingle() );
411 if( SCRIPTING::IsWxAvailable() )
413 toolsMenu->AppendSeparator();
418 submenuActionPlugins->
SetTitle(
_(
"External Plugins" ) );
419 submenuActionPlugins->
SetIcon( BITMAPS::puzzle_piece );
426 submenuActionPlugins->AppendSeparator();
429 toolsMenu->AppendSeparator();
430 toolsMenu->
Add( submenuActionPlugins );
440 prefsMenu->AppendSeparator();
446 menuBar->Append( fileMenu,
_(
"&File" ) );
447 menuBar->Append( editMenu,
_(
"&Edit" ) );
448 menuBar->Append( viewMenu,
_(
"&View" ) );
449 menuBar->Append( placeMenu,
_(
"&Place" ) );
450 menuBar->Append( routeMenu,
_(
"Ro&ute" ) );
451 menuBar->Append( inspectMenu,
_(
"&Inspect" ) );
452 menuBar->Append( toolsMenu,
_(
"&Tools" ) );
453 menuBar->Append( prefsMenu,
_(
"P&references" ) );
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION updatePcbFromSchematic
static TOOL_ACTION excludeMarker
static TOOL_ACTION nextMarker
static TOOL_ACTION zoomRedraw
static TOOL_ACTION unselectAll
static TOOL_ACTION revert
static TOOL_ACTION show3DViewer
static TOOL_ACTION zoomOutCenter
static TOOL_ACTION saveAs
static TOOL_ACTION gridResetOrigin
static TOOL_ACTION pasteSpecial
static TOOL_ACTION openPreferences
static TOOL_ACTION showFootprintLibTable
static TOOL_ACTION pageSettings
static TOOL_ACTION showSearch
static TOOL_ACTION prevMarker
static TOOL_ACTION highContrastMode
static TOOL_ACTION measureTool
static TOOL_ACTION doDelete
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION deleteTool
static TOOL_ACTION zoomTool
static TOOL_ACTION updateSchematicFromPcb
static TOOL_ACTION showFootprintEditor
static TOOL_ACTION showProperties
static TOOL_ACTION zoomFitObjects
static TOOL_ACTION zoomInCenter
static TOOL_ACTION saveCopy
static TOOL_ACTION gridSetOrigin
static TOOL_ACTION configurePaths
static TOOL_ACTION showProjectManager
static TOOL_ACTION showFootprintBrowser
static TOOL_ACTION selectAll
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
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.
This class implements a file history object to store a list of files, that can then be added to a men...
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.
static TOOL_ACTION editTracksAndVias
static TOOL_ACTION drawRuleArea
static TOOL_ACTION microwaveCreateGap
static TOOL_ACTION placeText
static TOOL_ACTION swapLayers
static TOOL_ACTION generateBOM
static TOOL_ACTION drawOrthogonalDimension
static TOOL_ACTION listNets
static TOOL_ACTION drawRectangle
static TOOL_ACTION padDisplayMode
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
static TOOL_ACTION zoneFillAll
static TOOL_ACTION showLayersManager
static TOOL_ACTION generateDrillFiles
static TOOL_ACTION drawCircle
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
static TOOL_ACTION placeImage
static TOOL_ACTION generateD356File
static TOOL_ACTION exportSpecctraDSN
static TOOL_ACTION routerTuneDiffPair
Activation of the Push and Shove router (diff pair tuning mode)
static TOOL_ACTION drawTextBox
static TOOL_ACTION layerAlphaDec
static TOOL_ACTION drawPolygon
static TOOL_ACTION zoneDisplayFilled
static TOOL_ACTION drawRadialDimension
static TOOL_ACTION routerTuneDiffPairSkew
Activation of the Push and Shove router (skew tuning mode)
static TOOL_ACTION cleanupTracksAndVias
static TOOL_ACTION viaDisplayMode
static TOOL_ACTION editTextAndGraphics
static TOOL_ACTION drawLeader
static TOOL_ACTION placeCharacteristics
static TOOL_ACTION pluginsShowFolder
static TOOL_ACTION autoplaceOffboardComponents
static TOOL_ACTION layerAlphaInc
static TOOL_ACTION inspectConstraints
static TOOL_ACTION generatePosFile
static TOOL_ACTION globalDeletions
static TOOL_ACTION drillOrigin
static TOOL_ACTION routerTuneSingleTrace
Activation of the Push and Shove router (tune single line mode)
static TOOL_ACTION repairBoard
static TOOL_ACTION trackDisplayMode
static TOOL_ACTION selectLayerPair
static TOOL_ACTION microwaveCreateStubArc
static TOOL_ACTION generateGerbers
static TOOL_ACTION inspectClearance
static TOOL_ACTION zoneDisplayTriangulated
static TOOL_ACTION generateReportFile
static TOOL_ACTION updateFootprints
static TOOL_ACTION autoplaceSelectedComponents
static TOOL_ACTION placeImportedGraphics
static TOOL_ACTION removeUnusedPads
static TOOL_ACTION zoneDisplayFractured
static TOOL_ACTION drawVia
static TOOL_ACTION drawArc
static TOOL_ACTION runDRC
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION importNetlist
static TOOL_ACTION pluginsReload
Scripting Actions.
static TOOL_ACTION diffFootprint
static TOOL_ACTION changeFootprints
static TOOL_ACTION boardSetup
static TOOL_ACTION showEeschema
static TOOL_ACTION drawCenterDimension
static TOOL_ACTION zoneUnfillAll
static TOOL_ACTION appendBoard
static TOOL_ACTION microwaveCreateStub
static TOOL_ACTION microwaveCreateLine
static TOOL_ACTION flipBoard
static TOOL_ACTION zoneDisplayOutline
static TOOL_ACTION showFootprintAssociations
static TOOL_ACTION textOutlines
Display texts as lines.
static TOOL_ACTION microwaveCreateFunctionShape
static TOOL_ACTION boardReannotate
static TOOL_ACTION placeFootprint
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
static TOOL_ACTION boardStatistics
static TOOL_ACTION editTeardrops
static TOOL_ACTION showPythonConsole
static TOOL_ACTION drawLine
static TOOL_ACTION placeStackup
static TOOL_ACTION cleanupGraphics
static TOOL_ACTION drawAlignedDimension
static TOOL_ACTION drawZone
static TOOL_ACTION importSpecctraSession
void doReCreateMenuBar() override
void buildActionPluginMenus(ACTION_MENU *aActionMenu)
Fill action menu with all registered action plugins.
TOOL_ACTION * m_exportNetlistAction
The export board netlist tool action object.
@ ID_GEN_EXPORT_FILE_HYPERLYNX
@ ID_IMPORT_NON_KICAD_BOARD
@ ID_MENU_RECOVER_BOARD_AUTOSAVE
@ ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY
@ ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY
@ ID_GEN_EXPORT_FILE_VRML
@ ID_GEN_EXPORT_FILE_STEP
@ ID_GEN_EXPORT_FILE_IDF3
@ ID_GEN_EXPORT_FILE_GENCADFORMAT
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)