VTK
9.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
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
40
class
vtkScalarsToColors
;
41
class
vtkTextProperty
;
42
class
vtkVariantArray
;
43
44
class
VTKCHARTSCORE_EXPORT
vtkCategoryLegend
:
public
vtkChartLegend
45
{
46
public
:
47
vtkTypeMacro(
vtkCategoryLegend
,
vtkChartLegend
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
49
50
static
vtkCategoryLegend
*
New
();
51
55
enum
56
{
57
VERTICAL = 0,
58
HORIZONTAL
59
};
60
64
bool
Paint
(
vtkContext2D
* painter)
override
;
65
70
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter)
override
;
71
73
78
virtual
void
SetScalarsToColors(
vtkScalarsToColors
* stc);
79
virtual
vtkScalarsToColors
* GetScalarsToColors();
81
83
89
vtkGetObjectMacro(Values,
vtkVariantArray
);
90
virtual
void
SetValues(
vtkVariantArray
*);
92
94
97
virtual
void
SetTitle(
const
vtkStdString
&
title
);
98
virtual
vtkStdString
GetTitle();
100
102
105
vtkGetMacro(OutlierLabel,
vtkStdString
);
106
vtkSetMacro(OutlierLabel,
vtkStdString
);
108
109
protected
:
110
vtkCategoryLegend
();
111
~
vtkCategoryLegend
()
override
;
112
113
bool
HasOutliers
;
114
float
TitleWidthOffset
;
115
vtkScalarsToColors
*
ScalarsToColors
;
116
vtkStdString
OutlierLabel
;
117
vtkStdString
Title
;
118
vtkNew<vtkTextProperty>
TitleProperties
;
119
vtkVariantArray
*
Values
;
120
121
private
:
122
vtkCategoryLegend
(
const
vtkCategoryLegend
&) =
delete
;
123
void
operator=(
const
vtkCategoryLegend
&) =
delete
;
124
};
125
126
#endif
vtkCategoryLegend::OutlierLabel
vtkStdString OutlierLabel
Definition:
vtkCategoryLegend.h:116
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:38
vtkCategoryLegend::Title
vtkStdString Title
Definition:
vtkCategoryLegend.h:117
vtkVariantArray
An array holding vtkVariants.
Definition:
vtkVariantArray.h:52
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
vtkCategoryLegend::ScalarsToColors
vtkScalarsToColors * ScalarsToColors
Definition:
vtkCategoryLegend.h:115
vtkCategoryLegend::HasOutliers
bool HasOutliers
Definition:
vtkCategoryLegend.h:113
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:66
vtkChartLegend::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:57
vtkCategoryLegend::Values
vtkVariantArray * Values
Definition:
vtkCategoryLegend.h:119
vtkRectf
Definition:
vtkRect.h:338
vtkCategoryLegend::TitleWidthOffset
float TitleWidthOffset
Definition:
vtkCategoryLegend.h:114
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkChartLegend::New
static vtkChartLegend * New()
Creates a 2D Chart object.
vtkChartLegend.h
vtkVector.h
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:36
vtkNew.h
vtkStdString.h
vtkCategoryLegend
Legend item to display categorical data.
Definition:
vtkCategoryLegend.h:44
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:42
vtkNew< vtkTextProperty >
vtkChartLegend::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the axis, called whenever the axis needs to be drawn.
vtkCategoryLegend::TitleProperties
vtkNew< vtkTextProperty > TitleProperties
Definition:
vtkCategoryLegend.h:118
vtkX3D::title
Definition:
vtkX3D.h:506
Generated on Mon Oct 16 2023 12:11:35 for VTK by
1.8.10