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
36#ifndef vtkCenteredSliderRepresentation_h
37#define vtkCenteredSliderRepresentation_h
38
39#include "vtkInteractionWidgetsModule.h" // For export macro
41#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
42
43class vtkPoints;
44class vtkCellArray;
45class vtkPolyData;
47class vtkActor2D;
48class vtkCoordinate;
49class vtkProperty2D;
51class vtkWindow;
52class vtkViewport;
53class vtkTransform;
55class vtkTextProperty;
56class vtkTextMapper;
57class vtkTextActor;
58
59
60class VTKINTERACTIONWIDGETS_EXPORT vtkCenteredSliderRepresentation : public vtkSliderRepresentation
61{
62public:
67
69
74 void PrintSelf(ostream& os, vtkIndent indent);
76
86
96
98
102 virtual void SetTitleText(const char*);
103 virtual const char* GetTitleText();
105
107
110 vtkGetObjectMacro(TubeProperty,vtkProperty2D);
111 vtkGetObjectMacro(SliderProperty,vtkProperty2D);
113
115
119 vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
121
123
126 vtkGetObjectMacro(LabelProperty,vtkTextProperty);
128
130
135 virtual void PlaceWidget(double bounds[6]);
136 virtual void BuildRepresentation();
137 virtual void StartWidgetInteraction(double eventPos[2]);
138 virtual int ComputeInteractionState(int X, int Y, int modify=0);
139 virtual void WidgetInteraction(double eventPos[2]);
140 virtual void Highlight(int);
142
144
152
153protected:
156
157 // Positioning the widget
160
161 // Determine the parameter t along the slider
162 virtual double ComputePickPosition(double x, double y);
163
164 // Define the geometry. It is constructed in canaonical position
165 // along the x-axis and then rotated into position.
168
175
182
185
188
189 // build the tube geometry
190 void BuildTube();
191
192private:
193
194 // how many points along the tube
195 int ArcCount;
196 double ArcStart;
197 double ArcEnd;
198 double ButtonSize;
199 double TubeSize;
200
202 (const vtkCenteredSliderRepresentation&) VTK_DELETE_FUNCTION;
203 void operator=(const vtkCenteredSliderRepresentation&) VTK_DELETE_FUNCTION;
204};
205
206#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
object to represent cell connectivity
Definition: vtkCellArray.h:51
provide the representation for a vtkCenteredSliderWidget
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
virtual int RenderOverlay(vtkViewport *)
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual int ComputeInteractionState(int X, int Y, int modify=0)
virtual void PlaceWidget(double bounds[6])
Methods to interface with the vtkSliderWidget.
virtual const char * GetTitleText()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual double ComputePickPosition(double x, double y)
virtual void SetTitleText(const char *)
Specify the label text for this widget.
static vtkCenteredSliderRepresentation * New()
Instantiate the class.
virtual void StartWidgetInteraction(double eventPos[2])
virtual void GetActors(vtkPropCollection *)
Methods supporting the rendering process.
virtual void WidgetInteraction(double eventPos[2])
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
a list of Props
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
abstract class defines the representation for a vtkSliderWidget
An actor that displays text.
Definition: vtkTextActor.h:57
2D text annotation
Definition: vtkTextMapper.h:54
represent text properties.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35