]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/mdi.cpp
cursors for cocoa
[wxWidgets.git] / src / mac / carbon / mdi.cpp
index f37a4ddab018f0dfd0f2990ff7a411cbcd2abb15..248c03e48c402b0991239f0495f78b83eef37c42 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
-// Licence:       wxWidgets licence
+// Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -233,6 +233,22 @@ void wxMDIParentFrame::ActivatePrevious()
     // TODO
 }
 
+bool wxMDIParentFrame::Show( bool show )
+{
+    if ( !wxFrame::Show(show) )
+        return false;
+
+    // don't really show the MDI frame unless it has any children other than
+    // MDI children as it is pretty useless in this case
+    if ( show )
+    {
+        // TODO: check for other children
+        Move(-10000, -10000);
+    }
+
+    return true;
+}
+
 // Child frame
 
 wxMDIChildFrame::wxMDIChildFrame()
@@ -368,14 +384,8 @@ wxMDIClientWindow::~wxMDIClientWindow()
 
 bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
 {
-    
-    m_windowId = (int)NewControlId();
-    
-    if ( parent )
-    {
-        parent->AddChild(this);
-    }
-    m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
+    if ( !wxWindow::Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, style))
+        return FALSE;
     
     wxModelessWindows.Append(this);
     return TRUE;