1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/classic/colour.h
3 // Purpose: wxColour class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
16 #include "wx/string.h"
19 class WXDLLEXPORT wxColour
: public wxColourBase
26 wxColour() { Init(); }
27 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
29 // copy ctors and assignment operators
30 wxColour( const wxColour
& col
);
31 wxColour( const wxColour
* col
);
32 wxColour
& operator = ( const wxColour
& col
);
38 bool Ok() const { return IsOk(); }
39 bool IsOk() 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
);
53 bool operator != (const wxColour
& colour
) const { return !(*this == colour
); }
55 const WXCOLORREF
& GetPixel() const { return m_pixel
; };
62 void InitWith( unsigned char red
, unsigned char green
, unsigned char blue
);
68 unsigned char m_green
;
72 void Set( const WXCOLORREF
* color
) ;
75 DECLARE_DYNAMIC_CLASS(wxColour
)