+
+#define DEC_PYCALLBACK__STRING(CBNAME) \
+ void CBNAME(const wxString& a); \
+ void base_##CBNAME(const wxString& a);
+
+
+#define IMP_PYCALLBACK__STRING(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(const wxString& a) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \
+ else \
+ PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(const wxString& a) { \
+ PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_STRING(CBNAME) \
+ bool CBNAME(const wxString& a); \
+ bool base_##CBNAME(const wxString& a);
+
+
+#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(const wxString& a) { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \
+ else \
+ rval = PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a) { \
+ return PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_STRINGSTRING(CBNAME) \
+ bool CBNAME(const wxString& a, const wxString& b); \
+ bool base_##CBNAME(const wxString& a, const wxString& b);
+
+
+#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(ss)", \
+ a.c_str(), b.c_str())); \
+ else \
+ rval = PCLASS::CBNAME(a, b); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a, const wxString& b) { \
+ return PCLASS::CBNAME(a, b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_STRING_(CBNAME) \
+ wxString CBNAME(); \
+ wxString base_##CBNAME();
+
+
+#define IMP_PYCALLBACK_STRING_(CLASS, PCLASS, CBNAME) \
+ wxString CLASS::CBNAME() { \
+ wxString rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) { \
+ PyObject* ro; \
+ ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
+ rval = PyString_AsString(PyObject_Str(ro)); \
+ } \
+ else \
+ rval = PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a) { \
+ return PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_STRING__pure(CBNAME) \
+ wxString CBNAME();
+
+
+#define IMP_PYCALLBACK_STRING__pure(CLASS, PCLASS, CBNAME) \
+ wxString CLASS::CBNAME() { \
+ wxString rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) { \
+ PyObject* ro; \
+ ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
+ rval = PyString_AsString(PyObject_Str(ro)); \
+ } \
+ wxPySaveThread(doSave); \
+ return rval; \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_TAG_pure(CBNAME) \
+ bool CBNAME(const wxHtmlTag& a); \
+
+
+#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(const wxHtmlTag& a) { \
+ bool rval = false; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(O)", \
+ wxPyConstructObject((void*)&a,"wxHtmlTag"))); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK___pure(CBNAME) \
+ void CBNAME(); \
+
+
+#define IMP_PYCALLBACK___pure(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME() { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("()")); \
+ wxPySaveThread(doSave); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_wxSize__pure(CBNAME) \
+ wxSize CBNAME(); \
+
+
+#define IMP_PYCALLBACK_wxSize__pure(CLASS, PCLASS, CBNAME) \
+ wxSize CLASS::CBNAME() { \
+ wxSize rval(0,0); \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) { \
+ PyObject* ro; \
+ wxSize* ptr; \
+ ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
+ if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) \
+ rval = *ptr; \
+ } \
+ wxPySaveThread(doSave); \
+ return rval; \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_WXWIN(CBNAME) \
+ bool CBNAME(wxWindow* a); \
+ bool base_##CBNAME(wxWindow* a);
+
+
+#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(wxWindow* a) { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(O)", \
+ wxPyConstructObject((void*)a,"wxWindow"))); \
+ else \
+ rval = PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(wxWindow* a) { \
+ return PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_(CBNAME) \
+ bool CBNAME(); \
+ bool base_##CBNAME();
+
+
+#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME() { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("()")); \
+ else \
+ rval = PCLASS::CBNAME(); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME() { \
+ return PCLASS::CBNAME(); \
+ }
+
+//---------------------------------------------------------------------------