1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/colour.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_GTK_COLOUR_H_
10 #define _WX_GTK_COLOUR_H_
13 typedef struct _GdkRGBA GdkRGBA
;
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
26 wxColour(const GdkColor
& gdkColor
);
28 wxColour(const GdkRGBA
& gdkRGBA
);
33 bool operator==(const wxColour
& col
) const;
34 bool operator!=(const wxColour
& col
) const { return !(*this == col
); }
36 unsigned char Red() const;
37 unsigned char Green() const;
38 unsigned char Blue() const;
39 unsigned char Alpha() const;
41 // Implementation part
43 operator const GdkRGBA
*() const;
45 void CalcPixel( GdkColormap
*cmap
);
48 const GdkColor
*GetColor() const;
52 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
54 virtual bool FromString(const wxString
& str
);
56 DECLARE_DYNAMIC_CLASS(wxColour
)
59 #endif // _WX_GTK_COLOUR_H_