]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/colour.h
Applied rowspan patch #15276 (dghart)
[wxWidgets.git] / include / wx / gtk / colour.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/colour.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_GTK_COLOUR_H_
11#define _WX_GTK_COLOUR_H_
12
13#ifdef __WXGTK3__
14typedef struct _GdkRGBA GdkRGBA;
15#endif
16
17//-----------------------------------------------------------------------------
18// wxColour
19//-----------------------------------------------------------------------------
20
21class WXDLLIMPEXP_CORE wxColour : public wxColourBase
22{
23public:
24 // constructors
25 // ------------
26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
27 wxColour(const GdkColor& gdkColor);
28#ifdef __WXGTK3__
29 wxColour(const GdkRGBA& gdkRGBA);
30#endif
31
32 virtual ~wxColour();
33
34 bool operator==(const wxColour& col) const;
35 bool operator!=(const wxColour& col) const { return !(*this == col); }
36
37 unsigned char Red() const;
38 unsigned char Green() const;
39 unsigned char Blue() const;
40 unsigned char Alpha() const;
41
42 // Implementation part
43#ifdef __WXGTK3__
44 operator const GdkRGBA*() const;
45#else
46 void CalcPixel( GdkColormap *cmap );
47 int GetPixel() const;
48#endif
49 const GdkColor *GetColor() const;
50
51protected:
52 virtual void
53 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
54
55 virtual bool FromString(const wxString& str);
56
57 DECLARE_DYNAMIC_CLASS(wxColour)
58};
59
60#endif // _WX_GTK_COLOUR_H_