]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/frame.cpp
nativedlg and some interface changes.
[wxWidgets.git] / src / mac / frame.cpp
index 1c5f09ba7b41ee597af9c539f8a810186cc1ea42..4d83421744edd49d93ea8d7f8ef3743007c85a7f 100644 (file)
@@ -37,7 +37,7 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
 //  EVT_CLOSE(wxFrame::OnCloseWindow)
 END_EVENT_TABLE()
 
-IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
+IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
 #endif
 
 #if wxUSE_NATIVE_STATUSBAR
@@ -101,14 +101,15 @@ bool wxFrame::Create(wxWindow *parent,
            long style,
            const wxString& name)
 {
-  SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
+  SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
 
     if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
         return FALSE;
 
   MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
   
-       m_macWindowData->m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
+       m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
+       SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
 
   wxModelessWindows.Append(this);
 
@@ -131,7 +132,8 @@ bool wxFrame::Enable(bool enable)
 
        if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() )
        {
-               for ( int i = 0 ; i < m_frameMenuBar->GetMenuCount() ; ++ i )
+               int iMaxMenu = m_frameMenuBar->GetMenuCount(); 
+               for ( int i = 0 ; i < iMaxMenu ; ++ i )
                {
                        m_frameMenuBar->EnableTop( i , enable ) ;
                }
@@ -170,7 +172,7 @@ void wxFrame::PositionStatusBar()
 // Responds to colour changes, and passes event on to children.
 void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
     Refresh();
 
     if ( m_frameStatusBar )