X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14eb37a05eb3741f4c8d9e64b7af45480706cb15..94929e7b60de96bd3b064984ae8995d665329411:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index b2a0fd718f..a358cf0dde 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -416,6 +416,20 @@ wxAppConsoleBase::HandleEvent(wxEvtHandler *handler, (handler->*func)(event); } +void wxAppConsoleBase::CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const +{ + // If the functor holds a method then, for backward compatibility, call + // HandleEvent(): + wxEventFunction eventFunction = functor.GetMethod(); + + if ( eventFunction ) + HandleEvent(handler, eventFunction, event); + else + functor(handler, event); +} + void wxAppConsoleBase::OnUnhandledException() { #ifdef __WXDEBUG__