VTK
9.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Charts
Core
vtkCategoryLegend.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
3
19
#ifndef vtkCategoryLegend_h
20
#define vtkCategoryLegend_h
21
22
#include "
vtkChartLegend.h
"
23
#include "vtkChartsCoreModule.h"
// For export macro
24
#include "
vtkNew.h
"
// For vtkNew ivars
25
#include "
vtkStdString.h
"
// For vtkStdString ivars
26
#include "
vtkVector.h
"
// For vtkRectf
27
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
28
29
VTK_ABI_NAMESPACE_BEGIN
30
class
vtkScalarsToColors
;
31
class
vtkTextProperty
;
32
class
vtkVariantArray
;
33
34
class
VTKCHARTSCORE_EXPORT
VTK_MARSHALAUTO
vtkCategoryLegend
:
public
vtkChartLegend
35
{
36
public
:
37
vtkTypeMacro(
vtkCategoryLegend
,
vtkChartLegend
);
38
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
39
40
static
vtkCategoryLegend
*
New
();
41
45
enum
46
{
47
VERTICAL = 0,
48
HORIZONTAL
49
};
50
54
bool
Paint
(
vtkContext2D
* painter)
override
;
55
60
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter)
override
;
61
63
68
vtkGetObjectMacro(ScalarsToColors,
vtkScalarsToColors
);
69
virtual
void
SetScalarsToColors(
vtkScalarsToColors
*);
71
73
79
vtkGetObjectMacro(Values,
vtkVariantArray
);
80
virtual
void
SetValues(
vtkVariantArray
*);
82
84
87
virtual
void
SetTitle(
const
vtkStdString
&
title
);
88
virtual
vtkStdString
GetTitle();
90
92
95
vtkGetMacro(OutlierLabel,
vtkStdString
);
96
vtkSetMacro(OutlierLabel,
vtkStdString
);
98
99
protected
:
100
vtkCategoryLegend
();
101
~
vtkCategoryLegend
()
override
;
102
103
bool
HasOutliers
;
104
float
TitleWidthOffset
;
105
vtkScalarsToColors
*
ScalarsToColors
;
106
vtkStdString
OutlierLabel
;
107
vtkStdString
Title
;
108
vtkNew<vtkTextProperty>
TitleProperties
;
109
vtkVariantArray
*
Values
;
110
111
private
:
112
vtkCategoryLegend
(
const
vtkCategoryLegend
&) =
delete
;
113
void
operator=(
const
vtkCategoryLegend
&) =
delete
;
114
};
115
116
VTK_ABI_NAMESPACE_END
117
#endif
vtkCategoryLegend::OutlierLabel
vtkStdString OutlierLabel
Definition:
vtkCategoryLegend.h:106
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:27
vtkCategoryLegend::Title
vtkStdString Title
Definition:
vtkCategoryLegend.h:107
vtkVariantArray
An array holding vtkVariants.
Definition:
vtkVariantArray.h:39
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
vtkWrappingHints.h
vtkCategoryLegend::ScalarsToColors
vtkScalarsToColors * ScalarsToColors
Definition:
vtkCategoryLegend.h:105
vtkCategoryLegend::HasOutliers
bool HasOutliers
Definition:
vtkCategoryLegend.h:103
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:56
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:49
vtkCategoryLegend::Values
vtkVariantArray * Values
Definition:
vtkCategoryLegend.h:109
vtkRectf
Definition:
vtkRect.h:327
vtkCategoryLegend::TitleWidthOffset
float TitleWidthOffset
Definition:
vtkCategoryLegend.h:104
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:28
vtkChartLegend::New
static vtkChartLegend * New()
Creates a 2D Chart object.
vtkChartLegend.h
vtkVector.h
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:26
vtkNew.h
vtkStdString.h
vtkCategoryLegend
Legend item to display categorical data.
Definition:
vtkCategoryLegend.h:34
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:32
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:108
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition:
vtkWrappingHints.h:75
vtkX3D::title
Definition:
vtkX3D.h:501
Generated on Tue Oct 20 2026 10:48:01 for VTK by
1.8.10