]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Tue, 30 Dec 2003 01:53:14 +0000 (01:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 30 Dec 2003 01:53:14 +0000 (01:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/gtk/core.py
wxPython/src/gtk/gdi.py
wxPython/src/msw/core.py
wxPython/src/msw/gdi.py

index 494bcc6d3f79760a2b9b038de566df97e9e24bd8..2ad12d37b143d250281850a85baba749ca2881f8 100644 (file)
@@ -765,9 +765,8 @@ class Size(object):
         elif index == 1: self.height = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Size, self.Get())
 
 
 class SizePtr(Size):
@@ -863,9 +862,8 @@ class RealPoint(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0.0, 0.0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.RealPoint, self.Get())
 
 
 class RealPointPtr(RealPoint):
@@ -977,9 +975,8 @@ class Point(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Point, self.Get())
 
 
 class PointPtr(Point):
@@ -1251,9 +1248,8 @@ class Rect(object):
         elif index == 3: self.height = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0,0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Rect, self.Get())
 
 
 class RectPtr(Rect):
@@ -1425,10 +1421,8 @@ class Point2D(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0.0, 0.0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
-
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Point2D, self.Get())
 
 
 class Point2DPtr(Point2D):
@@ -7103,7 +7097,7 @@ class Sizer(Object):
                 childinfo = (childinfo, )
             self.Add(*childinfo)
 
-
+    # for backwards compatibility only, please do not use in new code
     AddWindow = AddSizer = AddSpacer = Add
     PrependWindow = PrependSizer = PrependSpacer = Prepend
     InsertWindow = InsertSizer = InsertSpacer = Insert
@@ -7486,9 +7480,8 @@ class GBPosition(object):
         elif index == 1: self.SetCol(val)
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.GBPosition, self.Get())
 
     row = property(GetRow, SetRow)
     col = property(GetCol, SetCol)
@@ -7552,9 +7545,8 @@ class GBSpan(object):
         elif index == 1: self.SetColspan(val)
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.GBSpan, self.Get())
 
     rowspan = property(GetRowspan, SetRowspan)
     colspan = property(GetColspan, SetColspan)
index 91b20d7e36c0ffeb83b48b5e6186a8e9298d9c50..0e5450c9d3d40751083b5e53361df5a3570562a9 100644 (file)
@@ -103,9 +103,8 @@ class Colour(core.Object):
     def __str__(self):                  return str(self.asTuple())
     def __repr__(self):                 return 'wx.Colour' + str(self.asTuple())
     def __nonzero__(self):              return self.Ok()
-    def __getinitargs__(self):          return ()
-    def __getstate__(self):             return self.asTuple()
-    def __setstate__(self, state):      self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):               return (Colour, self.Get())
 
 
 class ColourPtr(Colour):
index 55739471d91d32e9a118aebfe8ecad9f4b362a74..f6d719898ed9f8ae3fb23444f832b6d492bce852 100644 (file)
@@ -765,9 +765,8 @@ class Size(object):
         elif index == 1: self.height = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Size, self.Get())
 
 
 class SizePtr(Size):
@@ -863,9 +862,8 @@ class RealPoint(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0.0, 0.0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.RealPoint, self.Get())
 
 
 class RealPointPtr(RealPoint):
@@ -977,9 +975,8 @@ class Point(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Point, self.Get())
 
 
 class PointPtr(Point):
@@ -1251,9 +1248,8 @@ class Rect(object):
         elif index == 3: self.height = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0,0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Rect, self.Get())
 
 
 class RectPtr(Rect):
@@ -1425,10 +1421,8 @@ class Point2D(object):
         elif index == 1: self.y = val
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0.0, 0.0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
-
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.Point2D, self.Get())
 
 
 class Point2DPtr(Point2D):
@@ -7167,7 +7161,7 @@ class Sizer(Object):
                 childinfo = (childinfo, )
             self.Add(*childinfo)
 
-
+    # for backwards compatibility only, please do not use in new code
     AddWindow = AddSizer = AddSpacer = Add
     PrependWindow = PrependSizer = PrependSpacer = Prepend
     InsertWindow = InsertSizer = InsertSpacer = Insert
@@ -7550,9 +7544,8 @@ class GBPosition(object):
         elif index == 1: self.SetCol(val)
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.GBPosition, self.Get())
 
     row = property(GetRow, SetRow)
     col = property(GetCol, SetCol)
@@ -7616,9 +7609,8 @@ class GBSpan(object):
         elif index == 1: self.SetColspan(val)
         else: raise IndexError
     def __nonzero__(self):               return self.Get() != (0,0)
-    def __getinitargs__(self):           return ()
-    def __getstate__(self):              return self.Get()
-    def __setstate__(self, state):       self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):                return (wx.GBSpan, self.Get())
 
     rowspan = property(GetRowspan, SetRowspan)
     colspan = property(GetColspan, SetColspan)
index 6c1afbc475b337faa7b481ef3cc73e9a182806ad..f25c3d4e12621d7e0a51316b29f80e2d27330e36 100644 (file)
@@ -103,9 +103,8 @@ class Colour(core.Object):
     def __str__(self):                  return str(self.asTuple())
     def __repr__(self):                 return 'wx.Colour' + str(self.asTuple())
     def __nonzero__(self):              return self.Ok()
-    def __getinitargs__(self):          return ()
-    def __getstate__(self):             return self.asTuple()
-    def __setstate__(self, state):      self.Set(*state)
+    __safe_for_unpickling__ = True
+    def __reduce__(self):               return (Colour, self.Get())
 
 
 class ColourPtr(Colour):