#include "wx/app.h"
#include "wx/utils.h"
#include "wx/stopwatch.h"
+ #include "wx/module.h"
#if wxUSE_GUI
#include "wx/control.h"
#endif // wxUSE_GUI
#endif
-#include "wx/module.h"
-
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxHelpEvent, wxCommandEvent)
IMPLEMENT_DYNAMIC_CLASS(wxContextMenuEvent, wxCommandEvent)
IMPLEMENT_DYNAMIC_CLASS(wxMouseCaptureChangedEvent, wxEvent)
+ IMPLEMENT_DYNAMIC_CLASS(wxMouseCaptureLostEvent, wxEvent)
IMPLEMENT_DYNAMIC_CLASS(wxClipboardTextEvent, wxCommandEvent)
#endif // wxUSE_GUI
DEFINE_EVENT_TYPE(wxEVT_ICONIZE)
DEFINE_EVENT_TYPE(wxEVT_MAXIMIZE)
DEFINE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_CHANGED)
+DEFINE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_LOST)
DEFINE_EVENT_TYPE(wxEVT_PAINT)
DEFINE_EVENT_TYPE(wxEVT_ERASE_BACKGROUND)
DEFINE_EVENT_TYPE(wxEVT_NC_PAINT)
m_eventsLocker = new wxCriticalSection;
# endif
#endif
+
// no client data (yet)
m_clientData = NULL;
m_clientDataType = wxClientData_None;
void wxEvtHandler::ProcessPendingEvents()
{
- // this method is only called by wxApp if this handler does have pending
- // events
+ // this method is only called by wxApp if this handler does have
+ // pending events
wxCHECK_RET( m_pendingEvents,
wxT("Please call wxApp::ProcessPendingEvents() instead") );
-
+
wxENTER_CRIT_SECT( Lock() );
// we leave the loop once we have processed all events that were present at
// It's importan we remove event from list before processing it.
// Else a nested event loop, for example from a modal dialog, might
// process the same event again.
+
m_pendingEvents->Erase(node);
wxLEAVE_CRIT_SECT( Lock() );
ProcessEvent(*event);
+
delete event;
wxENTER_CRIT_SECT( Lock() );