]> git.saurik.com Git - wxWidgets.git/blame - include/wx/colourdata.h
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation...
[wxWidgets.git] / include / wx / colourdata.h
CommitLineData
081d8d96
PC
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/colourdata.h
3// Author: Julian Smart
081d8d96
PC
4// Copyright: (c) Julian Smart
5// Licence: wxWindows licence
6/////////////////////////////////////////////////////////////////////////////
7
8#ifndef _WX_COLOURDATA_H_
9#define _WX_COLOURDATA_H_
10
11#include "wx/colour.h"
12
13class WXDLLIMPEXP_CORE wxColourData : public wxObject
14{
15public:
16 // number of custom colours we store
17 enum
18 {
19 NUM_CUSTOM = 16
20 };
21
22 wxColourData();
23 wxColourData(const wxColourData& data);
24 wxColourData& operator=(const wxColourData& data);
25 virtual ~wxColourData();
26
27 void SetChooseFull(bool flag) { m_chooseFull = flag; }
28 bool GetChooseFull() const { return m_chooseFull; }
29 void SetColour(const wxColour& colour) { m_dataColour = colour; }
30 const wxColour& GetColour() const { return m_dataColour; }
31 wxColour& GetColour() { return m_dataColour; }
32
33 // SetCustomColour() modifies colours in an internal array of NUM_CUSTOM
34 // custom colours;
35 void SetCustomColour(int i, const wxColour& colour);
36 wxColour GetCustomColour(int i) const;
37
38 // Serialize the object to a string and restore it from it
39 wxString ToString() const;
40 bool FromString(const wxString& str);
41
42
43 // public for backwards compatibility only: don't use directly
44 wxColour m_dataColour;
45 wxColour m_custColours[NUM_CUSTOM];
46 bool m_chooseFull;
47
48 DECLARE_DYNAMIC_CLASS(wxColourData)
49};
50
51#endif // _WX_COLOURDATA_H_