added/documented wxApp::FilterEvent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-05-09 17:21:02 +00:00
parent c11d62a6e2
commit 9154d8cfff
4 changed files with 49 additions and 3 deletions

View File

@@ -744,12 +744,32 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
info = CLASSINFO(wxWindow);
#endif
wxASSERT_MSG( m_isWindow == IsKindOf(info),
wxString(GetClassInfo()->GetClassName()) + _T(" should [not] be a window but it is [not]") );
#endif
if ( m_isWindow != IsKindOf(info) )
{
wxString msg = GetClassInfo()->GetClassName();
msg += _T(" should [not] be a window but it is [not]");
wxFAIL_MSG( msg );
}
#endif // __WXDEBUG__
#endif // wxUSE_GUI
// allow the application to hook into event processing
if ( wxTheApp )
{
int rc = wxTheApp->FilterEvent(event);
if ( rc != -1 )
{
wxASSERT_MSG( rc == 1 || rc == 0,
_T("unexpected wxApp::FilterEvent return value") );
return rc != 0;
}
//else: proceed normally
}
// An event handler can be enabled or disabled
if ( GetEvtHandlerEnabled() )
{