X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..dadaeb6978ab89eebaeba72695ee8c6211141aea:/include/wx/mac/menu.h diff --git a/include/wx/mac/menu.h b/include/wx/mac/menu.h index ed73c5ed3e..c401f7f140 100644 --- a/include/wx/mac/menu.h +++ b/include/wx/mac/menu.h @@ -46,20 +46,18 @@ public: // MSW-specific bool ProcessCommand(wxCommandEvent& event); -#if WXWIN_COMPATIBILITY - wxMenu(const wxString& title, const wxFunction func) - : wxMenuBase(title) - { - Callback(func); - } -#endif // WXWIN_COMPATIBILITY - // implementation only from now on // ------------------------------- int MacGetIndexFromId( int id ) ; int MacGetIndexFromItem( wxMenuItem *pItem ) ; void MacEnableMenu( bool bDoEnable ) ; + // MacOS needs to know about submenus somewhere within this menu + // before it can be displayed , also hide special menu items like preferences + // that are handled by the OS + void MacBeforeDisplay( bool isSubMenu ) ; + // undo all changes from the MacBeforeDisplay call + void MacAfterDisplay( bool isSubMenu ) ; // semi-private accessors // get the window which contains this menu @@ -158,6 +156,8 @@ public: void MacInstallMenuBar() ; static wxMenuBar* MacGetInstalledMenuBar() { return s_macInstalledMenuBar ; } + static void MacSetCommonMenuBar(wxMenuBar* menubar) { s_macCommonMenuBar=menubar; } + static wxMenuBar* MacGetCommonMenuBar() { return s_macCommonMenuBar; } protected: // common part of all ctors @@ -172,6 +172,7 @@ protected: private: static wxMenuBar* s_macInstalledMenuBar ; + static wxMenuBar* s_macCommonMenuBar ; DECLARE_DYNAMIC_CLASS(wxMenuBar) };