VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dox
Charts
Core
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
28
#ifndef vtkCategoryLegend_h
29
#define vtkCategoryLegend_h
30
31
#include "vtkChartsCoreModule.h"
// For export macro
32
#include "
vtkChartLegend.h
"
33
#include "
vtkNew.h
"
// For vtkNew ivars
34
#include "
vtkStdString.h
"
// For vtkStdString ivars
35
#include "
vtkVector.h
"
// For vtkRectf
36
37
class
vtkScalarsToColors
;
38
class
vtkTextProperty
;
39
class
vtkVariantArray
;
40
41
class
VTKCHARTSCORE_EXPORT
vtkCategoryLegend
:
public
vtkChartLegend
42
{
43
public
:
44
vtkTypeMacro(
vtkCategoryLegend
,
vtkChartLegend
);
45
static
vtkCategoryLegend
*
New
();
46
50
enum
{
51
VERTICAL = 0,
52
HORIZONTAL
53
};
54
58
bool
Paint
(
vtkContext2D
*painter) VTK_OVERRIDE;
59
64
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter) VTK_OVERRIDE;
65
67
72
virtual
void
SetScalarsToColors(
vtkScalarsToColors
* stc);
73
virtual
vtkScalarsToColors
* GetScalarsToColors();
75
77
83
vtkGetMacro(Values,
vtkVariantArray
*);
84
vtkSetMacro
(Values,
vtkVariantArray
*);
86
88
91
virtual
void
SetTitle(
const
vtkStdString
&
title
);
92
virtual
vtkStdString
GetTitle();
94
96
99
vtkGetMacro(OutlierLabel,
vtkStdString
);
100
vtkSetMacro
(OutlierLabel,
vtkStdString
);
102
103
protected
:
104
vtkCategoryLegend
();
105
~
vtkCategoryLegend
() VTK_OVERRIDE;
106
107
bool
HasOutliers;
108
float
TitleWidthOffset;
109
vtkScalarsToColors
* ScalarsToColors;
110
vtkStdString
OutlierLabel;
111
vtkStdString
Title;
112
vtkNew
<
vtkTextProperty
> TitleProperties;
113
vtkVariantArray
* Values;
114
115
private:
116
vtkCategoryLegend
(const
vtkCategoryLegend
&) VTK_DELETE_FUNCTION;
117
void
operator=(const
vtkCategoryLegend
&) VTK_DELETE_FUNCTION;
118
};
119
120
#endif
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:41
vtkVariantArray
An array holding vtkVariants.
Definition:
vtkVariantArray.h:43
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:60
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:52
vtkRectf
Definition:
vtkRect.h:293
vtkChartLegend::New
static vtkChartLegend * New()
Creates a 2D Chart object.
vtkChartLegend.h
vtkVector.h
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:33
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkNew.h
vtkStdString.h
vtkCategoryLegend
Legend item to display categorical data.
Definition:
vtkCategoryLegend.h:41
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:39
vtkNew
Allocate and hold a VTK object.
Definition:
vtkNew.h:61
vtkChartLegend::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the axis, called whenever the axis needs to be drawn.
vtkX3D::title
Definition:
vtkX3D.h:500
Generated by
1.8.5