1/*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef CHART_LEGEND_H
6#define CHART_LEGEND_H
7
8#include <Point.h>
9#include <Size.h>
10
11
12class BView;
13class ChartDataRange;
14
15
16class ChartLegend {
17public:
18								ChartLegend(int32 level = 0);
19									// A lower level means more likely to be
20									// shown. <= 0 is mandatory.
21	virtual						~ChartLegend();
22
23			int32				Level()		{ return fLevel; }
24
25private:
26			int32				fLevel;
27};
28
29
30class ChartLegendRenderer {
31public:
32	virtual						~ChartLegendRenderer();
33
34	virtual	void				GetMinimumLegendSpacing(BView* view,
35									float* horizontal, float* vertical) = 0;
36
37	virtual	BSize				LegendSize(ChartLegend* legend,
38									BView* view) = 0;
39	virtual	void				RenderLegend(ChartLegend* legend, BView* view,
40									BPoint point) = 0;
41};
42
43
44#endif	// CHART_LEGEND_H
45