X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64e8a1f072f09865b57ce399fa4401009e08d314..ef22e3d35e23237cb616e420951f5da8c46c0200:/wxPython/src/_gdicmn.i diff --git a/wxPython/src/_gdicmn.i b/wxPython/src/_gdicmn.i index 10e869f038..4bbbe4a686 100644 --- a/wxPython/src/_gdicmn.i +++ b/wxPython/src/_gdicmn.i @@ -130,6 +130,11 @@ public: ~wxSize(); +// %extend { +// bool __eq__(const wxSize* other) { return other ? (*self == *other) : False; } +// bool __ne__(const wxSize* other) { return other ? (*self != *other) : True; } +// } + DocDeclStr( bool, operator==(const wxSize& sz), "Test for equality of wx.Size objects."); @@ -192,9 +197,8 @@ public: 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()) } }; @@ -267,9 +271,8 @@ public: 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()) } }; @@ -303,11 +306,18 @@ public: bool, operator!=(const wxPoint& pt), "Test for inequality of wx.Point objects."); + + +// %nokwargs operator+; +// %nokwargs operator-; +// %nokwargs operator+=; +// %nokwargs operator-=; DocDeclStr( wxPoint, operator+(const wxPoint& pt), "Add pt's proprties to this and return the result."); + DocDeclStr( wxPoint, operator-(const wxPoint& pt), "Subtract pt's proprties from this and return the result"); @@ -321,6 +331,27 @@ public: wxPoint&, operator-=(const wxPoint& pt), "Subtract pt from this object."); + + +// DocDeclStr( +// wxPoint, operator+(const wxSize& sz), +// "Add sz to this Point and return the result."); + +// DocDeclStr( +// wxPoint, operator-(const wxSize& sz), +// "Subtract sz from this Point and return the result"); + + +// DocDeclStr( +// wxPoint&, operator+=(const wxSize& sz), +// "Add sz to this object."); + +// DocDeclStr( +// wxPoint&, operator-=(const wxSize& sz), +// "Subtract sz from this object."); + + + %extend { DocStr(Set, "Set both the x and y properties"); @@ -353,9 +384,8 @@ public: 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()) } }; @@ -526,9 +556,8 @@ public: 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()) } }; @@ -654,10 +683,8 @@ public: 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()) } };