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
143 #include "vtkSliderRepresentation.h"
144 
145 class vtkPoints;
146 class vtkCellArray;
147 class vtkPolyData;
148 class vtkPolyDataMapper2D;
149 class vtkActor2D;
150 class vtkCoordinate;
151 class vtkProperty2D;
152 class vtkPropCollection;
153 class vtkWindow;
154 class vtkViewport;
155 class vtkTransform;
157 class vtkTextProperty;
158 class vtkTextMapper;
159 class vtkTextActor;
160 
161 class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
162 {
163 public:
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 
257  int RenderOverlay(vtkViewport*) override;
260 
261 protected:
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 
311 private:
313  void operator=(const vtkSliderRepresentation2D&) = delete;
314 };
315 
316 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:154
vtkSliderRepresentation2D::TubeActor
vtkActor2D * TubeActor
Definition: vtkSliderRepresentation2D.h:288
vtkSliderRepresentation2D::LabelProperty
vtkTextProperty * LabelProperty
Definition: vtkSliderRepresentation2D.h:298
vtkSliderRepresentation2D::Cap
vtkPolyData * Cap
Definition: vtkSliderRepresentation2D.h:292
vtkSliderRepresentation2D::StartWidgetInteraction
void StartWidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkSliderWidget.
vtkSliderRepresentation2D::LabelActor
vtkActor2D * LabelActor
Definition: vtkSliderRepresentation2D.h:300
vtkSliderRepresentation2D::WidgetInteraction
void WidgetInteraction(double newEventPos[2]) override
Methods to interface with the vtkSliderWidget.
vtkSliderRepresentation2D::Point1Coordinate
vtkCoordinate * Point1Coordinate
Definition: vtkSliderRepresentation2D.h:266
vtkSliderRepresentation2D::PlaceWidget
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkSliderWidget.
vtkSliderRepresentation2D::SliderXForm
vtkTransformPolyDataFilter * SliderXForm
Definition: vtkSliderRepresentation2D.h:279
vtkSliderRepresentation2D::SelectedProperty
vtkProperty2D * SelectedProperty
Definition: vtkSliderRepresentation2D.h:306
vtkSliderRepresentation2D::TubeXForm
vtkTransformPolyDataFilter * TubeXForm
Definition: vtkSliderRepresentation2D.h:286
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:164
vtkSliderRepresentation2D::TitleProperty
vtkTextProperty * TitleProperty
Definition: vtkSliderRepresentation2D.h:302
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
vtkSliderRepresentation2D::Tube
vtkPolyData * Tube
Definition: vtkSliderRepresentation2D.h:285
vtkSliderRepresentation2D::CapXForm
vtkTransformPolyDataFilter * CapXForm
Definition: vtkSliderRepresentation2D.h:293
vtkTextMapper
2D text annotation
Definition: vtkTextMapper.h:157
vtkSliderRepresentation2D::TubeProperty
vtkProperty2D * TubeProperty
Definition: vtkSliderRepresentation2D.h:289
vtkSliderRepresentation2D::Points
vtkPoints * Points
Definition: vtkSliderRepresentation2D.h:275
vtkSliderRepresentation2D::RenderOverlay
int RenderOverlay(vtkViewport *) override
Methods supporting the rendering process.
vtkSliderRepresentation2D
provide the representation for a vtkSliderWidget with a 3D skin
Definition: vtkSliderRepresentation2D.h:162
vtkSliderRepresentation2D::GetActors2D
void GetActors2D(vtkPropCollection *) override
Methods supporting the rendering process.
vtkTextActor
An actor that displays text.
Definition: vtkTextActor.h:160
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:290
vtkSliderRepresentation2D::XForm
vtkTransform * XForm
Definition: vtkSliderRepresentation2D.h:274
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:186
vtkSliderRepresentation2D::TitleMapper
vtkTextMapper * TitleMapper
Definition: vtkSliderRepresentation2D.h:303
vtkSliderRepresentation2D::SliderCells
vtkCellArray * SliderCells
Definition: vtkSliderRepresentation2D.h:277
vtkSliderRepresentation2D::SliderMapper
vtkPolyDataMapper2D * SliderMapper
Definition: vtkSliderRepresentation2D.h:280
vtkSliderRepresentation2D::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting the rendering process.
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:155
vtkSliderRepresentation2D::Point2Coordinate
vtkCoordinate * Point2Coordinate
Definition: vtkSliderRepresentation2D.h:267
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkSliderRepresentation2D::ComputePickPosition
virtual double ComputePickPosition(double eventPos[2])
vtkCoordinate.h
vtkSliderRepresentation2D::X
double X
Definition: vtkSliderRepresentation2D.h:309
vtkSliderRepresentation2D::GetPoint2Coordinate
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:143
vtkSliderRepresentation2D::CapProperty
vtkProperty2D * CapProperty
Definition: vtkSliderRepresentation2D.h:296
vtkSliderRepresentation2D::TubeCells
vtkCellArray * TubeCells
Definition: vtkSliderRepresentation2D.h:284
vtkSliderRepresentation2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
vtkSliderRepresentation2D::vtkSliderRepresentation2D
vtkSliderRepresentation2D()
vtkSliderRepresentation2D::BuildRepresentation
void BuildRepresentation() override
Methods to interface with the vtkSliderWidget.
vtkSliderRepresentation2D::Highlight
void Highlight(int) override
Methods to interface with the vtkSliderWidget.
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:147
vtkSliderRepresentation2D::GetPoint1Coordinate
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
vtkSliderRepresentation2D::SetTitleText
void SetTitleText(const char *) override
Specify the label text for this widget.
vtkSliderRepresentation2D::CapCells
vtkCellArray * CapCells
Definition: vtkSliderRepresentation2D.h:291
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:149
vtkSliderRepresentation.h
vtkSliderRepresentation2D::Slider
vtkPolyData * Slider
Definition: vtkSliderRepresentation2D.h:278
vtkSliderRepresentation2D::~vtkSliderRepresentation2D
~vtkSliderRepresentation2D() override
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkSliderRepresentation2D::New
static vtkSliderRepresentation2D * New()
Instantiate the class.
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:85
vtkSliderRepresentation2D::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting the rendering process.
vtkSliderRepresentation2D::CapMapper
vtkPolyDataMapper2D * CapMapper
Definition: vtkSliderRepresentation2D.h:294
vtkSliderRepresentation
abstract class defines the representation for a vtkSliderWidget
Definition: vtkSliderRepresentation.h:61
vtkSliderRepresentation2D::LabelMapper
vtkTextMapper * LabelMapper
Definition: vtkSliderRepresentation2D.h:299
vtkSliderRepresentation2D::TitleActor
vtkActor2D * TitleActor
Definition: vtkSliderRepresentation2D.h:304
vtkSliderRepresentation2D::TubeMapper
vtkPolyDataMapper2D * TubeMapper
Definition: vtkSliderRepresentation2D.h:287
vtkSliderRepresentation2D::SliderProperty
vtkProperty2D * SliderProperty
Definition: vtkSliderRepresentation2D.h:282
vtkSliderRepresentation2D::GetTitleText
const char * GetTitleText() override
Specify the label text for this widget.
vtkSliderRepresentation2D::CapActor
vtkActor2D * CapActor
Definition: vtkSliderRepresentation2D.h:295
vtkSliderRepresentation2D::SliderActor
vtkActor2D * SliderActor
Definition: vtkSliderRepresentation2D.h:281