]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/colour.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk / colour.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
edc536d3 2// Name: wx/gtk/colour.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
01111366 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
0416c418
PC
9#ifndef _WX_GTK_COLOUR_H_
10#define _WX_GTK_COLOUR_H_
c801d85f 11
9dc44eff
PC
12#ifdef __WXGTK3__
13typedef struct _GdkRGBA GdkRGBA;
14#endif
15
c801d85f
KB
16//-----------------------------------------------------------------------------
17// wxColour
18//-----------------------------------------------------------------------------
19
40989e46 20class WXDLLIMPEXP_CORE wxColour : public wxColourBase
c801d85f 21{
e4a81a2e 22public:
edc536d3
WS
23 // constructors
24 // ------------
40989e46 25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
c6685317 26 wxColour(const GdkColor& gdkColor);
9dc44eff
PC
27#ifdef __WXGTK3__
28 wxColour(const GdkRGBA& gdkRGBA);
29#endif
401eb3de 30
d3c7fc99 31 virtual ~wxColour();
c89f5c02 32
8f884a0d
VZ
33 bool operator==(const wxColour& col) const;
34 bool operator!=(const wxColour& col) const { return !(*this == col); }
c89f5c02 35
c89f5c02
RR
36 unsigned char Red() const;
37 unsigned char Green() const;
38 unsigned char Blue() const;
dc888336 39 unsigned char Alpha() const;
c89f5c02 40
c89f5c02 41 // Implementation part
9dc44eff
PC
42#ifdef __WXGTK3__
43 operator const GdkRGBA*() const;
44#else
c89f5c02
RR
45 void CalcPixel( GdkColormap *cmap );
46 int GetPixel() const;
9dc44eff 47#endif
c6685317 48 const GdkColor *GetColor() const;
c0ac1c32 49
68dda785 50protected:
aea95b1c
VZ
51 virtual void
52 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
53
e86d4e59 54 virtual bool FromString(const wxString& str);
68dda785 55
c89f5c02 56 DECLARE_DYNAMIC_CLASS(wxColour)
c801d85f 57};
c0ac1c32 58
0416c418 59#endif // _WX_GTK_COLOUR_H_