VTK  9.3.20240425
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkPoints;
29class vtkCellArray;
30class vtkPolyData;
32class vtkActor2D;
33class vtkCoordinate;
34class vtkProperty2D;
36class vtkWindow;
37class vtkViewport;
38class vtkTransform;
40class vtkTextProperty;
41class vtkTextMapper;
42class vtkTextActor;
43
44class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCenteredSliderRepresentation
46{
47public:
52
54
58 void PrintSelf(ostream& os, vtkIndent indent) override;
60
70
80
82
86 void SetTitleText(const char*) override;
87 const char* GetTitleText() override;
89
91
94 vtkGetObjectMacro(TubeProperty, vtkProperty2D);
95 vtkGetObjectMacro(SliderProperty, vtkProperty2D);
97
99
103 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
105
107
110 vtkGetObjectMacro(LabelProperty, vtkTextProperty);
112
114
119 void PlaceWidget(double bounds[6]) override;
120 void BuildRepresentation() override;
121 void StartWidgetInteraction(double eventPos[2]) override;
122 int ComputeInteractionState(int X, int Y, int modify = 0) override;
123 void WidgetInteraction(double eventPos[2]) override;
124 void Highlight(int) override;
126
128
131 void GetActors(vtkPropCollection* propCollections) override;
132 void ReleaseGraphicsResources(vtkWindow* window) override;
136
137protected:
140
141 // Positioning the widget
144
145 // Determine the parameter t along the slider
146 virtual double ComputePickPosition(double x, double y);
147
148 // Define the geometry. It is constructed in canaonical position
149 // along the x-axis and then rotated into position.
152
159
166
169
172
173 // build the tube geometry
174 void BuildTube();
175
176private:
177 // how many points along the tube
178 int ArcCount;
179 double ArcStart;
180 double ArcEnd;
181 double ButtonSize;
182 double TubeSize;
183
185 void operator=(const vtkCenteredSliderRepresentation&) = delete;
186};
187
188VTK_ABI_NAMESPACE_END
189#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
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:108
represent and manipulate 3D points
Definition vtkPoints.h:139
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
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:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO