]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglshapes2.py
Removed deprecation warnings in OGL and Gizmos
[wxWidgets.git] / wxPython / contrib / ogl / oglshapes2.py
index 2c60be0fc3401ba1202b60a23c7b80ccc89519e0..60d4c2947e9bca6b5df9df506cdf78fd9402cad3 100644 (file)
@@ -9,6 +9,8 @@ from windows import *
 
 from gdi import *
 
+from fonts import *
+
 from clip_dnd import *
 
 from events import *
@@ -143,6 +145,7 @@ class wxPyEllipseShape(wxPyEllipseShapePtr):
         self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyEllipseShape)
+        self._setOORInfo(self)
 
 
 
@@ -245,6 +248,7 @@ class wxPyCircleShape(wxPyCircleShapePtr):
         self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyCircleShape)
+        self._setOORInfo(self)
 
 
 
@@ -253,9 +257,12 @@ class wxArrowHeadPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,oglshapes2c=oglshapes2c):
-        if self.thisown == 1 :
-            oglshapes2c.delete_wxArrowHead(self)
+    def __del__(self, delfunc=oglshapes2c.delete_wxArrowHead):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def _GetType(self, *_args, **_kwargs):
         val = apply(oglshapes2c.wxArrowHead__GetType,(self,) + _args, _kwargs)
         return val
@@ -389,7 +396,7 @@ class wxPyLineShapePtr(wxPyShapePtr):
         return val
     def GetNextControlPoint(self, *_args, **_kwargs):
         val = apply(oglshapes2c.wxPyLineShape_GetNextControlPoint,(self,) + _args, _kwargs)
-        if val: val = wxPointPtr(val) 
+        if val: val = wxRealPointPtr(val) 
         return val
     def GetTo(self, *_args, **_kwargs):
         val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs)
@@ -533,6 +540,7 @@ class wxPyLineShape(wxPyLineShapePtr):
         self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyLineShape)
+        self._setOORInfo(self)
 
 
 
@@ -653,6 +661,7 @@ class wxPyPolygonShape(wxPyPolygonShapePtr):
         self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyPolygonShape)
+        self._setOORInfo(self)
 
 
 
@@ -758,6 +767,7 @@ class wxPyTextShape(wxPyTextShapePtr):
         self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyTextShape)
+        self._setOORInfo(self)