]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some missing constants and fixed GetPoints
authorRobin Dunn <robin@alldunn.com>
Thu, 18 Sep 2003 23:48:29 +0000 (23:48 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 18 Sep 2003 23:48:29 +0000 (23:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/ogl/oglshapes.cpp
wxPython/contrib/ogl/oglshapes.i
wxPython/contrib/ogl/oglshapes.py
wxPython/contrib/ogl/oglshapes2.cpp
wxPython/contrib/ogl/oglshapes2.i

index 27c1bee586596fa53b355da8488fa8c8a8b4f2aa..6575c7a003de3e403b71a9e05d3f2c2673978457 100644 (file)
@@ -12871,6 +12871,8 @@ SWIGEXPORT(void) initoglshapesc() {
         SWIG_globals = SWIG_newvarlink();
         m = Py_InitModule("oglshapesc", oglshapescMethods);
         d = PyModule_GetDict(m);
+        PyDict_SetItemString(d,"oglMETAFLAGS_OUTLINE", PyInt_FromLong((long) oglMETAFLAGS_OUTLINE));
+        PyDict_SetItemString(d,"oglMETAFLAGS_ATTACHMENTS", PyInt_FromLong((long) oglMETAFLAGS_ATTACHMENTS));
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)
index 577061a5e17dde0fc2743a9e40a7c0ea6f75c7a3..6caa193b961f760ecfe9fd46761af3983bb75034 100644 (file)
 %pragma(python) code = "import wx"
 
 //---------------------------------------------------------------------------
+
+enum {
+    oglMETAFLAGS_OUTLINE,
+    oglMETAFLAGS_ATTACHMENTS
+};
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
index 1cbd1eeb8f0984a54a0157f365bf949067b1332e..0bdd20d05aa0c23d237e0d54b4b845637f8ce805 100644 (file)
@@ -1185,3 +1185,5 @@ class wxPyDivisionShape(wxPyDivisionShapePtr):
 
 #-------------- VARIABLE WRAPPERS ------------------
 
+oglMETAFLAGS_OUTLINE = oglshapesc.oglMETAFLAGS_OUTLINE
+oglMETAFLAGS_ATTACHMENTS = oglshapesc.oglMETAFLAGS_ATTACHMENTS
index 52c6257339cf71ab9320f42449cea99a00820dd3..738f59de89b056acc04be28a83db7219ba449907 100644 (file)
@@ -5635,7 +5635,21 @@ static PyObject *_wrap_wxPyPolygonShape_DeletePolygonPoint(PyObject *self, PyObj
 
 static PyObject * wxPyPolygonShape_GetPoints(wxPyPolygonShape *self) {
             wxList* list = self->GetPoints();
-            return wxPy_ConvertList(list, "wxRealPoint");
+            PyObject*   pyList;
+            PyObject*   pyObj;
+            wxObject*   wxObj;
+            wxNode*     node = list->GetFirst();
+
+            wxPyBeginBlockThreads();
+            pyList = PyList_New(0);
+            while (node) {
+                wxObj = node->GetData();
+                pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
+                PyList_Append(pyList, pyObj);
+                node = node->GetNext();
+            }
+            wxPyEndBlockThreads();
+            return pyList;
         }
 static PyObject *_wrap_wxPyPolygonShape_GetPoints(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
index 108a423acde9c5d208223ac86a41f200745a0b8b..a5964d7bc2dc391464b42949a1cad3e279a62b31 100644 (file)
@@ -303,13 +303,26 @@ public:
     %addmethods {
         PyObject* GetPoints() {
             wxList* list = self->GetPoints();
-            return wxPy_ConvertList(list, "wxRealPoint");
+            PyObject*   pyList;
+            PyObject*   pyObj;
+            wxObject*   wxObj;
+            wxNode*     node = list->GetFirst();
+
+            wxPyBeginBlockThreads();
+            pyList = PyList_New(0);
+            while (node) {
+                wxObj = node->GetData();
+                pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
+                PyList_Append(pyList, pyObj);
+                node = node->GetNext();
+            }
+            wxPyEndBlockThreads();
+            return pyList;
         }
     }
 
     void UpdateOriginalPoints();
 
-
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
     void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);