VTK
9.6.1
Main Page
Related Pages
Topics
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
18
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::SetScalarsToColors
virtual void SetScalarsToColors(vtkScalarsToColors *)
Get/Set the vtkScalarsToColors used to draw this legend.
vtkCategoryLegend::ScalarsToColors
vtkScalarsToColors * ScalarsToColors
Definition
vtkCategoryLegend.h:105
vtkCategoryLegend::TitleWidthOffset
float TitleWidthOffset
Definition
vtkCategoryLegend.h:104
vtkCategoryLegend::VERTICAL
@ VERTICAL
Definition
vtkCategoryLegend.h:47
vtkCategoryLegend::HORIZONTAL
@ HORIZONTAL
Definition
vtkCategoryLegend.h:48
vtkCategoryLegend::vtkCategoryLegend
vtkCategoryLegend()
vtkCategoryLegend::GetTitle
virtual vtkStdString GetTitle()
Get/set the title text of the legend.
vtkCategoryLegend::TitleProperties
vtkNew< vtkTextProperty > TitleProperties
Definition
vtkCategoryLegend.h:108
vtkCategoryLegend::~vtkCategoryLegend
~vtkCategoryLegend() override
vtkCategoryLegend::Title
vtkStdString Title
Definition
vtkCategoryLegend.h:107
vtkCategoryLegend::New
static vtkCategoryLegend * New()
vtkCategoryLegend::Values
vtkVariantArray * Values
Definition
vtkCategoryLegend.h:109
vtkCategoryLegend::SetValues
virtual void SetValues(vtkVariantArray *)
Get/Set the array of values that will be represented by this legend.
vtkCategoryLegend::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCategoryLegend::Paint
bool Paint(vtkContext2D *painter) override
Paint the legend into a rectangle defined by the bounds.
vtkCategoryLegend::HasOutliers
bool HasOutliers
Definition
vtkCategoryLegend.h:103
vtkCategoryLegend::OutlierLabel
vtkStdString OutlierLabel
Definition
vtkCategoryLegend.h:106
vtkCategoryLegend::GetBoundingRect
vtkRectf GetBoundingRect(vtkContext2D *painter) override
Compute and return the lower left corner of this legend, along with its width and height.
vtkCategoryLegend::SetTitle
virtual void SetTitle(const vtkStdString &title)
Get/set the title text of the legend.
vtkChartLegend::vtkChartLegend
vtkChartLegend()
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition
vtkContext2D.h:50
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkNew
Allocate and hold a VTK object.
Definition
vtkNew.h:58
vtkRectf
Definition
vtkRect.h:328
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition
vtkScalarsToColors.h:58
vtkStdString
Wrapper around std::string to keep symbols short.
Definition
vtkStdString.h:28
vtkTextProperty
represent text properties.
Definition
vtkTextProperty.h:27
vtkVariantArray
An array holding vtkVariants.
Definition
vtkVariantArray.h:39
vtkChartLegend.h
vtkNew.h
vtkStdString.h
vtkVector.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:60
Generated on
for VTK by
1.16.1