IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent)
IMPLEMENT_DYNAMIC_CLASS(wxSetCursorEvent, wxEvent)
IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent)
+ IMPLEMENT_DYNAMIC_CLASS(wxDisplayChangedEvent, wxEvent)
IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxCommandEvent)
IMPLEMENT_DYNAMIC_CLASS(wxNavigationKeyEvent, wxCommandEvent)
IMPLEMENT_DYNAMIC_CLASS(wxPaletteChangedEvent, wxEvent)
DEFINE_EVENT_TYPE(wxEVT_ERASE_BACKGROUND)
DEFINE_EVENT_TYPE(wxEVT_NC_PAINT)
DEFINE_EVENT_TYPE(wxEVT_PAINT_ICON)
-DEFINE_EVENT_TYPE(wxEVT_MENU_CHAR)
-DEFINE_EVENT_TYPE(wxEVT_MENU_INIT)
+DEFINE_EVENT_TYPE(wxEVT_MENU_OPEN)
+DEFINE_EVENT_TYPE(wxEVT_MENU_CLOSE)
DEFINE_EVENT_TYPE(wxEVT_MENU_HIGHLIGHT)
-DEFINE_EVENT_TYPE(wxEVT_POPUP_MENU_INIT)
DEFINE_EVENT_TYPE(wxEVT_CONTEXT_MENU)
DEFINE_EVENT_TYPE(wxEVT_SYS_COLOUR_CHANGED)
+DEFINE_EVENT_TYPE(wxEVT_DISPLAY_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_SETTING_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_QUERY_NEW_PALETTE)
DEFINE_EVENT_TYPE(wxEVT_PALETTE_CHANGED)
{
// 1) Add event to list of pending events of this event handler
+ wxEvent *eventCopy = event.Clone();
+
+ // we must be able to copy the events here so the event class must
+ // implement Clone() properly instead of just providing a NULL stab for it
+ wxCHECK_RET( eventCopy,
+ _T("events of this type aren't supposed to be posted") );
+
#if defined(__VISAGECPP__)
wxENTER_CRIT_SECT( m_eventsLocker);
#else
if ( !m_pendingEvents )
m_pendingEvents = new wxList;
- wxEvent *event2 = event.Clone();
-
- m_pendingEvents->Append(event2);
+ m_pendingEvents->Append(eventCopy);
#if defined(__VISAGECPP__)
wxLEAVE_CRIT_SECT( m_eventsLocker);
info = CLASSINFO(wxWindowMSW);
# elif defined(__WXGTK__)
info = CLASSINFO(wxWindowGTK);
+# elif defined(__WXX11__)
+ info = CLASSINFO(wxWindowX11);
# elif defined(__WXMGL__)
info = CLASSINFO(wxWindowMGL);
# elif defined(__WXPM__)