VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
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 "vtkInteractionWidgetsModule.h"
// For export macro
50
#include "
vtkButtonRepresentation.h
"
51
52
class
vtkProperty2D
;
53
class
vtkImageData
;
54
class
vtkTextureArray;
//PIMPLd
55
class
vtkProperty2D
;
56
class
vtkAlgorithmOutput
;
57
class
vtkBalloonRepresentation
;
58
class
vtkCoordinate
;
59
60
61
class
VTKINTERACTIONWIDGETS_EXPORT
vtkTexturedButtonRepresentation2D
:
public
vtkButtonRepresentation
62
{
63
public
:
65
static
vtkTexturedButtonRepresentation2D
*
New
();
66
68
69
vtkTypeMacro(
vtkTexturedButtonRepresentation2D
,
vtkButtonRepresentation
);
70
void
PrintSelf
(ostream& os,
vtkIndent
indent);
72
74
76
virtual
void
SetProperty(
vtkProperty2D
*p);
77
vtkGetObjectMacro(Property,
vtkProperty2D
);
79
81
82
virtual
void
SetHoveringProperty(
vtkProperty2D
*p);
83
vtkGetObjectMacro(HoveringProperty,
vtkProperty2D
);
85
87
88
virtual
void
SetSelectingProperty(
vtkProperty2D
*p);
89
vtkGetObjectMacro(SelectingProperty,
vtkProperty2D
);
91
93
95
void
SetButtonTexture(
int
i,
vtkImageData
*
image
);
96
vtkImageData
*GetButtonTexture(
int
i);
98
101
vtkBalloonRepresentation
*
GetBalloon
() {
return
this->Balloon;}
102
104
106
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify=0);
107
virtual
void
BuildRepresentation
();
108
virtual
void
Highlight
(
int
state);
110
117
virtual
void
PlaceWidget
(
double
bounds[6]);
118
128
virtual
void
PlaceWidget
(
double
anchor[3],
int
size
[2]);
129
131
132
virtual
void
ShallowCopy
(
vtkProp
*prop);
133
virtual
double
*
GetBounds
();
134
virtual
void
GetActors
(
vtkPropCollection
*pc);
135
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
136
virtual
int
RenderOverlay
(
vtkViewport
*);
137
virtual
int
HasTranslucentPolygonalGeometry
();
139
140
protected
:
141
vtkTexturedButtonRepresentation2D
();
142
~
vtkTexturedButtonRepresentation2D
();
143
144
// Representing the button
145
vtkBalloonRepresentation
*
Balloon
;
146
147
// Properties of the button
148
vtkProperty2D
*
Property
;
149
vtkProperty2D
*
HoveringProperty
;
150
vtkProperty2D
*
SelectingProperty
;
151
void
CreateDefaultProperties();
152
153
// Keep track of the images (textures) associated with the N
154
// states of the button.
155
vtkTextureArray *
TextureArray
;
156
157
// Tracking world position
158
vtkCoordinate
*
Anchor
;
159
160
private
:
161
vtkTexturedButtonRepresentation2D
(
const
vtkTexturedButtonRepresentation2D
&);
//Not implemented
162
void
operator=(
const
vtkTexturedButtonRepresentation2D
&);
//Not implemented
163
};
164
165
#endif
Generated on Thu May 24 2012 22:22:28 for VTK by
1.8.1