]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/colour.h
Avoid setting attributes in GTK wxDataViewRenderer if not supported.
[wxWidgets.git] / include / wx / gtk1 / colour.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/colour.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKCOLOURH__
11#define __GTKCOLOURH__
12
c801d85f
KB
13#include "wx/defs.h"
14#include "wx/object.h"
15#include "wx/string.h"
16#include "wx/gdiobj.h"
401ec7b6 17#include "wx/palette.h"
c801d85f
KB
18
19//-----------------------------------------------------------------------------
20// classes
21//-----------------------------------------------------------------------------
22
b5dbe15d
VS
23class WXDLLIMPEXP_FWD_CORE wxDC;
24class WXDLLIMPEXP_FWD_CORE wxPaintDC;
25class WXDLLIMPEXP_FWD_CORE wxBitmap;
26class WXDLLIMPEXP_FWD_CORE wxWindow;
c801d85f 27
b5dbe15d 28class WXDLLIMPEXP_FWD_CORE wxColour;
c801d85f
KB
29
30//-----------------------------------------------------------------------------
31// wxColour
32//-----------------------------------------------------------------------------
33
40989e46 34class WXDLLIMPEXP_CORE wxColour : public wxColourBase
c801d85f 35{
e4a81a2e 36public:
edc536d3
WS
37 // constructors
38 // ------------
40989e46 39 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
401eb3de 40
d3c7fc99 41 virtual ~wxColour();
c89f5c02 42
e86d4e59 43 virtual bool FromString(const wxString& str);
40989e46 44
8f884a0d
VZ
45 bool operator==(const wxColour& col) const;
46 bool operator!=(const wxColour& col) const { return !(*this == col); }
c89f5c02 47
c89f5c02
RR
48 unsigned char Red() const;
49 unsigned char Green() const;
50 unsigned char Blue() const;
51
52
53 // Implementation part
54 void CalcPixel( GdkColormap *cmap );
55 int GetPixel() const;
56 GdkColor *GetColor() const;
c0ac1c32 57
68dda785 58protected:
c89f5c02 59 // ref counting code
8f884a0d
VZ
60 virtual wxGDIRefData *CreateGDIRefData() const;
61 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
aad6765c 62
aea95b1c
VZ
63 virtual void
64 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
68dda785
VZ
65
66private:
c89f5c02 67 DECLARE_DYNAMIC_CLASS(wxColour)
c801d85f 68};
c0ac1c32 69
c801d85f 70#endif // __GTKCOLOURH__