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