VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkTexturedButtonRepresentation2D.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkTexturedButtonRepresentation2D.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
=========================================================================*/
46
#ifndef __vtkTexturedButtonRepresentation2D_h
47
#define __vtkTexturedButtonRepresentation2D_h
48
49
#include "
vtkButtonRepresentation.h
"
50
51
class
vtkProperty2D
;
52
class
vtkImageData
;
53
class
vtkTextureArray;
//PIMPLd
54
class
vtkProperty2D
;
55
class
vtkAlgorithmOutput
;
56
class
vtkBalloonRepresentation
;
57
class
vtkCoordinate
;
58
59
60
class
VTK_WIDGETS_EXPORT
vtkTexturedButtonRepresentation2D
:
public
vtkButtonRepresentation
61
{
62
public
:
64
static
vtkTexturedButtonRepresentation2D
*
New
();
65
67
68
vtkTypeMacro(
vtkTexturedButtonRepresentation2D
,
vtkButtonRepresentation
);
69
void
PrintSelf
(ostream& os,
vtkIndent
indent);
71
73
75
virtual
void
SetProperty(
vtkProperty2D
*p);
76
vtkGetObjectMacro(Property,
vtkProperty2D
);
78
80
81
virtual
void
SetHoveringProperty(
vtkProperty2D
*p);
82
vtkGetObjectMacro(HoveringProperty,
vtkProperty2D
);
84
86
87
virtual
void
SetSelectingProperty(
vtkProperty2D
*p);
88
vtkGetObjectMacro(SelectingProperty,
vtkProperty2D
);
90
92
94
void
SetButtonTexture(
int
i,
vtkImageData
*
image
);
95
vtkImageData
*GetButtonTexture(
int
i);
97
100
vtkBalloonRepresentation
*
GetBalloon
() {
return
this->Balloon;}
101
103
105
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify=0);
106
virtual
void
BuildRepresentation
();
107
virtual
void
Highlight
(
int
state);
109
116
virtual
void
PlaceWidget
(
double
bounds[6]);
117
127
virtual
void
PlaceWidget
(
double
anchor[3],
int
size
[2]);
128
130
131
virtual
void
ShallowCopy
(
vtkProp
*prop);
132
virtual
double
*
GetBounds
();
133
virtual
void
GetActors
(
vtkPropCollection
*pc);
134
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
135
virtual
int
RenderOverlay
(
vtkViewport
*);
136
virtual
int
HasTranslucentPolygonalGeometry
();
138
139
protected
:
140
vtkTexturedButtonRepresentation2D
();
141
~
vtkTexturedButtonRepresentation2D
();
142
143
// Representing the button
144
vtkBalloonRepresentation
*
Balloon
;
145
146
// Properties of the button
147
vtkProperty2D
*
Property
;
148
vtkProperty2D
*
HoveringProperty
;
149
vtkProperty2D
*
SelectingProperty
;
150
void
CreateDefaultProperties();
151
152
// Keep track of the images (textures) associated with the N
153
// states of the button.
154
vtkTextureArray *
TextureArray
;
155
156
// Tracking world position
157
vtkCoordinate
*
Anchor
;
158
159
private
:
160
vtkTexturedButtonRepresentation2D
(
const
vtkTexturedButtonRepresentation2D
&);
//Not implemented
161
void
operator=(
const
vtkTexturedButtonRepresentation2D
&);
//Not implemented
162
};
163
164
#endif
Generated on Wed May 30 2012 13:22:27 for VTK by
1.8.1