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"
19 class WXDLLEXPORT wxColour
: public wxColourBase
26 wxColour() { Init(); }
27 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
33 bool Ok() const { return IsOk(); }
36 unsigned char Red() const { return m_red
; }
37 unsigned char Green() const { return m_green
; }
38 unsigned char Blue() const { return m_blue
; }
39 unsigned char Alpha() const { return m_alpha
; }
42 bool operator == (const wxColour
& colour
) const
44 return (m_isInit
== colour
.m_isInit
45 && m_red
== colour
.m_red
46 && m_green
== colour
.m_green
47 && m_blue
== colour
.m_blue
48 && m_alpha
== colour
.m_alpha
);
50 bool operator != (const wxColour
& colour
) const { return !(*this == colour
); }
52 const WXCOLORREF
& GetPixel() const { return m_pixel
; };
60 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
66 unsigned char m_green
;
67 unsigned char m_alpha
;
71 void FromRGBColor( WXCOLORREF
* color
) ;
75 DECLARE_DYNAMIC_CLASS(wxColour
)