VTK  9.1.0
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=========================================================================*/
138#ifndef vtkSliderRepresentation2D_h
139#define vtkSliderRepresentation2D_h
140
141#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
142#include "vtkInteractionWidgetsModule.h" // For export macro
144
145class vtkPoints;
146class vtkCellArray;
147class vtkPolyData;
149class vtkActor2D;
150class vtkCoordinate;
151class vtkProperty2D;
153class vtkWindow;
154class vtkViewport;
155class vtkTransform;
157class vtkTextProperty;
158class vtkTextMapper;
159class vtkTextActor;
160
161class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
162{
163public:
168
170
174 void PrintSelf(ostream& os, vtkIndent indent) override;
176
186
196
198
202 void SetTitleText(const char*) override;
203 const char* GetTitleText() override;
205
207
211 vtkGetObjectMacro(SliderProperty, vtkProperty2D);
213
215
218 vtkGetObjectMacro(TubeProperty, vtkProperty2D);
219 vtkGetObjectMacro(CapProperty, vtkProperty2D);
221
223
227 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
229
231
234 vtkGetObjectMacro(LabelProperty, vtkTextProperty);
235 vtkGetObjectMacro(TitleProperty, vtkTextProperty);
237
239
244 void PlaceWidget(double bounds[6]) override;
245 void BuildRepresentation() override;
246 void StartWidgetInteraction(double eventPos[2]) override;
247 void WidgetInteraction(double newEventPos[2]) override;
248 void Highlight(int) override;
250
252
260
261protected:
264
265 // Positioning the widget
268
269 // Determine the parameter t along the slider
270 virtual double ComputePickPosition(double eventPos[2]);
271
272 // Define the geometry. It is constructed in canaonical position
273 // along the x-axis and then rotated into position.
276
283
290
297
301
305
307
308 // internal variables used for computation
309 double X;
310
311private:
313 void operator=(const vtkSliderRepresentation2D&) = delete;
314};
315
316#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
object to represent cell connectivity
Definition: vtkCellArray.h:290
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 3D points
Definition: vtkPoints.h:143
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
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 *) 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.
abstract class defines the representation for a vtkSliderWidget
An actor that displays text.
Definition: vtkTextActor.h:160
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:164
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36