1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/colourdata.h
3 // Author: Julian Smart
5 // Copyright: (c) Julian Smart
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_COLOURDATA_H_
10 #define _WX_COLOURDATA_H_
12 #include "wx/colour.h"
14 class WXDLLIMPEXP_CORE wxColourData
: public wxObject
17 // number of custom colours we store
24 wxColourData(const wxColourData
& data
);
25 wxColourData
& operator=(const wxColourData
& data
);
26 virtual ~wxColourData();
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
; }
34 // SetCustomColour() modifies colours in an internal array of NUM_CUSTOM
36 void SetCustomColour(int i
, const wxColour
& colour
);
37 wxColour
GetCustomColour(int i
) const;
39 // Serialize the object to a string and restore it from it
40 wxString
ToString() const;
41 bool FromString(const wxString
& str
);
44 // public for backwards compatibility only: don't use directly
45 wxColour m_dataColour
;
46 wxColour m_custColours
[NUM_CUSTOM
];
49 DECLARE_DYNAMIC_CLASS(wxColourData
)
52 #endif // _WX_COLOURDATA_H_