1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/colour.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_COLOUR_H_
11 #define _WX_GTK_COLOUR_H_
14 typedef struct _GdkRGBA GdkRGBA
;
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
27 wxColour(const GdkColor
& gdkColor
);
29 wxColour(const GdkRGBA
& gdkRGBA
);
34 bool operator==(const wxColour
& col
) const;
35 bool operator!=(const wxColour
& col
) const { return !(*this == col
); }
37 unsigned char Red() const;
38 unsigned char Green() const;
39 unsigned char Blue() const;
40 unsigned char Alpha() const;
42 // Implementation part
44 operator const GdkRGBA
*() const;
46 void CalcPixel( GdkColormap
*cmap
);
49 const GdkColor
*GetColor() const;
53 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
55 virtual bool FromString(const wxString
& str
);
57 DECLARE_DYNAMIC_CLASS(wxColour
)
60 #endif // _WX_GTK_COLOUR_H_