]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/mdi.cpp
fixing override, fixes #9985 (second error)
[wxWidgets.git] / src / osx / carbon / mdi.cpp
index 02b33e5cf66cac7f5c7fab87c490e9f01d5371e1..3cd460be7581515ccf67f0a009aac36051bb450f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/mdi.cpp
+// Name:        src/osx/carbon/mdi.cpp
 // Purpose:     MDI classes
 // Author:      Stefan Csomor
 // Modified by:
@@ -50,7 +50,7 @@ static const int IDM_WINDOWTILEVERT = 4005;
 
 void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
 {
-#if 1 // TODO REMOVE
+#if wxOSX_USE_CARBON // TODO REMOVE
     if ( inWindowRef )
     {
 //        bool isHighlighted = IsWindowHighlited( inWindowRef ) ;
@@ -74,6 +74,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
         SetPort( port ) ;
 #endif
     }
+#elif defined(wxOSX_USE_COCOA)
+// TODO: implement me!
 #endif
 }
 
@@ -218,7 +220,7 @@ void wxMDIParentFrame::MacActivate(long timestamp, bool activating)
         {
             wxLogTrace(TRACE_MDI, wxT("child had been scheduled for deactivation, rehighlighting"));
 
-            UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->MacGetWindowRef(), true);
+            UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->GetWXWindow(), true);
 
             wxLogTrace(TRACE_MDI, wxT("finished highliting child"));
 
@@ -382,14 +384,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
     SetName(name);
 
     if ( id == wxID_ANY )
-        m_windowId = (int)NewControlId();
-    else
-        m_windowId = id;
-
-    if (parent)
-        parent->AddChild(this);
+        id = (int)NewControlId();
 
-    MacCreateRealWindow( pos , size , MacRemoveBordersFromStyle(style) , name ) ;
+    wxNonOwnedWindow::Create( parent, id, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
+    
     SetTitle( title );
 
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
@@ -420,7 +418,7 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating)
         {
             wxLogTrace(TRACE_MDI, wxT("parent had been scheduled for deactivation, rehighlighting"));
 
-            UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->MacGetWindowRef(), true);
+            UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->GetWXWindow(), true);
 
             wxLogTrace(TRACE_MDI, wxT("finished highliting parent"));