1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/colour.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
10 #define __GTKCOLOURH__
13 #include "wx/object.h"
14 #include "wx/string.h"
15 #include "wx/gdiobj.h"
16 #include "wx/palette.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class WXDLLIMPEXP_FWD_CORE wxDC
;
23 class WXDLLIMPEXP_FWD_CORE wxPaintDC
;
24 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
25 class WXDLLIMPEXP_FWD_CORE wxWindow
;
27 class WXDLLIMPEXP_FWD_CORE wxColour
;
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
38 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
42 virtual bool FromString(const wxString
& str
);
44 bool operator==(const wxColour
& col
) const;
45 bool operator!=(const wxColour
& col
) const { return !(*this == col
); }
47 unsigned char Red() const;
48 unsigned char Green() const;
49 unsigned char Blue() const;
52 // Implementation part
53 void CalcPixel( GdkColormap
*cmap
);
55 GdkColor
*GetColor() const;
59 virtual wxGDIRefData
*CreateGDIRefData() const;
60 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
63 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
66 DECLARE_DYNAMIC_CLASS(wxColour
)
69 #endif // __GTKCOLOURH__