]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/colour.h
Removed unused files.
[wxWidgets.git] / include / wx / mgl / colour.h
CommitLineData
32b8ec41 1/////////////////////////////////////////////////////////////////////////////
edc536d3 2// Name: wx/mgl/colour.h
32b8ec41
VZ
3// Purpose: wxColour class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
32b8ec41
VZ
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COLOUR_H_
13#define _WX_COLOUR_H_
14
32b8ec41
VZ
15#include "wx/object.h"
16
17// Colour
40989e46 18class WXDLLEXPORT wxColour: public wxColourBase
32b8ec41
VZ
19{
20public:
edc536d3
WS
21 // constructors
22 // ------------
23
24 // default
daebb84b 25 wxColour();
40989e46 26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
32b8ec41 27
edc536d3 28 // copy ctors and assignment operators
32b8ec41
VZ
29 wxColour(const wxColour& col);
30 wxColour& operator = (const wxColour& col);
31
edc536d3 32 // dtor
32b8ec41
VZ
33 ~wxColour();
34
32b8ec41
VZ
35 // accessors
36 bool Ok() const { return m_isInit; }
37
32b8ec41
VZ
38 unsigned char Red() const { return m_red; }
39 unsigned char Green() const { return m_green; }
40 unsigned char Blue() const { return m_blue; }
41
42 // comparison
43 bool operator == (const wxColour& colour) const
44 {
edc536d3
WS
45 return (m_red == colour.m_red &&
46 m_green == colour.m_green &&
47 m_blue == colour.m_blue &&
48 m_isInit == colour.m_isInit);
32b8ec41
VZ
49 }
50 bool operator != (const wxColour& colour) const { return !(*this == colour); }
51
aad6765c
JS
52
53protected:
54
55 // Helper function
56 void Init();
57
40989e46
WS
58 virtual void InitWith(unsigned char red, unsigned char green, unsigned char blue);
59
32b8ec41
VZ
60private:
61 bool m_isInit;
62 unsigned char m_red;
63 unsigned char m_blue;
64 unsigned char m_green;
65
32b8ec41
VZ
66private:
67 DECLARE_DYNAMIC_CLASS(wxColour)
68};
69
70#endif
71 // _WX_COLOUR_H_