1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/colour.h
3 // Purpose: wxColour class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLEXPORT wxColour
: public wxColourBase
27 wxColour() { Init(); }
28 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
30 // copy ctors and assignment operators
31 wxColour(const wxColour
& col
);
32 wxColour
& operator=( const wxColour
& col
);
39 bool Ok() const { return m_isInit
; }
41 unsigned char Red() const { return m_red
; }
42 unsigned char Green() const { return m_green
; }
43 unsigned char Blue() const { return m_blue
; }
46 bool operator==(const wxColour
& colour
) const
48 return m_isInit
== colour
.m_isInit
49 && m_red
== colour
.m_red
50 && m_green
== colour
.m_green
51 && m_blue
== colour
.m_blue
;
54 bool operator != (const wxColour
& colour
) const { return !(*this == colour
); }
56 WXCOLORREF
GetPixel() const { return m_pixel
; };
65 virtual void InitWith(unsigned char red
, unsigned char green
, unsigned char blue
);
71 unsigned char m_green
;
74 DECLARE_DYNAMIC_CLASS(wxColour
)