#pragma implementation "menuitem.h"
#endif
+#include "wx/app.h"
#include "wx/menu.h"
#include "wx/menuitem.h"
+#include "wx/window.h"
#include "wx/log.h"
#include "wx/utils.h"
if ( m_invokingWindow != NULL )
return m_invokingWindow;
else if ( m_menuBar != NULL)
- return m_menuBar->GetFrame();
+ return (wxWindow *) m_menuBar->GetFrame();
return NULL;
}
return true ;
}
}
+#ifndef __WXMAC_X__
else if ( macMenuId == kHMHelpMenuID )
{
int menuItem = formerHelpMenuItems ;
}
}
}
+#endif // __WXMAC_X__
for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++)
{
void wxMenuBar::MacInstallMenuBar()
{
+ if ( s_macInstalledMenuBar == this )
+ return ;
+
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
wxString message ;
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
{
for (int i = 0; i < m_menus.GetCount() ; i++)
{
- if ( m_menus[i]->MacGetMenuId() == macMenuId ||
+ if ( m_menus[i]->MacGetMenuId() == macMenuId
+#ifndef __WXMAC_X__
+ ||
( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) )
+#endif
)
{
if ( m_menus[i]->MacMenuSelect( handler , when , macMenuId , macMenuItemNum ) )