wxFreeChart
colorscheme.h
1 // Name: colorscheme.h
3 // Purpose: color scheme declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef COLORSCHEME_H_
11 #define COLORSCHEME_H_
12 
13 #include <wx/wxfreechartdefs.h>
14 #include <wx/dynarray.h>
15 
16 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxColour, wxColourArray, WXDLLIMPEXP_FREECHART);
17 
21 class WXDLLIMPEXP_FREECHART ColorScheme
22 {
23 public:
24  ColorScheme(wxColour *colours, size_t count);
25 
26  ColorScheme();
27  virtual ~ColorScheme();
28 
33  void operator = (const ColorScheme &cs)
34  {
35  m_colours = cs.m_colours;
36  }
37 
42  void AddColour(wxColour colour)
43  {
44  m_colours.Add(colour);
45  }
46 
51  size_t GetCount()
52  {
53  return m_colours.GetCount();
54  }
55 
61  wxColour GetColor(size_t index)
62  {
63  return m_colours[index];
64  }
65 
66 private:
67  wxColourArray m_colours;
68 };
69 
70 #endif /*COLORSCHEME_H_*/
size_t GetCount()
Returns color count in this color scheme.
Definition: colorscheme.h:51
void AddColour(wxColour colour)
Add colour to color scheme.
Definition: colorscheme.h:42
Defines set of colors for use by PiePlots, etc...
Definition: colorscheme.h:21
wxColour GetColor(size_t index)
Returns color at specified index.
Definition: colorscheme.h:61