]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/colour.h
add wxMBConvStrictUTF8 class implementing just UTF-8 conversion, without support...
[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//-----------------------------------------------------------------------------
14// wxColour
15//-----------------------------------------------------------------------------
16
17class WXDLLIMPEXP_CORE wxColour : public wxColourBase
18{
19public:
20 // constructors
21 // ------------
22
23 // default
24 wxColour() {}
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
26 wxColour(const GdkColor& gdkColor);
27
28 virtual ~wxColour();
29
30 bool Ok() const { return IsOk(); }
31 bool IsOk() const { return m_refData != NULL; }
32
33 bool operator == ( const wxColour& col ) const;
34 bool operator != ( const wxColour& col ) const { return !(*this == col); }
35
36 unsigned char Red() const;
37 unsigned char Green() const;
38 unsigned char Blue() const;
39 unsigned char Alpha() const;
40
41 // Implementation part
42 void CalcPixel( GdkColormap *cmap );
43 int GetPixel() const;
44#ifdef __WXGTK24__
45 const GdkColor *GetColor() const;
46#else
47 // GDK functions from old gtk2 versions take non-const color parameters,
48 // too many uses to deal with individually
49 GdkColor *GetColor() const;
50#endif
51
52protected:
53 virtual void
54 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
55
56 virtual bool FromString(const wxString& str);
57
58private:
59 DECLARE_DYNAMIC_CLASS(wxColour)
60};
61
62#endif // _WX_GTK_COLOUR_H_