]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/ogl.cpp
Actually check if the menu should be shown before popping it up
[wxWidgets.git] / wxPython / contrib / ogl / ogl.cpp
index 3c74a41f61012dae2df035a54d413111a3e59148..da700b564fce66287702c094d73bb31f25bc5780 100644 (file)
@@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #define SWIG_name    "oglc"
 
-#include "export.h"
+#include "wxPython.h"
 #include "oglhelpers.h"
 
 
@@ -186,6 +186,25 @@ PyObject*  wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
     return target;
 }
 
+//---------------------------------------------------------------------------
+
+PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) {
+    PyObject*   pyList;
+    PyObject*   pyObj;
+    wxObject*   wxObj;
+    wxNode*     node = list->First();
+
+    wxPyBeginBlockThreads();
+    pyList = PyList_New(0);
+    while (node) {
+        wxObj = node->Data();
+        pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
+        PyList_Append(pyList, pyObj);
+        node = node->Next();
+    }
+    wxPyEndBlockThreads();
+    return pyList;
+}
 
 
 //---------------------------------------------------------------------------