%module oglcanvas
%{
-#include "export.h"
+#include "wxPython.h"
#include "oglhelpers.h"
%}
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
+%{
+ // Put some wx default wxChar* values into wxStrings.
+ DECLARE_DEF_STRING(ShapeCanvasNameStr);
+%}
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
%addmethods {
PyObject* GetShapeList() {
wxList* list = self->GetShapeList();
- return wxPy_ConvertList(list, "wxPyShape");
+ return wxPy_ConvertShapeList(list, "wxPyShape");
}
}
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxBORDER);
+ long style = wxBORDER,
+ const wxString& name = wxPyShapeCanvasNameStr);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeCanvas)"
void SetDiagram(wxDiagram *diagram);
void Snap(double *INOUT, double *INOUT);
+
+ %pragma(python) addtoclass = "
+ def GetShapeList(self):
+ return self.GetDiagram().GetShapeList()
+ "
+
};