]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/colour.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxColour class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "colour.h"
20 class WXDLLEXPORT wxColour
: public wxObject
22 DECLARE_DYNAMIC_CLASS(wxColour
)
25 wxColour(const unsigned char r
, const unsigned char g
, const unsigned char b
);
26 wxColour(const wxColour
& col
);
27 wxColour(const wxString
& col
);
29 wxColour
& operator =(const wxColour
& src
) ;
30 wxColour
& operator =(const wxString
& src
) ;
31 inline int Ok(void) const { return (m_isInit
) ; }
33 void Set(unsigned char r
, unsigned char g
, unsigned char b
);
35 // Let's remove this inelegant function
36 #if WXWIN_COMPATIBILITY
37 void Get(unsigned char *r
, unsigned char *g
, unsigned char *b
) const;
40 inline unsigned char Red(void) const { return m_red
; }
41 inline unsigned char Green(void) const { return m_green
; }
42 inline unsigned char Blue(void) const { return m_blue
; }
44 inline bool operator == (const wxColour
& colour
) { return (m_red
== colour
.m_red
&& m_green
== colour
.m_green
&& m_blue
== colour
.m_blue
); }
46 inline bool operator != (const wxColour
& colour
) { return (!(m_red
== colour
.m_red
&& m_green
== colour
.m_green
&& m_blue
== colour
.m_blue
)); }
48 WXCOLORREF
GetPixel(void) const { return m_pixel
; };
54 unsigned char m_green
;
59 #define wxColor wxColour