X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa8bc37bc20613e53136f26882aee31e11bef131..bf7bd4b18521e52b4c6651a974e5f43a0101f71b:/include/wx/mac/carbon/colour.h diff --git a/include/wx/mac/carbon/colour.h b/include/wx/mac/carbon/colour.h index 24bdf83813..b024afe218 100644 --- a/include/wx/mac/carbon/colour.h +++ b/include/wx/mac/carbon/colour.h @@ -15,6 +15,8 @@ #include "wx/object.h" #include "wx/string.h" +struct RGBColor; + // Colour class WXDLLEXPORT wxColour: public wxColourBase { @@ -27,10 +29,11 @@ public: DEFINE_STD_WXCOLOUR_CONSTRUCTORS // dtor - ~wxColour(); + virtual ~wxColour(); // accessors - bool Ok() const {return m_isInit; } + bool Ok() const { return IsOk(); } + bool IsOk() const; unsigned char Red() const { return m_red; } unsigned char Green() const { return m_green; } @@ -50,17 +53,17 @@ public: const WXCOLORREF& GetPixel() const { return m_pixel; }; + // Mac-specific ctor and assignment operator from the native colour + wxColour(const RGBColor& col); + wxColour& operator=(const RGBColor& col); + protected : // Helper function void Init(); - void InitWith( unsigned char red, unsigned char green, unsigned char blue ) - { - InitWith( red, green, blue , 255) ; - } - - void InitWith( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha ); + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); private: bool m_isInit; @@ -71,8 +74,8 @@ private: public: WXCOLORREF m_pixel ; - void FromRGBColor( const WXCOLORREF* color ) ; - + void FromRGBColor( WXCOLORREF* color ) ; + private: DECLARE_DYNAMIC_CLASS(wxColour)