]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/colour.h
Handle WebKitWebView create-web-view.
[wxWidgets.git] / include / wx / gtk / colour.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/colour.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_GTK_COLOUR_H_
10 #define _WX_GTK_COLOUR_H_
11
12 #ifdef __WXGTK3__
13 typedef struct _GdkRGBA GdkRGBA;
14 #endif
15
16 //-----------------------------------------------------------------------------
17 // wxColour
18 //-----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_CORE wxColour : public wxColourBase
21 {
22 public:
23 // constructors
24 // ------------
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
26 wxColour(const GdkColor& gdkColor);
27 #ifdef __WXGTK3__
28 wxColour(const GdkRGBA& gdkRGBA);
29 #endif
30
31 virtual ~wxColour();
32
33 bool operator==(const wxColour& col) const;
34 bool operator!=(const wxColour& col) const { return !(*this == col); }
35
36 unsigned char Red() const;
37 unsigned char Green() const;
38 unsigned char Blue() const;
39 unsigned char Alpha() const;
40
41 // Implementation part
42 #ifdef __WXGTK3__
43 operator const GdkRGBA*() const;
44 #else
45 void CalcPixel( GdkColormap *cmap );
46 int GetPixel() const;
47 #endif
48 const GdkColor *GetColor() const;
49
50 protected:
51 virtual void
52 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
53
54 virtual bool FromString(const wxString& str);
55
56 DECLARE_DYNAMIC_CLASS(wxColour)
57 };
58
59 #endif // _WX_GTK_COLOUR_H_