00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00026 #ifndef __vtkChart_h
00027 #define __vtkChart_h
00028
00029 #include "vtkContextItem.h"
00030
00031 class vtkContext2D;
00032 class vtkContextScene;
00033 class vtkPlot;
00034 class vtkAxis;
00035 class vtkTextProperty;
00036
00037 class vtkInteractorStyle;
00038 class vtkAnnotationLink;
00039 class vtkTable;
00040
00041 class VTK_CHARTS_EXPORT vtkChart : public vtkContextItem
00042 {
00043 public:
00044 vtkTypeMacro(vtkChart, vtkContextItem);
00045 virtual void PrintSelf(ostream &os, vtkIndent indent);
00046
00047
00049
00050 enum {
00051 LINE,
00052 POINTS,
00053 BAR,
00054 STACKED};
00056
00057
00060 virtual bool Paint(vtkContext2D *painter) = 0;
00061
00063 virtual vtkPlot* AddPlot(int type);
00064
00067 virtual bool RemovePlot(vtkIdType index);
00068
00072 virtual bool RemovePlotInstance(vtkPlot* plot);
00073
00075 virtual void ClearPlots();
00076
00079 virtual vtkPlot* GetPlot(vtkIdType index);
00080
00082 virtual vtkIdType GetNumberOfPlots();
00083
00087 virtual vtkAxis* GetAxis(int axisIndex);
00088
00090 virtual vtkIdType GetNumberOfAxes();
00091
00095 virtual void RecalculateBounds();
00096
00098 virtual void SetAnnotationLink(vtkAnnotationLink *link);
00099
00101
00102 vtkGetObjectMacro(AnnotationLink, vtkAnnotationLink);
00104
00106
00107 vtkSetVector2Macro(Geometry, int);
00108 vtkGetVector2Macro(Geometry, int);
00110
00112
00113 vtkSetVector2Macro(Point1, int);
00114 vtkGetVector2Macro(Point1, int);
00116
00118
00119 vtkSetVector2Macro(Point2, int);
00120 vtkGetVector2Macro(Point2, int);
00122
00124
00125 vtkSetMacro(ShowLegend, bool);
00126 vtkGetMacro(ShowLegend, bool);
00128
00130
00131 vtkSetStringMacro(Title);
00132 vtkGetStringMacro(Title);
00134
00136
00138 vtkGetObjectMacro(TitleProperties, vtkTextProperty);
00140
00142
00143 void SetBottomBorder(int border);
00144 void SetTopBorder(int border);
00145 void SetLeftBorder(int border);
00146 void SetRightBorder(int border);
00148
00150 void SetBorders(int left, int bottom, int right, int top);
00151
00152
00153 protected:
00154 vtkChart();
00155 ~vtkChart();
00156
00158 vtkAnnotationLink *AnnotationLink;
00159
00161 int Geometry[2];
00162
00164 int Point1[2];
00165
00167 int Point2[2];
00168
00170 bool ShowLegend;
00171
00173 char* Title;
00174
00176 vtkTextProperty* TitleProperties;
00177
00178 private:
00179 vtkChart(const vtkChart &);
00180 void operator=(const vtkChart &);
00181
00182 };
00183
00184 #endif //__vtkChart_h