1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/colour.h
3 // Purpose: wxColour class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
16 #include "wx/string.h"
21 class WXDLLEXPORT wxColour
: public wxColourBase
28 wxColour() { Init(); }
29 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
35 bool Ok() const { return IsOk(); }
38 unsigned char Red() const { return m_red
; }
39 unsigned char Green() const { return m_green
; }
40 unsigned char Blue() const { return m_blue
; }
41 unsigned char Alpha() const { return m_alpha
; }
44 bool operator == (const wxColour
& colour
) const
46 return (m_isInit
== colour
.m_isInit
47 && m_red
== colour
.m_red
48 && m_green
== colour
.m_green
49 && m_blue
== colour
.m_blue
50 && m_alpha
== colour
.m_alpha
);
52 bool operator != (const wxColour
& colour
) const { return !(*this == colour
); }
54 const WXCOLORREF
& GetPixel() const { return m_pixel
; };
56 // Mac-specific ctor and assignment operator from the native colour
57 wxColour(const RGBColor
& col
);
58 wxColour
& operator=(const RGBColor
& col
);
66 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
72 unsigned char m_green
;
73 unsigned char m_alpha
;
77 void FromRGBColor( WXCOLORREF
* color
) ;
81 DECLARE_DYNAMIC_CLASS(wxColour
)