]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglshapes2.i
Delete help text entry before adding new one, else
[wxWidgets.git] / wxPython / contrib / ogl / oglshapes2.i
index e47480420cc22c2877740a7639c605490cae4289..2cb69e5a437f821150343f8d72e897b532e92558 100644 (file)
@@ -14,7 +14,7 @@
 %module oglshapes2
 
 %{
-#include "export.h"
+#include "wxPython.h"
 #include "oglhelpers.h"
 %}
 
 %pragma(python) code = "import wx"
 
 //---------------------------------------------------------------------------
+
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    static const wxString wxPyEmptyString(wxT(""));
+%}
+
 //---------------------------------------------------------------------------
+
 %{
     WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape);
 %}
@@ -49,6 +56,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyEllipseShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
@@ -92,6 +100,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCircleShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
@@ -131,7 +140,7 @@ public:
                 int end = 0,
                 double size = 0.0,
                 double dist = 0.0,
-                const char * name = "",
+                const wxString& name = wxPyEmptyString,
                 wxPseudoMetaFile *mf = NULL,
                 long arrowId = -1);
     ~wxArrowHead();
@@ -164,10 +173,11 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyLineShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AddArrow(int type, int end = ARROW_POSITION_END,
                   double arrowSize = 10.0, double xOffset = 0.0,
-                  char* name = "", wxPseudoMetaFile *mf = NULL,
+                  const wxString& name = wxPyEmptyString, wxPseudoMetaFile *mf = NULL,
                   long arrowId = -1);
 
     //void AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end);
@@ -211,7 +221,7 @@ public:
     %addmethods {
         PyObject* GetLineControlPoints() {
             wxList* list = self->GetLineControlPoints();
-            return wxPy_ConvertList(list, "wxPyControlPoint");
+            return wxPy_ConvertShapeList(list, "wxPyControlPoint");
         }
     }
 
@@ -269,6 +279,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPolygonShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 
     // void Create(wxList* points);
@@ -340,6 +351,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyTextShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 
     void base_OnDelete();