1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/cocoa/dialog.cpp
3 // Purpose: wxDialog class
4 // Author: Stefan Csomor
7 // RCS-ID: $Id: dialog.cpp 54820 2008-07-29 20:04:11Z SC $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #include "wx/dialog.h"
20 #include "wx/settings.h"
23 #include "wx/osx/private.h"
25 extern wxList wxModalDialogs;
27 void wxDialog::ShowWindowModal()
31 void wxDialog::EndWindowModal()
35 void wxDialog::DoShowModal()
37 wxCHECK_RET( !IsModal(), wxT("DoShowModal() called twice") );
39 wxModalDialogs.Append(this);
43 WindowGroupRef windowGroup;
44 WindowGroupRef formerParentGroup;
45 bool resetGroupParent = false;
47 if ( GetParent() == NULL )
49 windowGroup = GetWindowGroup(windowRef) ;
50 formerParentGroup = GetWindowGroupParent( windowGroup );
51 SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) );
52 resetGroupParent = true;
57 if ( resetGroupParent )
59 SetWindowGroupParent( windowGroup , formerParentGroup );