VTK
dox
opt
build
vtk6-6.3.0+dfsg2
Rendering
Context2D
vtkBlockItem.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkBlockItem.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
27
#ifndef vtkBlockItem_h
28
#define vtkBlockItem_h
29
30
#include "
vtkRenderingContext2DModule.h
"
// For export macro
31
#include "
vtkContextItem.h
"
32
#include "
vtkStdString.h
"
// For vtkStdString ivars
33
34
class
vtkContext2D
;
35
36
class
VTKRENDERINGCONTEXT2D_EXPORT
vtkBlockItem
:
public
vtkContextItem
37
{
38
public
:
39
vtkTypeMacro
(
vtkBlockItem
,
vtkContextItem
);
40
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
41
42
static
vtkBlockItem
*
New
();
43
45
virtual
bool
Paint
(
vtkContext2D
*painter);
46
47
//BTX
49
virtual
bool
Hit
(
const
vtkContextMouseEvent
&mouse);
50
52
virtual
bool
MouseEnterEvent
(
const
vtkContextMouseEvent
&mouse);
53
55
virtual
bool
MouseMoveEvent
(
const
vtkContextMouseEvent
&mouse);
56
58
virtual
bool
MouseLeaveEvent
(
const
vtkContextMouseEvent
&mouse);
59
61
virtual
bool
MouseButtonPressEvent
(
const
vtkContextMouseEvent
&mouse);
62
64
65
virtual
bool
MouseButtonReleaseEvent
(
const
vtkContextMouseEvent
&mouse);
66
//ETX
68
70
virtual
void
SetLabel
(
const
vtkStdString
&label);
71
73
virtual
vtkStdString
GetLabel
();
74
76
79
vtkSetVector4Macro
(Dimensions,
float
);
81
83
86
vtkGetVector4Macro
(Dimensions,
float
);
88
89
//BTX
90
void
SetScalarFunctor
(
double
(*scalarFunction)(
double
,
double
));
91
//ETX
92
93
//BTX
94
protected
:
95
vtkBlockItem
();
96
~vtkBlockItem
();
97
98
float
Dimensions[4];
99
100
vtkStdString
Label
;
101
102
bool
MouseOver
;
103
104
// Some function pointers to optionally do funky things...
105
double
(*scalarFunction)(
double
,
double
);
106
107
private
:
108
vtkBlockItem
(
const
vtkBlockItem
&);
// Not implemented.
109
void
operator=(
const
vtkBlockItem
&);
// Not implemented.
110
//ETX
111
};
112
113
#endif //vtkBlockItem_h
vtkStdString.h
vtkContextMouseEvent
data structure to represent mouse events.
Definition:
vtkContextMouseEvent.h:40
vtkBlockItem::Paint
virtual bool Paint(vtkContext2D *painter)
double
double
Definition:
vtkVectorOperators.h:166
VTKRENDERINGCONTEXT2D_EXPORT
#define VTKRENDERINGCONTEXT2D_EXPORT
Definition:
vtkRenderingContext2DModule.h:15
vtkBlockItem::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition:
vtkSetGet.h:642
vtkBlockItem::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:57
vtkContextItem.h
vtkBlockItem::Hit
virtual bool Hit(const vtkContextMouseEvent &mouse)
vtkBlockItem::GetLabel
virtual vtkStdString GetLabel()
vtkBlockItem::MouseLeaveEvent
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkBlockItem::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
vtkBlockItem::MouseOver
bool MouseOver
Definition:
vtkBlockItem.h:102
vtkBlockItem::~vtkBlockItem
~vtkBlockItem()
vtkBlockItem::SetScalarFunctor
void SetScalarFunctor(double(*scalarFunction)(double, double))
vtkBlockItem::MouseEnterEvent
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition:
vtkContextItem.h:34
vtkSetVector4Macro
#define vtkSetVector4Macro(name, type)
Definition:
vtkSetGet.h:322
vtkBlockItem::vtkBlockItem
vtkBlockItem()
vtkBlockItem::New
static vtkBlockItem * New()
vtkBlockItem::Label
vtkStdString Label
Definition:
vtkBlockItem.h:100
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:48
vtkGetVector4Macro
#define vtkGetVector4Macro(name, type)
Definition:
vtkSetGet.h:341
vtkRenderingContext2DModule.h
vtkBlockItem::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkBlockItem
a vtkContextItem that draws a block (optional label).
Definition:
vtkBlockItem.h:37
vtkBlockItem::SetLabel
virtual void SetLabel(const vtkStdString &label)
Generated by
1.8.20