33#include <python_scripting.h>
47 wxMenuBar* oldMenuBar = GetMenuBar();
66 openRecentMenu->
SetIcon( BITMAPS::recent );
68 fileHistory.UseMenu( openRecentMenu );
73 openRecentMenu->
SetTitle(
_(
"Open Recent" ) );
79 wxMenuItem* item = fileMenu->
Add( openRecentMenu->
Clone() );
88 fileMenu->AppendSeparator();
103 fileMenu->AppendSeparator();
104 fileMenu->
Add(
_(
"Resc&ue" ),
105 _(
"Clear board and get last rescue file automatically saved by PCB editor" ),
111 submenuImport->
SetTitle(
_(
"Import" ) );
112 submenuImport->
SetIcon( BITMAPS::import );
117 submenuImport->
Add(
_(
"Non-KiCad Board File..." ),
118 _(
"Import board file from other applications" ),
121 fileMenu->AppendSeparator();
122 fileMenu->
Add( submenuImport );
126 submenuExport->
SetTitle(
_(
"Export" ) );
127 submenuExport->
SetIcon( BITMAPS::export_file );
130 submenuExport->
Add(
_(
"GenCAD..." ),
_(
"Export GenCAD board representation" ),
132 submenuExport->
Add(
_(
"VRML..." ),
_(
"Export VRML 3D board representation" ),
134 submenuExport->
Add(
_(
"IDFv3..." ),
_(
"Export IDF 3D board representation" ),
136 submenuExport->
Add(
_(
"STEP / GLB / BREP / XAO / PLY / STL..." ),
137 _(
"Export STEP / GLB / BREP / XAO / PLY / STL 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 );
177 fileMenu->
Add( submenuFabOutputs );
179 fileMenu->AppendSeparator();
182 fileMenu->AppendSeparator();
187 fileMenu->AppendSeparator();
197 editMenu->AppendSeparator();
204 editMenu->AppendSeparator();
208 editMenu->AppendSeparator();
211 editMenu->AppendSeparator();
219 editMenu->AppendSeparator();
224 editMenu->AppendSeparator();
234 showHidePanels->
SetTitle(
_(
"Panels" ) );
239 viewMenu->
Add( showHidePanels );
241 viewMenu->AppendSeparator();
245 viewMenu->AppendSeparator();
253 viewMenu->AppendSeparator();
256 drawingModeSubMenu->
SetTitle(
_(
"&Drawing Mode" ) );
257 drawingModeSubMenu->
SetIcon( BITMAPS::add_zone );
268 drawingModeSubMenu->AppendSeparator();
273 drawingModeSubMenu->AppendSeparator();
277 viewMenu->
Add( drawingModeSubMenu );
281 contrastModeSubMenu->
SetTitle(
_(
"&Contrast Mode" ) );
282 contrastModeSubMenu->
SetIcon( BITMAPS::contrast_mode );
287 viewMenu->
Add( contrastModeSubMenu );
292 viewMenu->AppendSeparator();
305 muwaveSubmenu->
SetTitle(
_(
"Draw Microwave Shapes" ) );
306 muwaveSubmenu->
SetIcon( BITMAPS::mw_add_line );
312 placeMenu->
Add( muwaveSubmenu );
314 placeMenu->AppendSeparator();
326 placeMenu->AppendSeparator();
328 dimensionSubmenu->
SetTitle(
_(
"Draw Dimensions" ) );
329 dimensionSubmenu->
SetIcon( BITMAPS::add_aligned_dimension );
335 placeMenu->
Add( dimensionSubmenu );
337 placeMenu->AppendSeparator();
341 placeMenu->AppendSeparator();
347 placeMenu->AppendSeparator();
349 autoplaceSubmenu->
SetTitle(
_(
"Auto-Place Footprints" ) );
350 autoplaceSubmenu->
SetIcon( BITMAPS::mode_module );
355 placeMenu->
Add( autoplaceSubmenu );
363 routeMenu->AppendSeparator();
367 routeMenu->AppendSeparator();
372 routeMenu->AppendSeparator();
383 inspectMenu->AppendSeparator();
389 inspectMenu->AppendSeparator();
401 update->Enable( !
Kiface().IsSingle() );
405 if( !
Kiface().IsSingle() )
408 toolsMenu->AppendSeparator();
413 toolsMenu->AppendSeparator();
418 toolsMenu->AppendSeparator();
424 toolsMenu->AppendSeparator();
430 toolsMenu->AppendSeparator();
433 update->Enable( !
Kiface().IsSingle() );
435 if( SCRIPTING::IsWxAvailable() )
437 toolsMenu->AppendSeparator();
442 multichannelSubmenu->
SetTitle(
_(
"Multi-Channel" ) );
443 multichannelSubmenu->
SetIcon( BITMAPS::mode_module );
447 toolsMenu->
Add( multichannelSubmenu );
450 submenuActionPlugins->
SetTitle(
_(
"External Plugins" ) );
451 submenuActionPlugins->
SetIcon( BITMAPS::puzzle_piece );
458 submenuActionPlugins->AppendSeparator();
461 toolsMenu->AppendSeparator();
462 toolsMenu->
Add( submenuActionPlugins );
472 prefsMenu->AppendSeparator();
478 menuBar->Append( fileMenu,
_(
"&File" ) );
479 menuBar->Append( editMenu,
_(
"&Edit" ) );
480 menuBar->Append( viewMenu,
_(
"&View" ) );
481 menuBar->Append( placeMenu,
_(
"&Place" ) );
482 menuBar->Append( routeMenu,
_(
"Ro&ute" ) );
483 menuBar->Append( inspectMenu,
_(
"&Inspect" ) );
484 menuBar->Append( toolsMenu,
_(
"&Tools" ) );
485 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 pluginsReload
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 gridOrigin
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 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.
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 drawBezier
static TOOL_ACTION placeText
static TOOL_ACTION swapLayers
static TOOL_ACTION zonesManager
static TOOL_ACTION generateBOM
static TOOL_ACTION drawOrthogonalDimension
static TOOL_ACTION drawRectangle
static TOOL_ACTION padDisplayMode
static TOOL_ACTION placeReferenceImage
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 generateD356File
static TOOL_ACTION tuneDiffPair
static TOOL_ACTION exportSpecctraDSN
static TOOL_ACTION generateIPC2581File
static TOOL_ACTION drawTable
static TOOL_ACTION drawTextBox
static TOOL_ACTION generateODBPPFile
static TOOL_ACTION repeatLayout
static TOOL_ACTION layerAlphaDec
static TOOL_ACTION drawPolygon
static TOOL_ACTION zoneDisplayFilled
static TOOL_ACTION drawRadialDimension
static TOOL_ACTION tuneSingleTrack
static TOOL_ACTION cleanupTracksAndVias
static TOOL_ACTION viaDisplayMode
static TOOL_ACTION editTextAndGraphics
static TOOL_ACTION drawLeader
static TOOL_ACTION drillResetOrigin
static TOOL_ACTION placeCharacteristics
static TOOL_ACTION pluginsShowFolder
Scripting Actions.
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 tuneSkew
static TOOL_ACTION repairBoard
static TOOL_ACTION trackDisplayMode
static TOOL_ACTION showNetInspector
static TOOL_ACTION selectLayerPair
static TOOL_ACTION microwaveCreateStubArc
static TOOL_ACTION generateGerbers
static TOOL_ACTION inspectClearance
static TOOL_ACTION generatorsShowManager
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 regenerateAll
static TOOL_ACTION drawArc
static TOOL_ACTION runDRC
static TOOL_ACTION regenerateAllTuning
Generator tool.
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION importNetlist
static TOOL_ACTION generatePlacementRuleAreas
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 regenerateSelected
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)