VTK  9.3.0
vtkCenteredSliderRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
19#ifndef vtkCenteredSliderRepresentation_h
20#define vtkCenteredSliderRepresentation_h
21
22#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
23#include "vtkInteractionWidgetsModule.h" // For export macro
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkPoints;
28class vtkCellArray;
29class vtkPolyData;
31class vtkActor2D;
32class vtkCoordinate;
33class vtkProperty2D;
35class vtkWindow;
36class vtkViewport;
37class vtkTransform;
39class vtkTextProperty;
40class vtkTextMapper;
41class vtkTextActor;
42
43class VTKINTERACTIONWIDGETS_EXPORT vtkCenteredSliderRepresentation : public vtkSliderRepresentation
44{
45public:
50
52
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
68
78
80
84 void SetTitleText(const char*) override;
85 const char* GetTitleText() override;
87
89
92 vtkGetObjectMacro(TubeProperty, vtkProperty2D);
93 vtkGetObjectMacro(SliderProperty, vtkProperty2D);
95
97
101 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
103
105
108 vtkGetObjectMacro(LabelProperty, vtkTextProperty);
110
112
117 void PlaceWidget(double bounds[6]) override;
118 void BuildRepresentation() override;
119 void StartWidgetInteraction(double eventPos[2]) override;
120 int ComputeInteractionState(int X, int Y, int modify = 0) override;
121 void WidgetInteraction(double eventPos[2]) override;
122 void Highlight(int) override;
124
126
129 void GetActors(vtkPropCollection* propCollections) override;
130 void ReleaseGraphicsResources(vtkWindow* window) override;
134
135protected:
138
139 // Positioning the widget
142
143 // Determine the parameter t along the slider
144 virtual double ComputePickPosition(double x, double y);
145
146 // Define the geometry. It is constructed in canaonical position
147 // along the x-axis and then rotated into position.
150
157
164
167
170
171 // build the tube geometry
172 void BuildTube();
173
174private:
175 // how many points along the tube
176 int ArcCount;
177 double ArcStart;
178 double ArcEnd;
179 double ButtonSize;
180 double TubeSize;
181
183 void operator=(const vtkCenteredSliderRepresentation&) = delete;
184};
185
186VTK_ABI_NAMESPACE_END
187#endif
a actor that draws 2D data
Definition vtkActor2D.h:35
object to represent cell connectivity
provide the representation for a vtkCenteredSliderWidget
void WidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkSliderWidget.
void BuildRepresentation() override
Methods to interface with the vtkSliderWidget.
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
void ReleaseGraphicsResources(vtkWindow *window) override
Methods supporting the rendering process.
const char * GetTitleText() override
Specify the label text for this widget.
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
int RenderOverlay(vtkViewport *) override
Methods supporting the rendering process.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void Highlight(int) override
Methods to interface with the vtkSliderWidget.
void StartWidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkSliderWidget.
virtual double ComputePickPosition(double x, double y)
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkSliderWidget.
static vtkCenteredSliderRepresentation * New()
Instantiate the class.
void GetActors(vtkPropCollection *propCollections) override
Methods supporting the rendering process.
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting the rendering process.
int ComputeInteractionState(int X, int Y, int modify=0) override
Methods to interface with the vtkSliderWidget.
void SetTitleText(const char *) override
Specify the label text for this widget.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
represent and manipulate 3D points
Definition vtkPoints.h:29
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
an ordered list of Props
represent surface properties of a 2D image
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:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25