]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/colour.h
[ 1823588 ] gtk filedlg - droping support for gtk 2.2
[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
KB
12
13//-----------------------------------------------------------------------------
14// wxColour
15//-----------------------------------------------------------------------------
16
40989e46 17class WXDLLIMPEXP_CORE wxColour : public wxColourBase
c801d85f 18{
e4a81a2e 19public:
edc536d3
WS
20 // constructors
21 // ------------
22
23 // default
40989e46
WS
24 wxColour() {}
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
c6685317 26 wxColour(const GdkColor& gdkColor);
401eb3de 27
d3c7fc99 28 virtual ~wxColour();
c89f5c02 29
b7cacb43 30 bool IsOk() const { return m_refData != NULL; }
aad6765c 31
c89f5c02
RR
32 bool operator == ( const wxColour& col ) const;
33 bool operator != ( const wxColour& col ) const { return !(*this == col); }
34
c89f5c02
RR
35 unsigned char Red() const;
36 unsigned char Green() const;
37 unsigned char Blue() const;
dc888336 38 unsigned char Alpha() const;
c89f5c02 39
c89f5c02
RR
40 // Implementation part
41 void CalcPixel( GdkColormap *cmap );
42 int GetPixel() const;
4f558e23 43#ifdef __WXGTK24__
c6685317 44 const GdkColor *GetColor() const;
4f558e23
PC
45#else
46 // GDK functions from old gtk2 versions take non-const color parameters,
47 // too many uses to deal with individually
48 GdkColor *GetColor() const;
49#endif
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
VZ
56
57private:
c89f5c02 58 DECLARE_DYNAMIC_CLASS(wxColour)
c801d85f 59};
c0ac1c32 60
0416c418 61#endif // _WX_GTK_COLOUR_H_