1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GENERIC_COLOUR_H_
12 #define _WX_GENERIC_COLOUR_H_
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
& col
)
30 wxColour
& operator=(const wxColour
& col
);
33 virtual bool IsOk() 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
; }
38 unsigned char Alpha() const { return m_alpha
; }
41 bool operator==(const wxColour
& colour
) const
43 return (m_red
== colour
.m_red
&&
44 m_green
== colour
.m_green
&&
45 m_blue
== colour
.m_blue
&&
46 m_alpha
== colour
.m_alpha
&&
47 m_isInit
== colour
.m_isInit
);
50 bool operator!=(const wxColour
& colour
) const { return !(*this == colour
); }
58 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
64 unsigned char m_green
;
65 unsigned char m_alpha
;
68 DECLARE_DYNAMIC_CLASS(wxColour
)
71 #endif // _WX_GENERIC_COLOUR_H_