// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "event.h"
#endif
// MT-FIXME
static int s_lastUsedEventType = wxEVT_FIRST;
-#if WXWIN_COMPATIBILITY_2
- // check that we don't overlap with the user-defined types: if it does
- // happen, the best solution is probably to update the existing code to
- // use wxNewEventType() instead of wxEVT_USER_FIRST
- //
- // due to the uncertainty
- wxASSERT_MSG( s_lastUsedEventType < wxEVT_USER_FIRST - 1,
- _T("possible event type conflict") );
-#endif // WXWIN_COMPATIBILITY_2
-
return s_lastUsedEventType++;
}
m_skipped = FALSE;
m_callbackUserData = (wxObject *) NULL;
m_isCommandEvent = FALSE;
+ m_propagationLevel = wxEVENT_PROPAGATE_NONE;
}
wxEvent::wxEvent(const wxEvent &src)
, m_timeStamp(src.m_timeStamp)
, m_id(src.m_id)
, m_callbackUserData(src.m_callbackUserData)
+ , m_propagationLevel(src.m_propagationLevel)
, m_skipped(src.m_skipped)
, m_isCommandEvent(src.m_isCommandEvent)
{
m_extraLong = 0;
m_commandInt = 0;
m_isCommandEvent = TRUE;
+
+ // the command events are propagated upwards by default
+ m_propagationLevel = wxEVENT_PROPAGATE_MAX;
}
/*
wxUpdateUIMode wxUpdateUIEvent::sm_updateMode = wxUPDATE_UI_PROCESS_ALL;
// Can we update?
-bool wxUpdateUIEvent::CanUpdate(wxWindow* win)
+bool wxUpdateUIEvent::CanUpdate(wxWindowBase *win)
{
// Don't update if we've switched global updating off
// and this window doesn't support updates.
#endif // wxUSE_GUI
+
+#if wxUSE_BASE
+
// ----------------------------------------------------------------------------
// wxEventHashTable
// ----------------------------------------------------------------------------
// wxEvtHandler
// ----------------------------------------------------------------------------
-#if wxUSE_BASE
-
/*
* Event handler
*/
{
// if we have a validator, it has higher priority than our own event
// table
-#if wxUSE_VALIDATORS
if ( TryValidator(event) )
return TRUE;
-#endif // wxUSE_VALIDATORS
// Handle per-instance dynamic event tables first
if ( m_dynamicEvents && SearchDynamicEventTable(event) )
return m_clientData;
}
-
-#if WXWIN_COMPATIBILITY
-bool wxEvtHandler::OnClose()
-{
- if (GetNextHandler())
- return GetNextHandler()->OnClose();
- else
- return FALSE;
-}
-#endif // WXWIN_COMPATIBILITY
-
#endif // wxUSE_BASE
#if wxUSE_GUI