VTK  9.2.20221001
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 =========================================================================*/
141 #ifndef vtkSliderRepresentation2D_h
142 #define vtkSliderRepresentation2D_h
143 
144 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
145 #include "vtkInteractionWidgetsModule.h" // For export macro
146 #include "vtkSliderRepresentation.h"
147 
148 VTK_ABI_NAMESPACE_BEGIN
149 class vtkPoints;
150 class vtkCellArray;
151 class vtkPolyData;
152 class vtkPolyDataMapper2D;
153 class vtkActor2D;
154 class vtkCoordinate;
155 class vtkProperty2D;
156 class vtkPropCollection;
157 class vtkWindow;
158 class vtkViewport;
159 class vtkTransform;
161 class vtkTextProperty;
162 class vtkTextMapper;
163 class vtkTextActor;
164 
165 class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
166 {
167 public:
172 
174 
178  void PrintSelf(ostream& os, vtkIndent indent) override;
180 
190 
200 
202 
206  void SetTitleText(const char*) override;
207  const char* GetTitleText() override;
209 
211 
215  vtkGetObjectMacro(SliderProperty, vtkProperty2D);
217 
219 
222  vtkGetObjectMacro(TubeProperty, vtkProperty2D);
223  vtkGetObjectMacro(CapProperty, vtkProperty2D);
225 
227 
231  vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
233 
235 
238  vtkGetObjectMacro(LabelProperty, vtkTextProperty);
239  vtkGetObjectMacro(TitleProperty, vtkTextProperty);
241 
243 
248  void PlaceWidget(double bounds[6]) override;
249  void BuildRepresentation() override;
250  void StartWidgetInteraction(double eventPos[2]) override;
251  void WidgetInteraction(double newEventPos[2]) override;
252  void Highlight(int) override;
254 
256 
259  void GetActors2D(vtkPropCollection* propCollection) override;
260  void ReleaseGraphicsResources(vtkWindow* window) override;
261  int RenderOverlay(vtkViewport* viewport) override;
262  int RenderOpaqueGeometry(vtkViewport* viewport) override;
264 
265 protected:
268 
269  // Positioning the widget
272 
273  // Determine the parameter t along the slider
274  virtual double ComputePickPosition(double eventPos[2]);
275 
276  // Define the geometry. It is constructed in canaonical position
277  // along the x-axis and then rotated into position.
280 
287 
294 
301 
305 
309 
311 
312  // internal variables used for computation
313  double X;
314 
315 private:
317  void operator=(const vtkSliderRepresentation2D&) = delete;
318 };
319 
320 VTK_ABI_NAMESPACE_END
321 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:156
object to represent cell connectivity
Definition: vtkCellArray.h:297
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition: vtkIndent.h:120
represent and manipulate 3D points
Definition: vtkPoints.h:150
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:201
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.
static vtkSliderRepresentation2D * New()
Instantiate the class.
void SetTitleText(const char *) override
Specify the label text for this widget.
void StartWidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkSliderWidget.
vtkTransformPolyDataFilter * TubeXForm
vtkTransformPolyDataFilter * SliderXForm
const char * GetTitleText() override
Specify the label text for this widget.
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkSliderWidget.
vtkTransformPolyDataFilter * CapXForm
void ReleaseGraphicsResources(vtkWindow *window) override
Methods supporting the rendering process.
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
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])
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
~vtkSliderRepresentation2D() override
abstract class defines the representation for a vtkSliderWidget
An actor that displays text.
Definition: vtkTextActor.h:167
2D text annotation
represent text properties.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:171
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40