header includes cleanup
[wxWidgets.git] / include / wx / gtk / colour.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/colour.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_COLOUR_H_
11 #define _WX_GTK_COLOUR_H_
12
13 //-----------------------------------------------------------------------------
14 // wxColour
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxColour : public wxColourBase
18 {
19 public:
20 // constructors
21 // ------------
22
23 // default
24 wxColour() {}
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
26 wxColour(const GdkColor& gdkColor);
27
28 ~wxColour();
29
30 bool Ok() const { return m_refData != NULL; }
31
32 bool operator == ( const wxColour& col ) const;
33 bool operator != ( const wxColour& col ) const { return !(*this == col); }
34
35 unsigned char Red() const;
36 unsigned char Green() const;
37 unsigned char Blue() const;
38
39 // Implementation part
40 void CalcPixel( GdkColormap *cmap );
41 int GetPixel() const;
42 #ifdef __WXGTK24__
43 const GdkColor *GetColor() const;
44 #else
45 // GDK functions from old gtk2 versions take non-const color parameters,
46 // too many uses to deal with individually
47 GdkColor *GetColor() const;
48 #endif
49
50 protected:
51 virtual bool FromString(const wxChar *str);
52 virtual void InitWith( unsigned char red, unsigned char green, unsigned char blue );
53
54 private:
55 DECLARE_DYNAMIC_CLASS(wxColour)
56 };
57
58 #endif // _WX_GTK_COLOUR_H_