00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00025 #ifndef __vtkChartLegend_h
00026 #define __vtkChartLegend_h
00027
00028 #include "vtkContextItem.h"
00029
00030 class vtkVector2f;
00031 class vtkChart;
00032
00033 class VTK_CHARTS_EXPORT vtkChartLegend : public vtkContextItem
00034 {
00035 public:
00036 vtkTypeMacro(vtkChartLegend, vtkContextItem);
00037 virtual void PrintSelf(ostream &os, vtkIndent indent);
00038
00040 static vtkChartLegend *New();
00041
00043
00044 vtkSetVector2Macro(Point, float);
00046
00048
00049 vtkGetVector2Macro(Point, float);
00051
00052
00053 enum {
00054 LEFT = 0,
00055 CENTER,
00056 RIGHT,
00057 TOP,
00058 BOTTOM
00059 };
00060
00062 void SetPoint(const vtkVector2f &point);
00063
00065 const vtkVector2f& GetPointVector();
00066
00067
00069
00070 vtkSetMacro(HorizontalAlignment, int);
00072
00074
00075 vtkGetMacro(HorizontalAlignment, int);
00077
00079
00080 vtkSetMacro(VerticalAlignment, int);
00082
00084
00085 vtkGetMacro(VerticalAlignment, int);
00087
00089
00090 vtkSetMacro(LabelSize, int);
00092
00094
00095 vtkGetMacro(LabelSize, int);
00097
00100 void SetChart(vtkChart* chart);
00101
00104 vtkChart* GetChart();
00105
00108 virtual void Update();
00109
00111 virtual bool Paint(vtkContext2D *painter);
00112
00113
00114 protected:
00115 vtkChartLegend();
00116 ~vtkChartLegend();
00117
00118 float* Point;
00119 int HorizontalAlignment;
00120 int VerticalAlignment;
00121 int LabelSize;
00122
00123
00124 class Private;
00125 Private* Storage;
00126
00127 private:
00128 vtkChartLegend(const vtkChartLegend &);
00129 void operator=(const vtkChartLegend &);
00130
00131 };
00132
00133 #endif //__vtkChartLegend_h