41 wxMenuBar* oldMenuBar = GetMenuBar();
54#define FileHistoryCond( x ) ACTION_CONDITIONS().Enable( FILE_HISTORY::FileHistoryNotEmpty( x ) )
59 if( !openRecentGbrMenu )
61 openRecentGbrMenu =
new ACTION_MENU(
false, selTool );
64 recentGbrFiles.
SetClearText(
_(
"Clear Recent Gerber Files" ) );
65 recentGbrFiles.UseMenu( openRecentGbrMenu );
70 openRecentGbrMenu->
SetTitle(
_(
"Open Recent Gerber File" ) );
71 recentGbrFiles.
UpdateClearText( openRecentGbrMenu,
_(
"Clear Recent Gerber Files" ) );
75 wxMenuItem* gbrItem = fileMenu->
Add( openRecentGbrMenu->
Clone() );
81 if( !openRecentDrlMenu )
83 openRecentDrlMenu =
new ACTION_MENU(
false, selTool );
84 openRecentDrlMenu->
SetTitle(
_(
"Open Recent Drill File" ) );
93 openRecentGbrMenu->
SetTitle(
_(
"Open Recent Gerber File" ) );
97 wxMenuItem* drillItem = fileMenu->
Add( openRecentDrlMenu->
Clone() );
103 if( !openRecentJobMenu )
105 openRecentJobMenu =
new ACTION_MENU(
false, selTool );
114 openRecentJobMenu->
SetTitle(
_(
"Open Recent Job File" ) );
115 m_jobFileHistory.UpdateClearText( openRecentJobMenu,
_(
"Clear Recent Job Files" ) );
118 wxMenuItem* jobItem = fileMenu->
Add( openRecentJobMenu->
Clone() );
124 if( !openRecentZipMenu )
126 openRecentZipMenu =
new ACTION_MENU(
false, selTool );
135 openRecentZipMenu->
SetTitle(
_(
"Open Recent Zip File" ) );
136 m_zipFileHistory.UpdateClearText( openRecentZipMenu,
_(
"Clear Recent Zip Files" ) );
139 wxMenuItem* zipItem = fileMenu->
Add( openRecentZipMenu->
Clone() );
142#undef FileHistoryCond
144 fileMenu->AppendSeparator();
148 fileMenu->AppendSeparator();
151 fileMenu->AppendSeparator();
154 fileMenu->AppendSeparator();
168 viewMenu->AppendSeparator();
174 viewMenu->AppendSeparator();
186 viewMenu->
Add( unitsSubMenu );
188 viewMenu->AppendSeparator();
199 viewMenu->AppendSeparator();
211 toolsMenu->AppendSeparator();
221 preferencesMenu->AppendSeparator();
227 menuBar->Append( fileMenu,
_(
"&File" ) );
228 menuBar->Append( viewMenu,
_(
"&View" ) );
229 menuBar->Append( toolsMenu,
_(
"&Tools" ) );
230 menuBar->Append( preferencesMenu,
_(
"&Preferences" ) );
234 SetMenuBar( menuBar );
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION toggleGrid
static TOOL_ACTION zoomRedraw
static TOOL_ACTION millimetersUnits
static TOOL_ACTION zoomOutCenter
static TOOL_ACTION togglePolarCoords
static TOOL_ACTION milsUnits
static TOOL_ACTION openPreferences
static TOOL_ACTION inchesUnits
static TOOL_ACTION highContrastMode
static TOOL_ACTION measureTool
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomTool
static TOOL_ACTION zoomInCenter
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Create a menu list for language choice, and add it as submenu to MasterMenu.
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...
void SetClearText(wxString aClearText)
Set the text displayed on the menu item that clears the entire menu.
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 dcodeDisplay
static TOOL_ACTION negativeObjectDisplay
static TOOL_ACTION flashedDisplayOutlines
static TOOL_ACTION exportToPcbnew
static TOOL_ACTION showDCodes
static TOOL_ACTION toggleXORMode
static TOOL_ACTION toggleLayerManager
static TOOL_ACTION openGerber
static TOOL_ACTION clearAllLayers
static TOOL_ACTION flipGerberView
static TOOL_ACTION openAutodetected
static TOOL_ACTION reloadAllLayers
static TOOL_ACTION toggleForceOpacityMode
static TOOL_ACTION linesDisplayOutlines
static TOOL_ACTION openDrillFile
static TOOL_ACTION polygonsDisplayOutlines
static TOOL_ACTION openZipFile
static TOOL_ACTION showSource
static TOOL_ACTION openJobFile
static TOOL_ACTION clearLayer
FILE_HISTORY m_jobFileHistory
FILE_HISTORY m_zipFileHistory
FILE_HISTORY m_drillFileHistory
void doReCreateMenuBar() override