]>
Commit | Line | Data |
---|---|---|
0c2dc57d SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/osx/cocoa/dialog.cpp | |
3 | // Purpose: wxDialog class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id: dialog.cpp 54820 2008-07-29 20:04:11Z SC $ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include "wx/wxprec.h" | |
13 | ||
14 | #include "wx/dialog.h" | |
15 | ||
16 | #ifndef WX_PRECOMP | |
17 | #include "wx/app.h" | |
18 | #include "wx/utils.h" | |
19 | #include "wx/frame.h" | |
20 | #include "wx/settings.h" | |
21 | #endif // WX_PRECOMP | |
22 | ||
23 | #include "wx/osx/private.h" | |
24 | ||
25 | extern wxList wxModalDialogs; | |
26 | ||
44f97e64 | 27 | void wxDialog::DoShowWindowModal() |
f0d454bd | 28 | { |
44f97e64 SC |
29 | m_modality = wxDIALOG_MODALITY_APP_MODAL; |
30 | ShowModal(); | |
31 | SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); | |
f0d454bd SC |
32 | } |
33 | ||
34 | void wxDialog::EndWindowModal() | |
35 | { | |
36 | } | |
37 | ||
0c2dc57d SC |
38 | void wxDialog::DoShowModal() |
39 | { | |
40 | wxCHECK_RET( !IsModal(), wxT("DoShowModal() called twice") ); | |
41 | ||
42 | wxModalDialogs.Append(this); | |
43 | ||
44 | SetFocus() ; | |
45 | /* | |
46 | WindowGroupRef windowGroup; | |
47 | WindowGroupRef formerParentGroup; | |
48 | bool resetGroupParent = false; | |
49 | ||
50 | if ( GetParent() == NULL ) | |
51 | { | |
52 | windowGroup = GetWindowGroup(windowRef) ; | |
53 | formerParentGroup = GetWindowGroupParent( windowGroup ); | |
54 | SetWindowGroupParent( windowGroup, GetWindowGroupOfClass( kMovableModalWindowClass ) ); | |
55 | resetGroupParent = true; | |
56 | } | |
57 | */ | |
58 | ||
59 | /* | |
60 | if ( resetGroupParent ) | |
61 | { | |
62 | SetWindowGroupParent( windowGroup , formerParentGroup ); | |
63 | } | |
64 | */ | |
65 | } |