]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/colour.h
Add more checks for Intel compiler.
[wxWidgets.git] / include / wx / x11 / colour.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart, Robert Roebling
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart, Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COLOUR_H_
12 #define _WX_COLOUR_H_
13
14 #include "wx/defs.h"
15 #include "wx/object.h"
16 #include "wx/string.h"
17 #include "wx/gdiobj.h"
18 #include "wx/palette.h"
19
20 //-----------------------------------------------------------------------------
21 // classes
22 //-----------------------------------------------------------------------------
23
24 class WXDLLIMPEXP_FWD_CORE wxDC;
25 class WXDLLIMPEXP_FWD_CORE wxPaintDC;
26 class WXDLLIMPEXP_FWD_CORE wxBitmap;
27 class WXDLLIMPEXP_FWD_CORE wxWindow;
28
29 class WXDLLIMPEXP_FWD_CORE wxColour;
30
31 //-----------------------------------------------------------------------------
32 // wxColour
33 //-----------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_CORE wxColour : public wxColourBase
36 {
37 public:
38 // constructors
39 // ------------
40 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
41
42 virtual ~wxColour();
43
44 bool operator==(const wxColour& col) const;
45 bool operator!=(const wxColour& col) const { return !(*this == col); }
46
47 unsigned char Red() const;
48 unsigned char Green() const;
49 unsigned char Blue() const;
50
51 // Implementation part
52
53 void CalcPixel( WXColormap cmap );
54 unsigned long GetPixel() const;
55 WXColor *GetColor() const;
56
57 protected:
58 virtual wxGDIRefData *CreateGDIRefData() const;
59 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
60
61 virtual void
62 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
63
64 virtual bool FromString(const wxString& str);
65
66 private:
67 DECLARE_DYNAMIC_CLASS(wxColour)
68 };
69
70 #endif // _WX_COLOUR_H_