]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/colour.h
Be nice to eVC++ build process and don't include not existing files.
[wxWidgets.git] / include / wx / x11 / colour.h
CommitLineData
83df96d6 1/////////////////////////////////////////////////////////////////////////////
edc536d3 2// Name: wx/x11/colour.h
83df96d6 3// Purpose: wxColour class
3cd0b8c5 4// Author: Julian Smart, Robert Roebling
83df96d6
JS
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
3cd0b8c5 8// Copyright: (c) Julian Smart, Robert Roebling
edc536d3 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COLOUR_H_
13#define _WX_COLOUR_H_
14
3cd0b8c5 15#include "wx/defs.h"
83df96d6
JS
16#include "wx/object.h"
17#include "wx/string.h"
3cd0b8c5
RR
18#include "wx/gdiobj.h"
19#include "wx/palette.h"
83df96d6 20
3cd0b8c5
RR
21//-----------------------------------------------------------------------------
22// classes
23//-----------------------------------------------------------------------------
24
968eb2ef
MW
25class WXDLLIMPEXP_CORE wxDC;
26class WXDLLIMPEXP_CORE wxPaintDC;
27class WXDLLIMPEXP_CORE wxBitmap;
28class WXDLLIMPEXP_CORE wxWindow;
3cd0b8c5 29
968eb2ef 30class WXDLLIMPEXP_CORE wxColour;
3cd0b8c5
RR
31
32//-----------------------------------------------------------------------------
33// wxColour
34//-----------------------------------------------------------------------------
35
40989e46 36class WXDLLEXPORT wxColour : public wxColourBase
83df96d6 37{
83df96d6 38public:
edc536d3
WS
39 // constructors
40 // ------------
41
40989e46
WS
42 wxColour() {}
43 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
564a150b 44
83df96d6 45 ~wxColour();
3cd0b8c5 46
40989e46
WS
47 virtual bool FromString(const wxChar *str);
48
3cd0b8c5 49 bool Ok() const { return m_refData != NULL; }
aad6765c 50
3cd0b8c5
RR
51 bool operator == ( const wxColour& col ) const;
52 bool operator != ( const wxColour& col ) const { return !(*this == col); }
53
3cd0b8c5
RR
54 unsigned char Red() const;
55 unsigned char Green() const;
56 unsigned char Blue() const;
57
58 // Implementation part
aad6765c 59
3cd0b8c5
RR
60 void CalcPixel( WXColormap cmap );
61 unsigned long GetPixel() const;
62 WXColor *GetColor() const;
63
64protected:
65 // ref counting code
66 virtual wxObjectRefData *CreateRefData() const;
67 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
aad6765c 68
40989e46 69 virtual void InitWith( unsigned char red, unsigned char green, unsigned char blue );
3cd0b8c5 70
83df96d6 71private:
3cd0b8c5 72 DECLARE_DYNAMIC_CLASS(wxColour)
83df96d6
JS
73};
74
75#endif
3cd0b8c5 76
e5053ade 77// _WX_COLOUR_H_