Refactored Python shadows to use wxControlWithItems where appropriate.

Implememted SetClientData for wxControlWithItems.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-10-03 03:32:37 +00:00
parent a068364f32
commit 900d98862d
12 changed files with 817 additions and 1071 deletions

View File

@@ -351,6 +351,29 @@ public:
class wxPyClientData : public wxClientData {
public:
wxPyClientData(PyObject* obj) {
m_obj = obj;
Py_INCREF(m_obj);
}
~wxPyClientData() {
#ifdef wxPyUSE_EXPORT
wxPyTState* state = wxPyCoreAPIPtr->p_wxPyBeginBlockThreads();
Py_DECREF(m_obj);
wxPyCoreAPIPtr->p_wxPyEndBlockThreads(state);
#else
wxPyTState* state = wxPyBeginBlockThreads();
Py_DECREF(m_obj);
wxPyEndBlockThreads(state);
#endif
}
PyObject* m_obj;
};
//---------------------------------------------------------------------------
// These macros are used to implement the virtual methods that should
// redirect to a Python method if one exists. The names designate the