]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/colour.h
fix unused parameter warning in wxSetEnv() in release build
[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
b5dbe15d
VS
25class WXDLLIMPEXP_FWD_CORE wxDC;
26class WXDLLIMPEXP_FWD_CORE wxPaintDC;
27class WXDLLIMPEXP_FWD_CORE wxBitmap;
28class WXDLLIMPEXP_FWD_CORE wxWindow;
3cd0b8c5 29
b5dbe15d 30class WXDLLIMPEXP_FWD_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
d3c7fc99 45 virtual ~wxColour();
3cd0b8c5 46
b7cacb43
VZ
47 bool Ok() const { return IsOk(); }
48 bool IsOk() const { return m_refData != NULL; }
aad6765c 49
3cd0b8c5
RR
50 bool operator == ( const wxColour& col ) const;
51 bool operator != ( const wxColour& col ) const { return !(*this == col); }
52
3cd0b8c5
RR
53 unsigned char Red() const;
54 unsigned char Green() const;
55 unsigned char Blue() const;
56
57 // Implementation part
aad6765c 58
3cd0b8c5
RR
59 void CalcPixel( WXColormap cmap );
60 unsigned long GetPixel() const;
61 WXColor *GetColor() const;
62
63protected:
64 // ref counting code
65 virtual wxObjectRefData *CreateRefData() const;
66 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
aad6765c 67
aea95b1c
VZ
68 virtual void
69 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
70
e86d4e59 71 virtual bool FromString(const wxString& str);
3cd0b8c5 72
83df96d6 73private:
3cd0b8c5 74 DECLARE_DYNAMIC_CLASS(wxColour)
83df96d6
JS
75};
76
77#endif
3cd0b8c5 78
e5053ade 79// _WX_COLOUR_H_