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
31
#ifndef vtkCategoryLegend_h
32
#define vtkCategoryLegend_h
33
34
#include "vtkChartsCoreModule.h"
// For export macro
35
#include "
vtkChartLegend.h
"
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
static
vtkCategoryLegend
*
New
();
49
53
enum
{
54
VERTICAL = 0,
55
HORIZONTAL
56
};
57
61
virtual
bool
Paint
(
vtkContext2D
*painter);
62
67
virtual
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter);
68
70
75
virtual
void
SetScalarsToColors
(
vtkScalarsToColors
* stc);
76
virtual
vtkScalarsToColors
*
GetScalarsToColors
();
78
80
86
vtkGetMacro(Values,
vtkVariantArray
*);
87
vtkSetMacro
(Values,
vtkVariantArray
*);
89
91
94
virtual
void
SetTitle
(
const
vtkStdString
&
title
);
95
virtual
vtkStdString
GetTitle
();
97
99
102
vtkGetMacro(OutlierLabel,
vtkStdString
);
103
vtkSetMacro
(OutlierLabel,
vtkStdString
);
105
106
protected
:
107
vtkCategoryLegend
();
108
virtual
~vtkCategoryLegend
();
109
110
bool
HasOutliers
;
111
float
TitleWidthOffset
;
112
vtkScalarsToColors
*
ScalarsToColors
;
113
vtkStdString
OutlierLabel
;
114
vtkStdString
Title
;
115
vtkNew<vtkTextProperty>
TitleProperties
;
116
vtkVariantArray
*
Values
;
117
118
private
:
119
vtkCategoryLegend
(
const
vtkCategoryLegend
&) VTK_DELETE_FUNCTION;
120
void
operator=(
const
vtkCategoryLegend
&) VTK_DELETE_FUNCTION;
121
};
122
123
#endif
vtkCategoryLegend
Legend item to display categorical data.
Definition:
vtkCategoryLegend.h:45
vtkCategoryLegend::ScalarsToColors
vtkScalarsToColors * ScalarsToColors
Definition:
vtkCategoryLegend.h:112
vtkCategoryLegend::TitleWidthOffset
float TitleWidthOffset
Definition:
vtkCategoryLegend.h:111
vtkCategoryLegend::~vtkCategoryLegend
virtual ~vtkCategoryLegend()
vtkCategoryLegend::vtkCategoryLegend
vtkCategoryLegend()
vtkCategoryLegend::GetTitle
virtual vtkStdString GetTitle()
vtkCategoryLegend::TitleProperties
vtkNew< vtkTextProperty > TitleProperties
Definition:
vtkCategoryLegend.h:115
vtkCategoryLegend::Paint
virtual bool Paint(vtkContext2D *painter)
Paint the legend into a rectangle defined by the bounds.
vtkCategoryLegend::Title
vtkStdString Title
Definition:
vtkCategoryLegend.h:114
vtkCategoryLegend::GetScalarsToColors
virtual vtkScalarsToColors * GetScalarsToColors()
vtkCategoryLegend::New
static vtkCategoryLegend * New()
vtkCategoryLegend::Values
vtkVariantArray * Values
Definition:
vtkCategoryLegend.h:116
vtkCategoryLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
Compute and return the lower left corner of this legend, along with its width and height.
vtkCategoryLegend::HasOutliers
bool HasOutliers
Definition:
vtkCategoryLegend.h:110
vtkCategoryLegend::OutlierLabel
vtkStdString OutlierLabel
Definition:
vtkCategoryLegend.h:113
vtkCategoryLegend::SetScalarsToColors
virtual void SetScalarsToColors(vtkScalarsToColors *stc)
Get/Set the vtkScalarsToColors used to draw this legend.
vtkCategoryLegend::SetTitle
virtual void SetTitle(const vtkStdString &title)
Get/set the title text of the legend.
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:43
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:58
vtkNew< vtkTextProperty >
vtkRectf
Definition:
vtkRect.h:297
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:67
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:49
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:40
vtkVariantArray
An array holding vtkVariants.
Definition:
vtkVariantArray.h:47
vtkX3D::title
@ title
Definition:
vtkX3D.h:500
vtkChartLegend.h
vtkNew.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkStdString.h
vtkVector.h
Generated by
1.9.4