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 =========================================================================*/
32 #ifndef vtkSliderRepresentation2D_h
33 #define vtkSliderRepresentation2D_h
34 
35 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
36 #include "vtkInteractionWidgetsModule.h" // For export macro
38 
39 class vtkPoints;
40 class vtkCellArray;
41 class vtkPolyData;
43 class vtkActor2D;
44 class vtkCoordinate;
45 class vtkProperty2D;
46 class vtkPropCollection;
47 class vtkWindow;
48 class vtkViewport;
49 class vtkTransform;
51 class vtkTextProperty;
52 class vtkTextMapper;
53 class vtkTextActor;
54 
55 class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
56 {
57 public:
62 
64 
68  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
79  vtkCoordinate* GetPoint1Coordinate();
80 
89  vtkCoordinate* GetPoint2Coordinate();
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 
149  void GetActors2D(vtkPropCollection*) override;
150  void ReleaseGraphicsResources(vtkWindow*) override;
151  int RenderOverlay(vtkViewport*) override;
152  int RenderOpaqueGeometry(vtkViewport*) override;
154 
155 protected:
157  ~vtkSliderRepresentation2D() override;
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 
205 private:
207  void operator=(const vtkSliderRepresentation2D&) = delete;
208 };
209 
210 #endif
provide the representation for a vtkSliderWidget with a 3D skin
virtual void PlaceWidget(double vtkNotUsed(bounds)[6])
The following is a suggested API for widget representations.
abstract specification for Viewports
Definition: vtkViewport.h:55
void GetActors2D(vtkPropCollection *) override
virtual void StartWidgetInteraction(double eventPos[2])
vtkTransformPolyDataFilter * CapXForm
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkTransformPolyDataFilter * TubeXForm
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
virtual void SetTitleText(const char *)
Specify the label text for this widget.
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
2D text annotation
Definition: vtkTextMapper.h:50
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
An actor that displays text.
Definition: vtkTextActor.h:56
a simple class to control print indentation
Definition: vtkIndent.h:39
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkTransformPolyDataFilter * SliderXForm
virtual void WidgetInteraction(double newEventPos[2])
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:79
abstract class defines the representation for a vtkSliderWidget
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
object to represent cell connectivity
Definition: vtkCellArray.h:186
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
virtual void Highlight(int vtkNotUsed(highlightOn))
virtual const char * GetTitleText()
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:39