wxMac linking fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2005-12-22 23:04:05 +00:00
parent 2f91e3dfd2
commit 48e5284db6

View File

@@ -42,6 +42,7 @@
#include "wx/thread.h" #include "wx/thread.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/ptr_scpd.h" #include "wx/ptr_scpd.h"
#include "wx/evtloop.h"
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/private.h" // includes windows.h for LOGFONT #include "wx/msw/private.h" // includes windows.h for LOGFONT
@@ -61,7 +62,9 @@ WX_CHECK_BUILD_OPTIONS("wxCore")
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// this defines wxEventLoopPtr // this defines wxEventLoopPtr
#if wxUSE_EVTLOOP_IN_APP
wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoop) wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoop)
#endif
// ============================================================================ // ============================================================================
// wxAppBase implementation // wxAppBase implementation
@@ -463,6 +466,39 @@ void wxAppBase::OnIdle(wxIdleEvent& WXUNUSED(event))
} }
// ----------------------------------------------------------------------------
// exception handling
// ----------------------------------------------------------------------------
#if wxUSE_EXCEPTIONS
void wxAppBase::HandleEvent(wxEvtHandler *handler,
wxEventFunction func,
wxEvent& event) const
{
// by default, call wxApp::OnExceptionInMainLoop if an exception occurs
try
{
handler->DoHandleEvent(func, event);
}
catch ( ... )
{
if ( !wxConstCast(this, wxAppBase)->OnExceptionInMainLoop() )
{
#if wxUSE_EVTLOOP_IN_APP
wxEventLoop *loop = wxEventLoop::GetActive();
if ( loop )
loop->Exit(-1);
#else
wxConstCast(this, wxAppBase)->ExitMainLoop();
#endif
}
//else: continue running the event loop
}
}
#endif // wxUSE_EXCEPTIONS
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxGUIAppTraitsBase // wxGUIAppTraitsBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------