Add wxEventFilter and related functionality.
Allow defining event filters to globally pre-process all application events without having to override wxApp::FilterEvent(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -150,10 +150,14 @@ wxAppConsoleBase::wxAppConsoleBase()
|
||||
wxDELETE(m_traits);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wxEvtHandler::AddFilter(this);
|
||||
}
|
||||
|
||||
wxAppConsoleBase::~wxAppConsoleBase()
|
||||
{
|
||||
wxEvtHandler::RemoveFilter(this);
|
||||
|
||||
// we're being destroyed and using this object from now on may not work or
|
||||
// even crash so don't leave dangling pointers to it
|
||||
ms_appInstance = NULL;
|
||||
@@ -401,7 +405,7 @@ bool wxAppConsoleBase::IsMainLoopRunning()
|
||||
int wxAppConsoleBase::FilterEvent(wxEvent& WXUNUSED(event))
|
||||
{
|
||||
// process the events normally by default
|
||||
return -1;
|
||||
return Event_Skip;
|
||||
}
|
||||
|
||||
void wxAppConsoleBase::DelayPendingEventHandler(wxEvtHandler* toDelay)
|
||||
|
||||
Reference in New Issue
Block a user