46 wxMenuBar* oldMenuBar = GetMenuBar();
59#define FileHistoryCond( x ) ACTION_CONDITIONS().Enable( FILE_HISTORY::FileHistoryNotEmpty( x ) )
64 if( !openRecentGbrMenu )
66 openRecentGbrMenu =
new ACTION_MENU(
false, selTool );
67 openRecentGbrMenu->
SetIcon( BITMAPS::recent );
69 recentGbrFiles.
SetClearText(
_(
"Clear Recent Gerber Files" ) );
70 recentGbrFiles.UseMenu( openRecentGbrMenu );
75 openRecentGbrMenu->
SetTitle(
_(
"Open Recent Gerber File" ) );
76 recentGbrFiles.
UpdateClearText( openRecentGbrMenu,
_(
"Clear Recent Gerber Files" ) );
80 wxMenuItem* gbrItem = fileMenu->
Add( openRecentGbrMenu->
Clone() );
86 if( !openRecentDrlMenu )
88 openRecentDrlMenu =
new ACTION_MENU(
false, selTool );
89 openRecentDrlMenu->
SetTitle(
_(
"Open Recent Drill File" ) );
90 openRecentDrlMenu->
SetIcon( BITMAPS::recent );
98 openRecentGbrMenu->
SetTitle(
_(
"Open Recent Gerber File" ) );
102 wxMenuItem* drillItem = fileMenu->
Add( openRecentDrlMenu->
Clone() );
108 if( !openRecentJobMenu )
110 openRecentJobMenu =
new ACTION_MENU(
false, selTool );
111 openRecentJobMenu->
SetIcon( BITMAPS::recent );
119 openRecentJobMenu->
SetTitle(
_(
"Open Recent Job File" ) );
123 wxMenuItem* jobItem = fileMenu->
Add( openRecentJobMenu->
Clone() );
129 if( !openRecentZipMenu )
131 openRecentZipMenu =
new ACTION_MENU(
false, selTool );
132 openRecentZipMenu->
SetIcon( BITMAPS::recent );
140 openRecentZipMenu->
SetTitle(
_(
"Open Recent Zip File" ) );
144 wxMenuItem* zipItem = fileMenu->
Add( openRecentZipMenu->
Clone() );
147#undef FileHistoryCond
149 fileMenu->AppendSeparator();
153 fileMenu->AppendSeparator();
156 fileMenu->AppendSeparator();
159 fileMenu->AppendSeparator();
173 viewMenu->AppendSeparator();
179 viewMenu->AppendSeparator();
186 unitsSubMenu->
SetIcon( BITMAPS::unit_mm );
191 viewMenu->
Add( unitsSubMenu );
193 viewMenu->AppendSeparator();
204 viewMenu->AppendSeparator();
216 toolsMenu->AppendSeparator();
226 preferencesMenu->
Add(
_(
"Preferences..." ) + wxT(
"\tCtrl+," ),
227 _(
"Show preferences for all open tools" ),
229 BITMAPS::preference );
231 preferencesMenu->AppendSeparator();
237 menuBar->Append( fileMenu,
_(
"&File" ) );
238 menuBar->Append( viewMenu,
_(
"&View" ) );
239 menuBar->Append( toolsMenu,
_(
"&Tools" ) );
240 menuBar->Append( preferencesMenu,
_(
"&Preferences" ) );
244 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 inchesUnits
static TOOL_ACTION highContrastMode
static TOOL_ACTION measureTool
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomTool
static TOOL_ACTION zoomInCenter
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...
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 toggleDiffMode
static TOOL_ACTION clearAllLayers
static TOOL_ACTION flipGerberView
static TOOL_ACTION openAutodetected
static TOOL_ACTION reloadAllLayers
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