VTK  9.2.6
vtkSliderRepresentation2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSliderRepresentation2D.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=========================================================================*/
31
32#ifndef vtkSliderRepresentation2D_h
33#define vtkSliderRepresentation2D_h
34
35#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
36#include "vtkInteractionWidgetsModule.h" // For export macro
38
39class vtkPoints;
40class vtkCellArray;
41class vtkPolyData;
43class vtkActor2D;
44class vtkCoordinate;
45class vtkProperty2D;
47class vtkWindow;
48class vtkViewport;
49class vtkTransform;
51class vtkTextProperty;
52class vtkTextMapper;
53class vtkTextActor;
54
55class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
56{
57public:
62
64
68 void PrintSelf(ostream& os, vtkIndent indent) override;
70
80
90
92
96 void SetTitleText(const char*) override;
97 const char* GetTitleText() override;
99
101
105 vtkGetObjectMacro(SliderProperty, vtkProperty2D);
107
109
112 vtkGetObjectMacro(TubeProperty, vtkProperty2D);
113 vtkGetObjectMacro(CapProperty, vtkProperty2D);
115
117
121 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
123
125
128 vtkGetObjectMacro(LabelProperty, vtkTextProperty);
129 vtkGetObjectMacro(TitleProperty, vtkTextProperty);
131
133
138 void PlaceWidget(double bounds[6]) override;
139 void BuildRepresentation() override;
140 void StartWidgetInteraction(double eventPos[2]) override;
141 void WidgetInteraction(double newEventPos[2]) override;
142 void Highlight(int) override;
144
146
154
155protected:
158
159 // Positioning the widget
162
163 // Determine the parameter t along the slider
164 virtual double ComputePickPosition(double eventPos[2]);
165
166 // Define the geometry. It is constructed in canaonical position
167 // along the x-axis and then rotated into position.
170
177
184
191
195
199
201
202 // internal variables used for computation
203 double X;
204
205private:
207 void operator=(const vtkSliderRepresentation2D&) = delete;
208};
209
210#endif
a actor that draws 2D data
Definition vtkActor2D.h:46
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:40
represent and manipulate 3D points
Definition vtkPoints.h:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
an ordered list of Props
represent surface properties of a 2D image
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 *) 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.
void GetActors2D(vtkPropCollection *) override
Methods supporting the rendering process.
vtkTransformPolyDataFilter * CapXForm
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting the rendering process.
void ReleaseGraphicsResources(vtkWindow *) 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.
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:56
window superclass for vtkRenderWindow
Definition vtkWindow.h:39