]> git.saurik.com Git - wxWidgets.git/blame - src/osx/cocoa/dialog.mm
Add EnableHistory support to the OSX WebKit backend.
[wxWidgets.git] / src / osx / cocoa / dialog.mm
CommitLineData
fb8dcb05 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/osx/cocoa/dialog.mm
fb8dcb05
SC
3// Purpose: wxDialog class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
a9a4f229 7// RCS-ID: $Id$
fb8dcb05
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
25extern wxList wxModalDialogs;
26
4d572a2c 27void wxDialog::DoShowWindowModal()
9482c644
KO
28{
29 wxTopLevelWindow* parent = static_cast<wxTopLevelWindow*>(wxGetTopLevelParent(GetParent()));
30
31 wxASSERT_MSG(parent, "ShowWindowModal requires the dialog to have a parent.");
32
33 NSWindow* parentWindow = parent->GetWXWindow();
34 NSWindow* theWindow = GetWXWindow();
f44af1dc 35
9482c644
KO
36 [NSApp beginSheet: theWindow
37 modalForWindow: parentWindow
38 modalDelegate: theWindow
39 didEndSelector: nil
40 contextInfo: nil];
41}
42
43void wxDialog::EndWindowModal()
44{
45 [NSApp endSheet: GetWXWindow()];
779a4d41 46 [GetWXWindow() orderOut:GetWXWindow()];
9482c644 47}