VTK
dox
opt
build
vtk6-6.3.0+dfsg2
Charts
Core
vtkChartLegend.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkChartLegend.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
28
#ifndef vtkChartLegend_h
29
#define vtkChartLegend_h
30
31
#include "
vtkChartsCoreModule.h
"
// For export macro
32
#include "
vtkContextItem.h
"
33
#include "
vtkNew.h
"
// For vtkNew
34
#include "
vtkRect.h
"
// For vtkRectf return value
35
36
class
vtkChart
;
37
class
vtkPen
;
38
class
vtkBrush
;
39
class
vtkTextProperty
;
40
41
class
VTKCHARTSCORE_EXPORT
vtkChartLegend
:
public
vtkContextItem
42
{
43
public
:
44
vtkTypeMacro
(
vtkChartLegend
,
vtkContextItem
);
45
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
46
48
static
vtkChartLegend
*
New
();
49
51
52
vtkSetVector2Macro
(Point,
float
);
54
56
57
vtkGetVector2Macro
(Point,
float
);
59
60
enum
{
61
LEFT = 0,
62
CENTER
,
63
RIGHT
,
64
TOP
,
65
BOTTOM
,
66
CUSTOM
67
};
68
70
void
SetPoint
(
const
vtkVector2f
&
point
);
71
73
const
vtkVector2f
&
GetPointVector
();
74
76
78
vtkSetMacro
(HorizontalAlignment,
int
);
80
82
83
vtkGetMacro
(HorizontalAlignment,
int
);
85
87
89
vtkSetMacro
(VerticalAlignment,
int
);
91
93
94
vtkGetMacro
(VerticalAlignment,
int
);
96
98
99
vtkSetMacro
(Padding,
int
);
101
103
104
vtkGetMacro
(Padding,
int
);
106
108
109
vtkSetMacro
(SymbolWidth,
int
);
111
113
114
vtkGetMacro
(SymbolWidth,
int
);
116
118
virtual
void
SetLabelSize
(
int
size
);
119
121
virtual
int
GetLabelSize
();
122
124
128
vtkSetMacro
(
Inline
,
bool
);
129
vtkGetMacro
(
Inline
,
bool
);
131
133
137
vtkSetMacro
(DragEnabled,
bool
);
138
vtkGetMacro
(DragEnabled,
bool
);
140
143
void
SetChart
(
vtkChart
* chart);
144
147
vtkChart
*
GetChart
();
148
151
virtual
void
Update
();
152
154
virtual
bool
Paint
(
vtkContext2D
*painter);
155
161
virtual
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter);
162
164
vtkPen
*
GetPen
();
165
167
vtkBrush
*
GetBrush
();
168
170
vtkTextProperty
*
GetLabelProperties
();
171
173
179
vtkSetMacro
(CacheBounds,
bool
);
180
vtkGetMacro
(CacheBounds,
bool
);
181
vtkBooleanMacro
(CacheBounds,
bool
);
183
185
virtual
bool
Hit
(
const
vtkContextMouseEvent
&mouse);
186
188
virtual
bool
MouseMoveEvent
(
const
vtkContextMouseEvent
&mouse);
189
191
virtual
bool
MouseButtonPressEvent
(
const
vtkContextMouseEvent
&mouse);
192
194
virtual
bool
MouseButtonReleaseEvent
(
const
vtkContextMouseEvent
&mouse);
195
196
protected
:
197
vtkChartLegend
();
198
~vtkChartLegend
();
199
200
float
*
Point
;
// The point the legend is anchored to.
201
int
HorizontalAlignment
;
// Alignment of the legend to the point it is anchored to.
202
int
VerticalAlignment
;
// Alignment of the legend to the point it is anchored to.
203
205
vtkNew<vtkPen>
Pen
;
206
208
vtkNew<vtkBrush>
Brush
;
209
211
vtkNew<vtkTextProperty>
LabelProperties
;
212
214
bool
DragEnabled
;
215
218
bool
CacheBounds
;
219
221
int
Button
;
222
223
vtkTimeStamp
PlotTime
;
224
vtkTimeStamp
RectTime
;
225
226
vtkRectf
Rect
;
227
229
int
Padding
;
230
232
int
SymbolWidth
;
233
235
bool
Inline
;
236
237
// Private storage class
238
class
Private;
239
Private*
Storage
;
240
241
private
:
242
vtkChartLegend
(
const
vtkChartLegend
&);
// Not implemented.
243
void
operator=(
const
vtkChartLegend
&);
// Not implemented.
244
};
245
246
#endif //vtkChartLegend_h
vtkChartLegend::GetLabelSize
virtual int GetLabelSize()
vtkChart
Factory class for drawing 2D charts.
Definition:
vtkChart.h:50
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition:
vtkBrush.h:37
vtkChartLegend::Update
virtual void Update()
vtkChartsCoreModule.h
vtkContextMouseEvent
data structure to represent mouse events.
Definition:
vtkContextMouseEvent.h:40
vtkChartLegend::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
vtkSetVector2Macro
#define vtkSetVector2Macro(name, type)
Definition:
vtkSetGet.h:254
vtkChartLegend::New
static vtkChartLegend * New()
vtkChartLegend::Button
int Button
Definition:
vtkChartLegend.h:221
vtkChartLegend::~vtkChartLegend
~vtkChartLegend()
vtkChartLegend::GetLabelProperties
vtkTextProperty * GetLabelProperties()
vtkGetVector2Macro
#define vtkGetVector2Macro(name, type)
Definition:
vtkSetGet.h:270
vtkChartLegend::Pen
vtkNew< vtkPen > Pen
Definition:
vtkChartLegend.h:205
vtkChartLegend::SetPoint
void SetPoint(const vtkVector2f &point)
vtkChartLegend::RectTime
vtkTimeStamp RectTime
Definition:
vtkChartLegend.h:224
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:42
vtkTimeStamp
record modification and/or execution time
Definition:
vtkTimeStamp.h:35
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition:
vtkSetGet.h:642
vtkChartLegend::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
vtkChartLegend::Paint
virtual bool Paint(vtkContext2D *painter)
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:57
vtkContextItem.h
vtkChartLegend::CacheBounds
bool CacheBounds
Definition:
vtkChartLegend.h:218
vtkChartLegend::Inline
bool Inline
Definition:
vtkChartLegend.h:235
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
vtkChartLegend::GetPen
vtkPen * GetPen()
vtkChartLegend::GetChart
vtkChart * GetChart()
vtkX3D::point
@ point
Definition:
vtkX3D.h:236
vtkChartLegend::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
vtkChartLegend::GetPointVector
const vtkVector2f & GetPointVector()
vtkRect.h
vtkChartLegend::LabelProperties
vtkNew< vtkTextProperty > LabelProperties
Definition:
vtkChartLegend.h:211
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkChartLegend::DragEnabled
bool DragEnabled
Definition:
vtkChartLegend.h:214
vtkChartLegend::vtkChartLegend
vtkChartLegend()
vtkNew< vtkPen >
vtkChartLegend::Hit
virtual bool Hit(const vtkContextMouseEvent &mouse)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition:
vtkSetGet.h:93
vtkChartLegend::GetBrush
vtkBrush * GetBrush()
vtkChartLegend::CENTER
@ CENTER
Definition:
vtkChartLegend.h:62
vtkChartLegend::SymbolWidth
int SymbolWidth
Definition:
vtkChartLegend.h:232
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:39
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition:
vtkContextItem.h:34
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkChartLegend::Rect
vtkRectf Rect
Definition:
vtkChartLegend.h:226
vtkChartLegend::PlotTime
vtkTimeStamp PlotTime
Definition:
vtkChartLegend.h:223
vtkChartLegend::BOTTOM
@ BOTTOM
Definition:
vtkChartLegend.h:65
vtkChartLegend::VerticalAlignment
int VerticalAlignment
Definition:
vtkChartLegend.h:202
vtkChartLegend::HorizontalAlignment
int HorizontalAlignment
Definition:
vtkChartLegend.h:201
vtkChartLegend::Point
float * Point
Definition:
vtkChartLegend.h:200
vtkNew.h
vtkX3D::Inline
@ Inline
Definition:
vtkX3D.h:113
vtkChartLegend::SetChart
void SetChart(vtkChart *chart)
vtkChartLegend::TOP
@ TOP
Definition:
vtkChartLegend.h:64
vtkChartLegend::Padding
int Padding
Definition:
vtkChartLegend.h:229
vtkChartLegend::Storage
Private * Storage
Definition:
vtkChartLegend.h:238
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition:
vtkPen.h:39
VTKCHARTSCORE_EXPORT
#define VTKCHARTSCORE_EXPORT
Definition:
vtkChartsCoreModule.h:15
vtkChartLegend::SetLabelSize
virtual void SetLabelSize(int size)
vtkRectf
Definition:
vtkRect.h:97
vtkVector2f
Definition:
vtkVector.h:277
vtkChartLegend::RIGHT
@ RIGHT
Definition:
vtkChartLegend.h:63
vtkChartLegend::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::size
GLsizeiptr size
Definition:
vtkgl.h:11843
vtkChartLegend::Brush
vtkNew< vtkBrush > Brush
Definition:
vtkChartLegend.h:208
Generated by
1.8.20