From 29e92efbe7f6d97ed4c089297228d3475bec5353 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 1 Oct 2004 01:51:29 +0000 Subject: [PATCH] hack: hide the MDI parent frame by moving it off screen git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/mdi.h | 2 ++ src/mac/carbon/mdi.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/wx/mac/carbon/mdi.h b/include/wx/mac/carbon/mdi.h index 1e5145e7bc..bde585e045 100644 --- a/include/wx/mac/carbon/mdi.h +++ b/include/wx/mac/carbon/mdi.h @@ -80,6 +80,8 @@ public: virtual void ActivateNext(); virtual void ActivatePrevious(); + virtual bool Show( bool show = true ); + protected: // TODO maybe have this member diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index 1cdfc54d3b..248c03e48c 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -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() -- 2.45.2