]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/colour.cpp
Fixed uninstalled toolbars in native toolbar mode, with a method for
[wxWidgets.git] / src / mac / carbon / colour.cpp
index 6a3562c3d43f2f33cff8fd3166bb6e9eac853559..d752b70530579cb57e3fe62123e151a8de88f3dd 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
 
-static void wxComposeRGBColor( WXCOLORREF* color , int red, int blue, int green );
+wxColour::wxColour(const RGBColor& col)
+{
+    FromRGBColor((WXCOLORREF *)&col);
+}
+
 static void wxComposeRGBColor( WXCOLORREF* color , int red, int blue, int green )
 {
     RGBColor* col = (RGBColor*) color;
@@ -64,6 +68,12 @@ void wxColour::FromRGBColor( WXCOLORREF* color )
     m_green = col->green >> 8;
 }
 
+wxColour& wxColour::operator=(const RGBColor& col)
+{
+    FromRGBColor((WXCOLORREF *)&col);
+    return *this;
+}
+
 bool wxColour::IsOk() const 
 {
     return m_isInit;