]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglcanvas.i
use specific linker flags under Mac OS X when linking executables against the
[wxWidgets.git] / wxPython / contrib / ogl / oglcanvas.i
index 88ed4a4345034989dfb2cf53b17f4341bcb6ee74..a2dd8f59b8d08ce87fe51c7f7e846075d6cc6f8d 100644 (file)
@@ -31,7 +31,7 @@
 
 %include _ogldefs.i
 
-%extern oglbasic.i
+%import oglbasic.i
 
 
 %pragma(python) code = "import wx"
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
-class wxDiagram {
+class wxDiagram : public wxObject {
 public:
     wxDiagram();
-    ~wxDiagram();
+    //~wxDiagram();
 
-    void AddShape(wxPyShape*shape, wxPyShape *addAfter = NULL);
+    void AddShape(wxPyShape* shape, wxPyShape *addAfter = NULL);
     void Clear(wxDC& dc);
     void DeleteAllShapes();
     void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2);
@@ -59,7 +59,7 @@ public:
     %addmethods {
         PyObject* GetShapeList() {
             wxList* list = self->GetShapeList();
-            return wxPy_ConvertList(list, "wxPyShape");
+            return wxPy_ConvertShapeList(list, "wxPyShape");
         }
     }
 
@@ -91,7 +91,7 @@ public:
     void SetQuickEditMode(bool mode);
     void SetSnapToGrid(bool snap);
     void ShowAll(bool show);
-    void Snap(double *OUTPUT, double *OUTPUT);
+    void Snap(double *INOUT, double *INOUT);
 
 };
 
@@ -116,11 +116,9 @@ public:
                     const wxSize& size = wxDefaultSize,
                     long style = wxBORDER);
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeCanvas)"
-
-    %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
-    %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeCanvas)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL);
 
@@ -147,7 +145,13 @@ public:
     void Redraw(wxDC& dc);
     void RemoveShape(wxPyShape *shape);
     void SetDiagram(wxDiagram *diagram);
-    void Snap(double *OUTPUT, double *OUTPUT);
+    void Snap(double *INOUT, double *INOUT);
+
+
+    %pragma(python) addtoclass = "
+    def GetShapeList(self):
+        return self.GetDiagram().GetShapeList()
+    "
 
 };