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(
_(
"Footprint Association (.cmp) File..." ),
140 _(
"Export footprint association file (*.cmp) for schematic back annotation" ),
142 submenuExport->
Add(
_(
"Hyperlynx..." ), wxEmptyString,
148 submenuExport->AppendSeparator();
149 submenuExport->
Add(
_(
"Footprints to Library..." ),
150 _(
"Add footprints used on board to an existing footprint library\n"
151 "(does not remove other footprints from this library)" ),
154 submenuExport->
Add(
_(
"Footprints to New Library..." ),
155 _(
"Create a new footprint library containing the footprints used on board\n"
156 "(if the library already exists it will be replaced)" ),
159 fileMenu->
Add( submenuExport );
163 submenuFabOutputs->
SetTitle(
_(
"Fabrication Outputs" ) );
164 submenuFabOutputs->
SetIcon( BITMAPS::fabrication );
175 fileMenu->
Add( submenuFabOutputs );
177 fileMenu->AppendSeparator();
180 fileMenu->AppendSeparator();
185 fileMenu->AppendSeparator();
195 editMenu->AppendSeparator();
202 editMenu->AppendSeparator();
206 editMenu->AppendSeparator();
209 editMenu->AppendSeparator();
217 editMenu->AppendSeparator();
222 editMenu->AppendSeparator();
232 showHidePanels->
SetTitle(
_(
"Panels" ) );
237 viewMenu->
Add( showHidePanels );
239 viewMenu->AppendSeparator();
243 viewMenu->AppendSeparator();
251 viewMenu->AppendSeparator();
254 drawingModeSubMenu->
SetTitle(
_(
"&Drawing Mode" ) );
255 drawingModeSubMenu->
SetIcon( BITMAPS::add_zone );
266 drawingModeSubMenu->AppendSeparator();
271 drawingModeSubMenu->AppendSeparator();
275 viewMenu->
Add( drawingModeSubMenu );
279 contrastModeSubMenu->
SetTitle(
_(
"&Contrast Mode" ) );
280 contrastModeSubMenu->
SetIcon( BITMAPS::contrast_mode );
285 viewMenu->
Add( contrastModeSubMenu );
290 viewMenu->AppendSeparator();
303 muwaveSubmenu->
SetTitle(
_(
"Draw Microwave Shapes" ) );
304 muwaveSubmenu->
SetIcon( BITMAPS::mw_add_line );
310 placeMenu->
Add( muwaveSubmenu );
312 placeMenu->AppendSeparator();
324 placeMenu->AppendSeparator();
326 dimensionSubmenu->
SetTitle(
_(
"Draw Dimensions" ) );
327 dimensionSubmenu->
SetIcon( BITMAPS::add_aligned_dimension );
333 placeMenu->
Add( dimensionSubmenu );
335 placeMenu->AppendSeparator();
339 placeMenu->AppendSeparator();
345 placeMenu->AppendSeparator();
347 autoplaceSubmenu->
SetTitle(
_(
"Auto-Place Footprints" ) );
348 autoplaceSubmenu->
SetIcon( BITMAPS::mode_module );
353 placeMenu->
Add( autoplaceSubmenu );
361 routeMenu->AppendSeparator();
365 routeMenu->AppendSeparator();
370 routeMenu->AppendSeparator();
381 inspectMenu->AppendSeparator();
387 inspectMenu->AppendSeparator();
399 update->Enable( !
Kiface().IsSingle() );
403 if( !
Kiface().IsSingle() )
406 toolsMenu->AppendSeparator();
411 toolsMenu->AppendSeparator();
416 toolsMenu->AppendSeparator();
422 toolsMenu->AppendSeparator();
428 toolsMenu->AppendSeparator();
431 update->Enable( !
Kiface().IsSingle() );
433 if( SCRIPTING::IsWxAvailable() )
435 toolsMenu->AppendSeparator();
440 multichannelSubmenu->
SetTitle(
_(
"Multi-Channel" ) );
441 multichannelSubmenu->
SetIcon( BITMAPS::mode_module );
445 toolsMenu->
Add( multichannelSubmenu );
448 submenuActionPlugins->
SetTitle(
_(
"External Plugins" ) );
449 submenuActionPlugins->
SetIcon( BITMAPS::puzzle_piece );
456 submenuActionPlugins->AppendSeparator();
459 toolsMenu->AppendSeparator();
460 toolsMenu->
Add( submenuActionPlugins );
470 prefsMenu->AppendSeparator();
476 menuBar->Append( fileMenu,
_(
"&File" ) );
477 menuBar->Append( editMenu,
_(
"&Edit" ) );
478 menuBar->Append( viewMenu,
_(
"&View" ) );
479 menuBar->Append( placeMenu,
_(
"&Place" ) );
480 menuBar->Append( routeMenu,
_(
"Ro&ute" ) );
481 menuBar->Append( inspectMenu,
_(
"&Inspect" ) );
482 menuBar->Append( toolsMenu,
_(
"&Tools" ) );
483 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)
Create a menu list for language choice, and add it as submenu to MasterMenu.
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)
Add 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)