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_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
26 wxColour(const GdkColor
& gdkColor
);
30 bool IsOk() const { return m_refData
!= NULL
; }
32 bool operator == ( const wxColour
& col
) const;
33 bool operator != ( const wxColour
& col
) const { return !(*this == col
); }
35 unsigned char Red() const;
36 unsigned char Green() const;
37 unsigned char Blue() const;
38 unsigned char Alpha() const;
40 // Implementation part
41 void CalcPixel( GdkColormap
*cmap
);
44 const GdkColor
*GetColor() const;
46 // GDK functions from old gtk2 versions take non-const color parameters,
47 // too many uses to deal with individually
48 GdkColor
*GetColor() const;
53 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
55 virtual bool FromString(const wxString
& str
);
58 DECLARE_DYNAMIC_CLASS(wxColour
)
61 #endif // _WX_GTK_COLOUR_H_