VTK
9.3.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
28
VTK_ABI_NAMESPACE_BEGIN
29
class
vtkScalarsToColors
;
30
class
vtkTextProperty
;
31
class
vtkVariantArray
;
32
33
class
VTKCHARTSCORE_EXPORT
vtkCategoryLegend
:
public
vtkChartLegend
34
{
35
public
:
36
vtkTypeMacro(
vtkCategoryLegend
,
vtkChartLegend
);
37
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
38
39
static
vtkCategoryLegend
*
New
();
40
44
enum
45
{
46
VERTICAL = 0,
47
HORIZONTAL
48
};
49
53
bool
Paint
(
vtkContext2D
* painter)
override
;
54
59
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter)
override
;
60
62
67
virtual
void
SetScalarsToColors(
vtkScalarsToColors
* stc);
68
virtual
vtkScalarsToColors
* GetScalarsToColors();
70
72
78
vtkGetObjectMacro(Values,
vtkVariantArray
);
79
virtual
void
SetValues(
vtkVariantArray
*);
81
83
86
virtual
void
SetTitle(
const
vtkStdString
&
title
);
87
virtual
vtkStdString
GetTitle();
89
91
94
vtkGetMacro(OutlierLabel,
vtkStdString
);
95
vtkSetMacro(OutlierLabel,
vtkStdString
);
97
98
protected
:
99
vtkCategoryLegend
();
100
~
vtkCategoryLegend
()
override
;
101
102
bool
HasOutliers
;
103
float
TitleWidthOffset
;
104
vtkScalarsToColors
*
ScalarsToColors
;
105
vtkStdString
OutlierLabel
;
106
vtkStdString
Title
;
107
vtkNew<vtkTextProperty>
TitleProperties
;
108
vtkVariantArray
*
Values
;
109
110
private
:
111
vtkCategoryLegend
(
const
vtkCategoryLegend
&) =
delete
;
112
void
operator=(
const
vtkCategoryLegend
&) =
delete
;
113
};
114
115
VTK_ABI_NAMESPACE_END
116
#endif
vtkCategoryLegend::OutlierLabel
vtkStdString OutlierLabel
Definition:
vtkCategoryLegend.h:105
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:28
vtkCategoryLegend::Title
vtkStdString Title
Definition:
vtkCategoryLegend.h:106
vtkVariantArray
An array holding vtkVariants.
Definition:
vtkVariantArray.h:37
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
vtkCategoryLegend::ScalarsToColors
vtkScalarsToColors * ScalarsToColors
Definition:
vtkCategoryLegend.h:104
vtkCategoryLegend::HasOutliers
bool HasOutliers
Definition:
vtkCategoryLegend.h:102
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:55
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:108
vtkRectf
Definition:
vtkRect.h:327
vtkCategoryLegend::TitleWidthOffset
float TitleWidthOffset
Definition:
vtkCategoryLegend.h:103
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:25
vtkNew.h
vtkStdString.h
vtkCategoryLegend
Legend item to display categorical data.
Definition:
vtkCategoryLegend.h:33
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:31
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:107
vtkX3D::title
Definition:
vtkX3D.h:500
Generated on Sun Mar 23 2025 01:37:58 for VTK by
1.8.10