Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
[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 virtual ~wxColour();
29
30 bool operator==(const wxColour& col) const;
31 bool operator!=(const wxColour& col) const { return !(*this == col); }
32
33 unsigned char Red() const;
34 unsigned char Green() const;
35 unsigned char Blue() const;
36 unsigned char Alpha() const;
37
38 // Implementation part
39 void CalcPixel( GdkColormap *cmap );
40 int GetPixel() const;
41 const GdkColor *GetColor() const;
42
43 protected:
44 virtual void
45 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
46
47 virtual bool FromString(const wxString& str);
48
49 private:
50 DECLARE_DYNAMIC_CLASS(wxColour)
51 };
52
53 #endif // _WX_GTK_COLOUR_H_