Is there are a global API to get the top of event stack or something? TBH wxWidgets is oftentimes a pain the neck
I'm mostly curious, since I can do some casting magic.
Code: Select all
void
wxAppConsoleBase::HandleEvent(wxEvtHandler *handler,
wxEventFunction func,
wxEvent& event) const
{
// by default, simply call the 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.GetEvtMethod();
if ( eventFunction )
HandleEvent(handler, eventFunction, event);
else
functor(handler, event);
}