X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/220f2d5c4d561b4ea7dd87a6d972a0e87b9ec558..2f4e928794167715f19a3021d62b7c4f77611694:/wxPython/contrib/ogl/oglbasic.i diff --git a/wxPython/contrib/ogl/oglbasic.i b/wxPython/contrib/ogl/oglbasic.i index 6d66e15caa..7e982eeb31 100644 --- a/wxPython/contrib/ogl/oglbasic.i +++ b/wxPython/contrib/ogl/oglbasic.i @@ -94,8 +94,15 @@ public: void _setCallbackInfo(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeEvtHandler)" + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %addmethods { void Destroy() { delete self; } } + %addmethods { + void _setOORInfo(PyObject* _self) { + self->SetClientObject(new wxPyClientData(_self)); + } + } + void SetShape(wxPyShape *sh); wxPyShape *GetShape(); @@ -147,10 +154,7 @@ public: void _setCallbackInfo(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShape)" - - %addmethods { - void Destroy() { delete self; } - } + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT); void GetBoundingBoxMin(double *OUTPUT, double *OUTPUT); @@ -364,6 +368,8 @@ public: void ClearAttachments(); void Recentre(wxDC& dc); void ClearPointList(wxList& list); + wxPen GetBackgroundPen(); + wxBrush GetBackgroundBrush(); void base_OnDelete(); void base_OnDraw(wxDC& dc);