adding OS level Window Menu by default

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2005-05-31 05:19:38 +00:00
parent 501db75a3c
commit 22e3c5bd85
2 changed files with 11 additions and 0 deletions

View File

@@ -567,6 +567,8 @@ auto-merge for MDI in case this will be necessary
wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ; wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ;
wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ; wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ;
bool wxMenuBar::s_macAutoWindowMenu = true ;
WXHMENU wxMenuBar::s_macWindowMenuHandle = NULL ;
void wxMenuBar::Init() void wxMenuBar::Init()
{ {
@@ -775,6 +777,14 @@ void wxMenuBar::MacInstallMenuBar()
UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ; UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ;
} }
} }
if ( GetAutoWindowMenu() )
{
if ( MacGetWindowMenuHMenu() == NULL )
{
CreateStandardWindowMenu( 0 , (MenuHandle*) &s_macWindowMenuHandle ) ;
}
InsertMenu( (MenuHandle) MacGetWindowMenuHMenu() , 0 ) ;
}
::DrawMenuBar() ; ::DrawMenuBar() ;
s_macInstalledMenuBar = this; s_macInstalledMenuBar = this;
} }

View File

@@ -1109,6 +1109,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
else if ( HasFlag( wxCAPTION ) ) else if ( HasFlag( wxCAPTION ) )
{ {
wclass = kDocumentWindowClass ; wclass = kDocumentWindowClass ;
attr |= kWindowInWindowMenuAttribute ;
} }
#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) #if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
else if ( HasFlag( wxFRAME_DRAWER ) ) else if ( HasFlag( wxFRAME_DRAWER ) )