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