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