1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/colour.h
3 // Purpose: wxColour class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
18 class WXDLLEXPORT wxColour
: public wxColourBase
26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
28 // Copy ctors and assignment operators
29 wxColour(const wxColour
& rCol
);
30 wxColour(const wxColour
* pCol
);
31 wxColour
&operator = (const wxColour
& rCol
);
37 bool IsOk(void) const {return m_bIsInit
; }
39 unsigned char Red(void) const { return m_cRed
; }
40 unsigned char Green(void) const { return m_cGreen
; }
41 unsigned char Blue(void) const { return m_cBlue
; }
44 bool operator == (const wxColour
& rColour
) const
46 return (m_bIsInit
== rColour
.m_bIsInit
47 && m_cRed
== rColour
.m_cRed
48 && m_cGreen
== rColour
.m_cGreen
49 && m_cBlue
== rColour
.m_cBlue
53 bool operator != (const wxColour
& rColour
) const { return !(*this == rColour
); }
55 WXCOLORREF
GetPixel(void) const { return m_vPixel
; };
65 unsigned char m_cBlue
;
66 unsigned char m_cGreen
;
69 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
74 DECLARE_DYNAMIC_CLASS(wxColour
)
75 }; // end of class wxColour