]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglshapes.i
added wxAppTraits::CreateRenderer() which may be used to customize the renderer
[wxWidgets.git] / wxPython / contrib / ogl / oglshapes.i
index 6beaa08a41065f42a5b1e31a4e86e26d3d209dd7..e3e3c114d5fdb7a24b162d1f4af1103b4f548a9e 100644 (file)
@@ -14,7 +14,7 @@
 %module oglshapes
 
 %{
-#include "export.h"
+#include "wxPython.h"
 #include "oglhelpers.h"
 %}
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
-class wxPseudoMetaFile {
+class wxPseudoMetaFile : public wxObject {
 public:
   wxPseudoMetaFile();
   ~wxPseudoMetaFile();
 
     void Draw(wxDC& dc, double xoffset, double yoffset);
-
+#ifdef wxUSE_PROLOGIO
     void WriteAttributes(wxExpr *clause, int whichAngle);
     void ReadAttributes(wxExpr *clause, int whichAngle);
+#endif
     void Clear();
     void Copy(wxPseudoMetaFile& copy);
     void Scale(double sx, double sy);
     void ScaleTo(double w, double h);
     void Translate(double x, double y);
     void Rotate(double x, double y, double theta);
-    bool LoadFromMetaFile(char* filename, double *width, double *height);
+    bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
     void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
-    void CalculateSize(wxDrawnShape* shape);
+    void CalculateSize(wxPyDrawnShape* shape);
 
     // ****  fix these...  is it even possible?  these are lists of various GDI opperations (not the objects...)
     // wxList& GetOutlineColours();
@@ -108,8 +109,9 @@ class wxPyRectangleShape : public wxPyShape {
 public:
     wxPyRectangleShape(double width = 0.0, double height = 0.0);
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyRectangleShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void SetCornerRadius(double radius);
 
@@ -158,8 +160,9 @@ public:
                      double size = 0.0, double the_xoffset = 0.0,
                      double the_yoffset = 0.0, int the_type = 0);
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyControlPoint)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void SetCornerRadius(double radius);
 
@@ -205,8 +208,9 @@ class wxPyBitmapShape : public wxPyRectangleShape {
 public:
     wxPyBitmapShape();
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyBitmapShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     wxBitmap& GetBitmap();
     wxString GetFilename();
@@ -254,8 +258,9 @@ class wxPyDrawnShape : public wxPyRectangleShape {
 public:
     wxPyDrawnShape();
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDrawnShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void CalculateSize();
     void DestroyClippingRect();
@@ -276,7 +281,7 @@ public:
     wxPseudoMetaFile& GetMetaFile();
 
     double GetRotation();
-    bool LoadFromMetaFile(char * filename);
+    bool LoadFromMetaFile(const wxString& filename);
     void Rotate(double x, double y, double theta);
     void SetClippingRect(const wxRect& rect);
     void SetDrawnBackgroundColour(const wxColour& colour);
@@ -326,7 +331,7 @@ public:
 
 //---------------------------------------------------------------------------
 
-class wxOGLConstraint  {
+class wxOGLConstraint : public wxObject {
 public:
     //wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
     %addmethods {
@@ -337,7 +342,8 @@ public:
             return rv;
         }
     }
-    ~wxOGLConstraint();
+
+    //~wxOGLConstraint();  The wxCompositShape takes ownership of the constraint
 
     bool Evaluate();
     void SetSpacing(double x, double y);
@@ -357,8 +363,9 @@ class wxPyCompositeShape : public wxPyRectangleShape {
 public:
     wxPyCompositeShape();
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyCompositeShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
 
@@ -402,7 +409,7 @@ public:
 
         PyObject* GetDivisions() {
             wxList& list = self->GetDivisions();
-            return wxPy_ConvertList(&list, "wxPyDivisionShape");
+            return wxPy_ConvertShapeList(&list, "wxPyDivisionShape");
         }
     }
 
@@ -455,8 +462,9 @@ class wxPyDividedShape : public wxPyRectangleShape {
 public:
     wxPyDividedShape(double width = 0.0, double height = 0.0);
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDividedShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void EditRegions();
     void SetRegionSizes();
@@ -504,8 +512,9 @@ class wxPyDivisionShape : public wxPyCompositeShape {
 public:
     wxPyDivisionShape();
 
-    void _setSelf(PyObject* self, PyObject* _class);
-    %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDivisionShape)"
+    void _setCallbackInfo(PyObject* self, PyObject* _class);
+    %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AdjustBottom(double bottom, bool test);
     void AdjustLeft(double left, bool test);