1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_COLOUR_H_
13 #define _WX_GENERIC_COLOUR_H_
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
& col
);
30 wxColour
& operator=(const wxColour
& col
);
36 bool Ok() const { return IsOk(); }
37 bool IsOk() const { return m_isInit
; }
39 unsigned char Red() const { return m_red
; }
40 unsigned char Green() const { return m_green
; }
41 unsigned char Blue() const { return m_blue
; }
42 unsigned char Alpha() const { return m_alpha
; }
45 bool operator==(const wxColour
& colour
) const
47 return (m_red
== colour
.m_red
&&
48 m_green
== colour
.m_green
&&
49 m_blue
== colour
.m_blue
&&
50 m_alpha
== colour
.m_alpha
&&
51 m_isInit
== colour
.m_isInit
);
54 bool operator!=(const wxColour
& colour
) const { return !(*this == colour
); }
62 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
68 unsigned char m_green
;
69 unsigned char m_alpha
;
72 DECLARE_DYNAMIC_CLASS(wxColour
)
75 #endif // _WX_GENERIC_COLOUR_H_