]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/modules/ogl/oglshapes.i
small change to avoid floating point exception in wxScrolledWindow::Scroll
[wxWidgets.git] / utils / wxPython / modules / ogl / oglshapes.i
index 316d90a4c653ea8384b11dcae131ed2a64544d56..6ccecfb1de0f75c9dae7edcba30b0244e92735db 100644 (file)
@@ -331,7 +331,7 @@ public:
     //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
     %addmethods {
         wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
-            wxList* list = wxPy_wxListHelper(constrained, "wxPyShape");
+            wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
             wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
             delete list;
             return rv;
@@ -364,10 +364,19 @@ public:
 
     wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
 
-    // **** Needs a typemap
+
     //wxOGLConstraint * AddConstraint(int type,
     //                                wxPyShape *constraining,
     //                                wxList& constrained);
+    %addmethods {
+        wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
+                                               PyObject* constrained) {
+            wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
+            wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
+            delete list;
+            return rv;
+        }
+    }
 
     %name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
                                                              wxPyShape *constraining,