]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/colour.h
removed wxUSE_TOOLBAR_SIMPLE leftovers from the main sources, it's not used anywhere...
[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
RR
46
47 bool Ok() const { return m_refData != NULL; }
aad6765c 48
3cd0b8c5
RR
49 bool operator == ( const wxColour& col ) const;
50 bool operator != ( const wxColour& col ) const { return !(*this == col); }
51
3cd0b8c5
RR
52 unsigned char Red() const;
53 unsigned char Green() const;
54 unsigned char Blue() const;
55
56 // Implementation part
aad6765c 57
3cd0b8c5
RR
58 void CalcPixel( WXColormap cmap );
59 unsigned long GetPixel() const;
60 WXColor *GetColor() const;
61
62protected:
63 // ref counting code
64 virtual wxObjectRefData *CreateRefData() const;
65 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
aad6765c 66
cb3db090 67 virtual bool FromString(const wxChar *str);
40989e46 68 virtual void InitWith( unsigned char red, unsigned char green, unsigned char blue );
3cd0b8c5 69
83df96d6 70private:
3cd0b8c5 71 DECLARE_DYNAMIC_CLASS(wxColour)
83df96d6
JS
72};
73
74#endif
3cd0b8c5 75
e5053ade 76// _WX_COLOUR_H_