VTK
vtkCenteredSliderRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCenteredSliderRepresentation.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 =========================================================================*/
15 
16 /*-------------------------------------------------------------------------
17  Copyright 2008 Sandia Corporation.
18  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19  the U.S. Government retains certain rights in this software.
20 -------------------------------------------------------------------------*/
21 
35 #ifndef __vtkCenteredSliderRepresentation_h
36 #define __vtkCenteredSliderRepresentation_h
37 
39 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
40 
41 class vtkPoints;
42 class vtkCellArray;
43 class vtkPolyData;
45 class vtkActor2D;
46 class vtkCoordinate;
47 class vtkProperty2D;
48 class vtkPropCollection;
49 class vtkWindow;
50 class vtkViewport;
51 class vtkTransform;
53 class vtkTextProperty;
54 class vtkTextMapper;
55 class vtkTextActor;
56 
57 
59 {
60 public:
63 
65 
68  void PrintSelf(ostream& os, vtkIndent indent);
70 
77  vtkCoordinate *GetPoint1Coordinate();
78 
85  vtkCoordinate *GetPoint2Coordinate();
86 
88 
90  virtual void SetTitleText(const char*);
91  virtual const char* GetTitleText();
93 
95 
96  vtkGetObjectMacro(TubeProperty,vtkProperty2D);
97  vtkGetObjectMacro(SliderProperty,vtkProperty2D);
99 
101 
103  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
105 
107 
108  vtkGetObjectMacro(LabelProperty,vtkTextProperty);
110 
112 
115  virtual void PlaceWidget(double bounds[6]);
116  virtual void BuildRepresentation();
117  virtual void StartWidgetInteraction(double eventPos[2]);
118  virtual int ComputeInteractionState(int X, int Y, int modify=0);
119  virtual void WidgetInteraction(double eventPos[2]);
120  virtual void Highlight(int);
122 
124 
125  virtual void GetActors(vtkPropCollection*);
126  virtual void ReleaseGraphicsResources(vtkWindow*);
127  virtual int RenderOverlay(vtkViewport*);
128  virtual int RenderOpaqueGeometry(vtkViewport*);
130 
131 protected:
134 
135  // Positioning the widget
138 
139  // Determine the parameter t along the slider
140  virtual double ComputePickPosition(double x, double y);
141 
142  // Define the geometry. It is constructed in canaonical position
143  // along the x-axis and then rotated into position.
146 
153 
160 
163 
166 
167  // build the tube geometry
168  void BuildTube();
169 
170 private:
171 
172  // how many points along the tube
173  int ArcCount;
174  double ArcStart;
175  double ArcEnd;
176  double ButtonSize;
177  double TubeSize;
178 
180  (const vtkCenteredSliderRepresentation&); // Not implemented
181  void operator=(const vtkCenteredSliderRepresentation&); //Not implemented
182 };
183 
184 #endif
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:43
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:58
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
virtual void SetTitleText(const char *)
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
2D text annotation
Definition: vtkTextMapper.h:43
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
An actor that displays text. Scaled or unscaled.
Definition: vtkTextActor.h:54
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void WidgetInteraction(double newEventPos[2])
#define VTK_WIDGETS_EXPORT
virtual void GetActors(vtkPropCollection *)
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
abstract class defines the representation for a vtkSliderWidget
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
provide the representation for a vtkCenteredSliderWidget
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
virtual void Highlight(int vtkNotUsed(highlightOn))
virtual const char * GetTitleText()
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
static vtkObject * New()
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate 3D points
Definition: vtkPoints.h:38