]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_colour.i
Use a local copy of the old wxBufferedDC classes until the ones in the
[wxWidgets.git] / wxPython / src / _colour.i
index c6ad86aa897494a522a9c71caefb1ed6ecc86182..01ff2d80a0cdd6f259d01d2176f2bfbb6cd5624b 100644 (file)
@@ -30,10 +30,12 @@ public:
     unsigned char Blue();
     bool Ok();
     void Set(unsigned char red, unsigned char green, unsigned char blue);
-    %name(SetRBG) void Set(unsigned long colRGB);
+    %name(SetRGB) void Set(unsigned long colRGB);
 
     bool operator==(const wxColour& colour) const;
-    bool operator != (const wxColour& colour) const;
+    bool operator!=(const wxColour& colour) const;
+
+    void InitFromName(const wxString& colourName);
 
     %extend {
         PyObject* Get() {
@@ -73,17 +75,18 @@ public:
     %pythoncode {
         asTuple = Get
         def __str__(self):                  return str(self.asTuple())
-        def __repr__(self):                 return 'wxColour' + 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())
         }
 };
 
 %pythoncode {
     Color = Colour
-    NamedColor = NamedColour    
+    NamedColor = NamedColour
+    ColorRGB = ColourRGB
 }
+
 //---------------------------------------------------------------------------