VTK  9.2.6
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
31#ifndef vtkCategoryLegend_h
32#define vtkCategoryLegend_h
33
34#include "vtkChartLegend.h"
35#include "vtkChartsCoreModule.h" // For export macro
36#include "vtkNew.h" // For vtkNew ivars
37#include "vtkStdString.h" // For vtkStdString ivars
38#include "vtkVector.h" // For vtkRectf
39
41class vtkTextProperty;
42class vtkVariantArray;
43
44class VTKCHARTSCORE_EXPORT vtkCategoryLegend : public vtkChartLegend
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
55 enum
56 {
59 };
60
64 bool Paint(vtkContext2D* painter) override;
65
71
73
81
83
89 vtkGetObjectMacro(Values, vtkVariantArray);
90 virtual void SetValues(vtkVariantArray*);
92
94
97 virtual void SetTitle(const vtkStdString& title);
100
102
108
109protected:
112
120
121private:
122 vtkCategoryLegend(const vtkCategoryLegend&) = delete;
123 void operator=(const vtkCategoryLegend&) = delete;
124};
125
126#endif
vtkScalarsToColors * ScalarsToColors
virtual vtkStdString GetTitle()
Get/set the title text of the legend.
vtkNew< vtkTextProperty > TitleProperties
~vtkCategoryLegend() override
virtual vtkScalarsToColors * GetScalarsToColors()
Get/Set the vtkScalarsToColors used to draw this legend.
static vtkCategoryLegend * New()
vtkVariantArray * Values
virtual void SetValues(vtkVariantArray *)
Get/Set the array of values that will be represented by this legend.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool Paint(vtkContext2D *painter) override
Paint the legend into a rectangle defined by the bounds.
vtkStdString OutlierLabel
virtual void SetScalarsToColors(vtkScalarsToColors *stc)
Get/Set the vtkScalarsToColors used to draw this legend.
vtkRectf GetBoundingRect(vtkContext2D *painter) override
Compute and return the lower left corner of this legend, along with its width and height.
virtual void SetTitle(const vtkStdString &title)
Get/set the title text of the legend.
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:40
Allocate and hold a VTK object.
Definition vtkNew.h:62
Superclass for mapping scalar values to colors.
Wrapper around std::string to keep symbols short.
represent text properties.
An array holding vtkVariants.