1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/colour.h
3 // Purpose: wxColour class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/object.h"
17 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
22 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
24 // Copy ctors and assignment operators
25 wxColour(const wxColour
& rCol
);
26 wxColour(const wxColour
* pCol
);
27 wxColour
&operator = (const wxColour
& rCol
);
33 virtual bool IsOk(void) const { return m_bIsInit
; }
35 unsigned char Red(void) const { return m_cRed
; }
36 unsigned char Green(void) const { return m_cGreen
; }
37 unsigned char Blue(void) const { return m_cBlue
; }
40 bool operator == (const wxColour
& rColour
) const
42 return (m_bIsInit
== rColour
.m_bIsInit
43 && m_cRed
== rColour
.m_cRed
44 && m_cGreen
== rColour
.m_cGreen
45 && m_cBlue
== rColour
.m_cBlue
49 bool operator != (const wxColour
& rColour
) const { return !(*this == rColour
); }
51 WXCOLORREF
GetPixel(void) const { return m_vPixel
; }
61 unsigned char m_cBlue
;
62 unsigned char m_cGreen
;
65 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
70 DECLARE_DYNAMIC_CLASS(wxColour
)
71 }; // end of class wxColour