]> git.saurik.com Git - wxWidgets.git/commitdiff
hack: hide the MDI parent frame by moving it off screen
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 2004 01:51:29 +0000 (01:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 2004 01:51:29 +0000 (01:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/mdi.h
src/mac/carbon/mdi.cpp

index 1e5145e7bc9b815a0362aaab48f14b6b8f4b46c6..bde585e0453eca9e01d3fc55ef245e2a585ceb9e 100644 (file)
@@ -80,6 +80,8 @@ public:
   virtual void ActivateNext();
   virtual void ActivatePrevious();
 
+  virtual bool Show( bool show = true );
+
 protected:
 
   // TODO maybe have this member
index 1cdfc54d3bd8341663b9ccf80307e1a6b92d8b75..248c03e48c402b0991239f0495f78b83eef37c42 100644 (file)
@@ -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()