]> git.saurik.com Git - wxWidgets.git/commitdiff
adding OS level Window Menu by default
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 May 2005 05:19:38 +0000 (05:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 May 2005 05:19:38 +0000 (05:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/menu.cpp
src/mac/carbon/toplevel.cpp

index 8cb501104269467e4e2bc2b2eb0e333b876c9c12..a2df94bd84fcb2f00fddd69ac65eb06b0b5c8c68 100644 (file)
@@ -567,6 +567,8 @@ auto-merge for MDI in case this will be necessary
 
 wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ;
 wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ;
 
 wxMenuBar* wxMenuBar::s_macInstalledMenuBar = 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() ;
     s_macInstalledMenuBar = this;
 }
     ::DrawMenuBar() ;
     s_macInstalledMenuBar = this;
 }
index cc47ea79c5cc248cebb4c18929221abb1516551a..5c384a61db0ad1794de788a83b6bdd639c1705ce 100644 (file)
@@ -1109,6 +1109,7 @@ void  wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
     else if ( HasFlag( wxCAPTION ) )
     {
         wclass = kDocumentWindowClass ;
     else if ( HasFlag( wxCAPTION ) )
     {
         wclass = kDocumentWindowClass ;
+        attr |= kWindowInWindowMenuAttribute ;
     }
 #if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
     else if ( HasFlag( wxFRAME_DRAWER ) )
     }
 #if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
     else if ( HasFlag( wxFRAME_DRAWER ) )