Avoid using the OOR typemap in the constructors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-07-17 22:51:01 +00:00
parent 14885f0910
commit b39c3fa09a
23 changed files with 131 additions and 12 deletions

View File

@@ -82,15 +82,18 @@ public:
class wxPyShapeEvtHandler : public wxObject {
public:
%pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)"
%typemap(out) wxPyShapeEvtHandler*; // turn off this typemap
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
wxPyShape *shape = NULL);
%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
%extend {
void _setOORInfo(PyObject* _self) {
if (!self->GetClientObject())
self->SetClientObject(new wxPyOORClientData(_self));
self->SetClientObject(new wxPyOORClientData(_self));
}
}
%pythoncode {
@@ -147,9 +150,12 @@ public:
class wxPyShape : public wxPyShapeEvtHandler {
public:
%pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShape)"
%typemap(out) wxPyShape*; // turn off this typemap
wxPyShape(wxPyShapeCanvas *can = NULL);
%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);

View File

@@ -104,13 +104,16 @@ MustHaveApp(wxPyShapeCanvas);
class wxPyShapeCanvas : public wxScrolledWindow {
public:
%pythonAppend wxPyShapeCanvas "self._setOORandCallbackInfo(PyShapeCanvas)"
%typemap(out) wxPyShapeCanvas*; // turn off this typemap
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxPyShapeCanvasNameStr);
%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pythoncode {
def _setOORandCallbackInfo(self, _class):

View File

@@ -538,9 +538,12 @@ public:
class wxPyDivisionShape : public wxPyCompositeShape {
public:
%pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
%typemap(out) wxPyDivisionShape*; // turn off this typemap
wxPyDivisionShape();
%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
void AdjustBottom(double bottom, bool test);