]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_colour.i
reSWIGged
[wxWidgets.git] / wxPython / src / _colour.i
index d7557387a0b4512b63881fe69e0b23c0e9308d21..55af312eef71f5b013daaa6b487f316b90c217da 100644 (file)
@@ -30,11 +30,13 @@ 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;
 
+    void InitFromName(const wxString& colourName);
+
     %extend {
         PyObject* Get() {
             PyObject* rv = PyTuple_New(3);
@@ -73,7 +75,7 @@ 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()
@@ -81,5 +83,9 @@ public:
         }
 };
 
+%pythoncode {
+    Color = Colour
+    NamedColor = NamedColour    
+}
 //---------------------------------------------------------------------------