+ wxWindowCreateEvent(wxWindow *win = NULL);
+
+ wxWindow *GetWindow();
+};
+
+class wxWindowDestroyEvent : public wxEvent {
+public:
+ wxWindowDestroyEvent(wxWindow *win = NULL);
+
+ wxWindow *GetWindow();
+};
+
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+// This one can be derived from in Python and passed through the event
+// system without loosing anything so long as the Python data is saved with
+// SetPyData...
+
+%{
+class wxPyEvent : public wxEvent {
+ DECLARE_DYNAMIC_CLASS(wxPyEvent)
+public:
+ wxPyEvent(int id=0, PyObject* userData = Py_None)
+ : wxEvent(id) {
+ m_userData = userData;
+ Py_INCREF(m_userData);
+ }
+
+ ~wxPyEvent() {
+ bool doSave = wxPyRestoreThread();
+ Py_DECREF(m_userData);
+ wxPySaveThread(doSave);
+ }
+
+ void SetPyData(PyObject* userData) {
+ bool doSave = wxPyRestoreThread();
+ Py_DECREF(m_userData);
+ m_userData = userData;
+ Py_INCREF(m_userData);
+ wxPySaveThread(doSave);
+ }
+
+ PyObject* GetPyData() const {
+ Py_INCREF(m_userData);
+ return m_userData;
+ }
+
+ // This one is so the event object can be Cloned...
+ void CopyObject(wxObject& dest) const {
+ wxEvent::CopyObject(dest);
+ ((wxPyEvent*)&dest)->SetPyData(m_userData);
+ }
+
+private:
+ PyObject* m_userData;
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxPyEvent, wxEvent)
+
+%}
+
+
+class wxPyEvent : public wxEvent {
+public:
+ wxPyEvent(int id=0, PyObject* userData = Py_None);
+ ~wxPyEvent();
+
+ void SetPyData(PyObject* userData);
+ PyObject* GetPyData();