X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b37c7e1dcdad16c20d9800d2abaf53cc6b653a64..2f4e928794167715f19a3021d62b7c4f77611694:/wxPython/src/helpers.h diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index 62230c6400..318d202842 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -65,7 +65,8 @@ PyObject* wxPyConstructObject(void* ptr, PyObject* klass, int setThisOwn=0); PyObject* wxPyClassExists(const char* className); -PyObject* wxPyMake_wxObject(wxObject* source); +PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=TRUE); +PyObject* wxPyMake_wxSizer(wxSizer* source); void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName); PyObject* wxPy_ConvertList(wxListBase* list, const char* className); @@ -219,22 +220,24 @@ protected: class wxPyEvent : public wxEvent, public wxPyEvtSelfRef { - DECLARE_DYNAMIC_CLASS(wxPyEvent) + DECLARE_ABSTRACT_CLASS(wxPyEvent) public: wxPyEvent(int id=0); + wxPyEvent(const wxPyEvent& evt); ~wxPyEvent(); - void CopyObject(wxObject& dest) const; + virtual wxEvent* Clone() const { return new wxPyEvent(*this); } }; class wxPyCommandEvent : public wxCommandEvent, public wxPyEvtSelfRef { - DECLARE_DYNAMIC_CLASS(wxPyCommandEvent) + DECLARE_ABSTRACT_CLASS(wxPyCommandEvent) public: wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0); + wxPyCommandEvent(const wxPyCommandEvent& evt); ~wxPyCommandEvent(); - void CopyObject(wxObject& dest) const; + virtual wxEvent* Clone() const { return new wxPyCommandEvent(*this); } }; @@ -282,7 +285,8 @@ struct wxPyCoreAPI { void (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh); PyObject* (*p_wxPyClassExists)(const char* className); - PyObject* (*p_wxPyMake_wxObject)(wxObject* source); + PyObject* (*p_wxPyMake_wxObject)(wxObject* source, bool checkEvtHandler); + PyObject* (*p_wxPyMake_wxSizer)(wxSizer* source); void (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName); }; @@ -1388,7 +1392,7 @@ public: #define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \ bool CLASS::CBNAME(Type& a) { \ - bool rv; \ + bool rv=FALSE; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ @@ -1504,7 +1508,7 @@ public: #define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \ bool CLASS::CBNAME(wxMouseEvent& e) { \ - bool rval; \ + bool rval=FALSE; \ bool found; \ wxPyTState* state = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \