-
Notifications
You must be signed in to change notification settings - Fork 21
/
colorscheme.h
executable file
·70 lines (59 loc) · 1.55 KB
/
colorscheme.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/////////////////////////////////////////////////////////////////////////////
// Name: colorscheme.h
// Purpose: color scheme declaration
// Author: Moskvichev Andrey V.
// Created: 2008/11/07
// Copyright: (c) 2008-2010 Moskvichev Andrey V.
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#ifndef COLORSCHEME_H_
#define COLORSCHEME_H_
#include <wx/wxfreechartdefs.h>
#include <wx/dynarray.h>
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxColour, wxColourArray, WXDLLIMPEXP_FREECHART);
/**
* Defines set of colors for use by PiePlots, etc...
*/
class WXDLLIMPEXP_FREECHART ColorScheme
{
public:
ColorScheme(wxColour *colours, size_t count);
ColorScheme();
virtual ~ColorScheme();
/**
* Sets this color scheme equal to other color scheme.
* @param cs other color scheme
*/
void operator = (const ColorScheme &cs)
{
m_colours = cs.m_colours;
}
/**
* Add colour to color scheme.
* @param colour colour to be added
*/
void AddColour(wxColour colour)
{
m_colours.Add(colour);
}
/**
* Returns color count in this color scheme.
* @return color count
*/
size_t GetCount()
{
return m_colours.GetCount();
}
/**
* Returns color at specified index.
* @param index index of color
* @return color at specified index
*/
wxColour GetColor(size_t index)
{
return m_colours[index];
}
private:
wxColourArray m_colours;
};
#endif /*COLORSCHEME_H_*/