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 m_isInit
; }
35 unsigned char Red() const { return m_red
; }
36 unsigned char Green() const { return m_green
; }
37 unsigned char Blue() const { return m_blue
; }
40 bool operator == (const wxColour
& colour
) const
42 return (m_isInit
== colour
.m_isInit
43 && m_red
== colour
.m_red
44 && m_green
== colour
.m_green
45 && m_blue
== colour
.m_blue
);
47 bool operator != (const wxColour
& colour
) const { return !(*this == colour
); }
49 const WXCOLORREF
& GetPixel() const { return m_pixel
; };
56 void InitWith( unsigned char red
, unsigned char green
, unsigned char blue
);
62 unsigned char m_green
;
66 void FromRGBColor( const WXCOLORREF
* color
) ;
70 DECLARE_DYNAMIC_CLASS(wxColour
)