1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef CHART_RENDERER_H 6 #define CHART_RENDERER_H 7 8 #include <Rect.h> 9 10 11 class BView; 12 class ChartDataRange; 13 class ChartDataSource; 14 15 16 class ChartRendererDataSourceConfig { 17 public: 18 virtual ~ChartRendererDataSourceConfig(); 19 }; 20 21 22 class ChartRenderer { 23 public: 24 virtual ~ChartRenderer(); 25 26 virtual bool AddDataSource( 27 ChartDataSource* dataSource, 28 int32 index, 29 ChartRendererDataSourceConfig* config) = 0; 30 virtual void RemoveDataSource( 31 ChartDataSource* dataSource) = 0; 32 33 virtual void SetFrame(const BRect& frame) = 0; 34 virtual void SetDomain(const ChartDataRange& domain) = 0; 35 virtual void SetRange(const ChartDataRange& range) = 0; 36 37 virtual void Render(BView* view, BRect updateRect) = 0; 38 }; 39 40 41 #endif // CHART_RENDERER_H 42