#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/log.h"
- #include "wx/nonownedwnd.h"
#endif // WX_PRECOMP
+#if wxUSE_GUI
+#include "wx/nonownedwnd.h"
+#endif
+
#include "wx/osx/private.h"
// ============================================================================
QuitApplicationEventLoop();
}
+wxModalEventLoop::wxModalEventLoop(wxWindow *winModal)
+{
+ m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (winModal);
+ wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
+}
+
void wxModalEventLoop::DoRun()
{
wxMacAutoreleasePool autoreleasepool;
[NSApp stop:0];
}
+wxModalEventLoop::wxModalEventLoop(wxWindow *winModal)
+{
+ m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (winModal);
+ wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
+}
+
void wxModalEventLoop::DoRun()
{
wxMacAutoreleasePool pool;
m_shouldExit = true;
DoStop();
}
-
-#if wxUSE_GUI
-
-wxModalEventLoop::wxModalEventLoop(wxWindow *winModal)
-{
- m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (winModal);
- wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
-}
-
-#ifdef __WXOSX_IPHONE__
-
-void wxModalEventLoop::DoRun()
-{
- // presentModalViewController:animated:
-}
-
-void wxModalEventLoop::DoStop()
-{
- // (void)dismissModalViewControllerAnimated:(BOOL)animated
-}
-
-#endif // wxUSE_GUI
-
-#endif
#include "wx/log.h"
+#if wxUSE_GUI
+ #include "wx/nonownedwnd.h"
+#endif
+
#include "wx/osx/private.h"
// ============================================================================
}
}
+wxModalEventLoop::wxModalEventLoop(wxWindow *winModal)
+{
+ m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (winModal);
+ wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
+}
+
+void wxModalEventLoop::DoRun()
+{
+ // presentModalViewController:animated:
+}
+
+void wxModalEventLoop::DoStop()
+{
+ // (void)dismissModalViewControllerAnimated:(BOOL)animated
+}