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 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
40 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
41 
42 class vtkPoints;
43 class vtkCellArray;
44 class vtkPolyData;
46 class vtkActor2D;
47 class vtkCoordinate;
48 class vtkProperty2D;
49 class vtkPropCollection;
50 class vtkWindow;
51 class vtkViewport;
52 class vtkTransform;
54 class vtkTextProperty;
55 class vtkTextMapper;
56 class vtkTextActor;
57 
58 
60 {
61 public:
64 
66 
69  void PrintSelf(ostream& os, vtkIndent indent);
71 
78  vtkCoordinate *GetPoint1Coordinate();
79 
86  vtkCoordinate *GetPoint2Coordinate();
87 
89 
91  virtual void SetTitleText(const char*);
92  virtual const char* GetTitleText();
94 
96 
97  vtkGetObjectMacro(TubeProperty,vtkProperty2D);
98  vtkGetObjectMacro(SliderProperty,vtkProperty2D);
100 
102 
104  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
106 
108 
109  vtkGetObjectMacro(LabelProperty,vtkTextProperty);
111 
113 
116  virtual void PlaceWidget(double bounds[6]);
117  virtual void BuildRepresentation();
118  virtual void StartWidgetInteraction(double eventPos[2]);
119  virtual int ComputeInteractionState(int X, int Y, int modify=0);
120  virtual void WidgetInteraction(double eventPos[2]);
121  virtual void Highlight(int);
123 
125 
126  virtual void GetActors(vtkPropCollection*);
127  virtual void ReleaseGraphicsResources(vtkWindow*);
128  virtual int RenderOverlay(vtkViewport*);
129  virtual int RenderOpaqueGeometry(vtkViewport*);
131 
132 protected:
135 
136  // Positioning the widget
139 
140  // Determine the parameter t along the slider
141  virtual double ComputePickPosition(double x, double y);
142 
143  // Define the geometry. It is constructed in canaonical position
144  // along the x-axis and then rotated into position.
147 
154 
161 
164 
167 
168  // build the tube geometry
169  void BuildTube();
170 
171 private:
172 
173  // how many points along the tube
174  int ArcCount;
175  double ArcStart;
176  double ArcEnd;
177  double ButtonSize;
178  double TubeSize;
179 
181  (const vtkCenteredSliderRepresentation&); // Not implemented
182  void operator=(const vtkCenteredSliderRepresentation&); //Not implemented
183 };
184 
185 #endif
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:44
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
virtual void SetTitleText(const char *)
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
2D text annotation
Definition: vtkTextMapper.h:52
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
An actor that displays text. Scaled or unscaled.
Definition: vtkTextActor.h:54
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void WidgetInteraction(double newEventPos[2])
virtual void GetActors(vtkPropCollection *)
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
abstract class defines the representation for a vtkSliderWidget
object to represent cell connectivity
Definition: vtkCellArray.h:49
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:39
static vtkObject * New()
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate 3D points
Definition: vtkPoints.h:38