VTK
vtkCategoryLegend.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCategoryLegend.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
30 #ifndef vtkCategoryLegend_h
31 #define vtkCategoryLegend_h
32 
33 #include "vtkChartsCoreModule.h" // For export macro
34 #include "vtkChartLegend.h"
35 #include "vtkNew.h" // For vtkNew ivars
36 #include "vtkStdString.h" // For vtkStdString ivars
37 #include "vtkVector.h" // For vtkRectf
38 
39 class vtkScalarsToColors;
40 class vtkTextProperty;
41 class vtkVariantArray;
42 
44 {
45 public:
47  static vtkCategoryLegend* New();
48 
50 
51  enum {
52  VERTICAL = 0,
53  HORIZONTAL
54  };
56 
58  virtual bool Paint(vtkContext2D *painter);
59 
62  virtual vtkRectf GetBoundingRect(vtkContext2D* painter);
63 
65 
68  virtual void SetScalarsToColors(vtkScalarsToColors* stc);
69  virtual vtkScalarsToColors * GetScalarsToColors();
71 
73 
77  vtkGetMacro(Values, vtkVariantArray*);
78  vtkSetMacro(Values, vtkVariantArray*);
80 
82 
83  virtual void SetTitle(const vtkStdString &title);
84  virtual vtkStdString GetTitle();
86 
88 
89  vtkGetMacro(OutlierLabel, vtkStdString);
90  vtkSetMacro(OutlierLabel, vtkStdString);
92 
93 protected:
95  virtual ~vtkCategoryLegend();
96 
104 
105 private:
106  vtkCategoryLegend(const vtkCategoryLegend &); // Not implemented.
107  void operator=(const vtkCategoryLegend &); // Not implemented.
108 };
109 
110 #endif
vtkStdString OutlierLabel
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
An array holding vtkVariants.
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
vtkScalarsToColors * ScalarsToColors
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
vtkVariantArray * Values
static vtkChartLegend * New()
represent text properties.
Legend item to display categorical data.
draw the chart legend
virtual bool Paint(vtkContext2D *painter)
vtkNew< vtkTextProperty > TitleProperties
#define VTKCHARTSCORE_EXPORT