VTK  9.3.0
vtkSliderRepresentation2D.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
29#ifndef vtkSliderRepresentation2D_h
30#define vtkSliderRepresentation2D_h
31
32#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
33#include "vtkInteractionWidgetsModule.h" // For export macro
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkPoints;
38class vtkCellArray;
39class vtkPolyData;
41class vtkActor2D;
42class vtkCoordinate;
43class vtkProperty2D;
45class vtkWindow;
46class vtkViewport;
47class vtkTransform;
49class vtkTextProperty;
50class vtkTextMapper;
51class vtkTextActor;
52
53class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
54{
55public:
60
62
66 void PrintSelf(ostream& os, vtkIndent indent) override;
68
78
88
90
94 void SetTitleText(const char*) override;
95 const char* GetTitleText() override;
97
99
103 vtkGetObjectMacro(SliderProperty, vtkProperty2D);
105
107
110 vtkGetObjectMacro(TubeProperty, vtkProperty2D);
111 vtkGetObjectMacro(CapProperty, vtkProperty2D);
113
115
119 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
121
123
126 vtkGetObjectMacro(LabelProperty, vtkTextProperty);
127 vtkGetObjectMacro(TitleProperty, vtkTextProperty);
129
131
136 void PlaceWidget(double bounds[6]) override;
137 void BuildRepresentation() override;
138 void StartWidgetInteraction(double eventPos[2]) override;
139 void WidgetInteraction(double newEventPos[2]) override;
140 void Highlight(int) override;
142
144
147 void GetActors2D(vtkPropCollection* propCollection) override;
148 void ReleaseGraphicsResources(vtkWindow* window) override;
149 int RenderOverlay(vtkViewport* viewport) override;
150 int RenderOpaqueGeometry(vtkViewport* viewport) override;
152
153protected:
156
157 // Positioning the widget
160
161 // Determine the parameter t along the slider
162 virtual double ComputePickPosition(double eventPos[2]);
163
164 // Define the geometry. It is constructed in canaonical position
165 // along the x-axis and then rotated into position.
168
175
182
189
193
197
199
200 // internal variables used for computation
201 double X;
202
203private:
205 void operator=(const vtkSliderRepresentation2D&) = delete;
206};
207
208VTK_ABI_NAMESPACE_END
209#endif
a actor that draws 2D data
Definition vtkActor2D.h:44
object to represent cell connectivity
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:38
represent and manipulate 3D points
Definition vtkPoints.h:38
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:89
an ordered list of Props
represent surface properties of a 2D image
provide the representation for a vtkSliderWidget with a 3D skin
void Highlight(int) override
Methods to interface with the vtkSliderWidget.
void WidgetInteraction(double newEventPos[2]) override
Methods to interface with the vtkSliderWidget.
int RenderOverlay(vtkViewport *viewport) override
Methods supporting the rendering process.
void SetTitleText(const char *) override
Specify the label text for this widget.
static vtkSliderRepresentation2D * New()
Instantiate the class.
void StartWidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkSliderWidget.
vtkTransformPolyDataFilter * TubeXForm
vtkTransformPolyDataFilter * SliderXForm
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkSliderWidget.
vtkTransformPolyDataFilter * CapXForm
void ReleaseGraphicsResources(vtkWindow *window) override
Methods supporting the rendering process.
void GetActors2D(vtkPropCollection *propCollection) override
Methods supporting the rendering process.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods supporting the rendering process.
void BuildRepresentation() override
Methods to interface with the vtkSliderWidget.
virtual double ComputePickPosition(double eventPos[2])
const char * GetTitleText() override
Specify the label text for this widget.
~vtkSliderRepresentation2D() override
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
abstract class defines the representation for a vtkSliderWidget
An actor that displays text.
2D text annotation
represent text properties.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
abstract specification for Viewports
Definition vtkViewport.h:54
window superclass for vtkRenderWindow
Definition vtkWindow.h:34