1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart, Robert Roebling
7 // Copyright: (c) Julian Smart, Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
16 #include "wx/string.h"
17 #include "wx/gdiobj.h"
18 #include "wx/palette.h"
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 class WXDLLIMPEXP_FWD_CORE wxDC
;
25 class WXDLLIMPEXP_FWD_CORE wxPaintDC
;
26 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
27 class WXDLLIMPEXP_FWD_CORE wxWindow
;
29 class WXDLLIMPEXP_FWD_CORE wxColour
;
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
40 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
44 bool operator==(const wxColour
& col
) const;
45 bool operator!=(const wxColour
& col
) const { return !(*this == col
); }
47 unsigned char Red() const;
48 unsigned char Green() const;
49 unsigned char Blue() const;
51 // Implementation part
53 void CalcPixel( WXColormap cmap
);
54 unsigned long GetPixel() const;
55 WXColor
*GetColor() const;
58 virtual wxGDIRefData
*CreateGDIRefData() const;
59 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
62 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
64 virtual bool FromString(const wxString
& str
);
67 DECLARE_DYNAMIC_CLASS(wxColour
)
70 #endif // _WX_COLOUR_H_