• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Widgets/vtkSliderRepresentation2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSliderRepresentation2D.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00031 #ifndef __vtkSliderRepresentation2D_h
00032 #define __vtkSliderRepresentation2D_h
00033 
00034 #include "vtkSliderRepresentation.h"
00035 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
00036 
00037 class vtkPoints;
00038 class vtkCellArray;
00039 class vtkPolyData;
00040 class vtkPolyDataMapper2D;
00041 class vtkActor2D;
00042 class vtkCoordinate;
00043 class vtkProperty2D;
00044 class vtkPropCollection;
00045 class vtkWindow;
00046 class vtkViewport;
00047 class vtkTransform;
00048 class vtkTransformPolyDataFilter;
00049 class vtkTextProperty;
00050 class vtkTextMapper;
00051 class vtkTextActor;
00052 
00053 
00054 class VTK_WIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
00055 {
00056 public:
00058   static vtkSliderRepresentation2D *New();
00059 
00061 
00062   vtkTypeRevisionMacro(vtkSliderRepresentation2D,vtkSliderRepresentation);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00072   vtkCoordinate *GetPoint1Coordinate();
00073 
00080   vtkCoordinate *GetPoint2Coordinate();
00081 
00083 
00085   virtual void SetTitleText(const char*);
00086   virtual const char* GetTitleText();
00088 
00090 
00092   vtkGetObjectMacro(SliderProperty,vtkProperty2D);
00094   
00096 
00097   vtkGetObjectMacro(TubeProperty,vtkProperty2D);
00098   vtkGetObjectMacro(CapProperty,vtkProperty2D);
00100   
00102 
00104   vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
00106   
00108 
00109   vtkGetObjectMacro(LabelProperty,vtkTextProperty);
00110   vtkGetObjectMacro(TitleProperty,vtkTextProperty);
00112 
00114 
00117   virtual void PlaceWidget(double bounds[6]);
00118   virtual void BuildRepresentation();
00119   virtual void StartWidgetInteraction(double eventPos[2]);
00120   virtual void WidgetInteraction(double newEventPos[2]);
00121   virtual void Highlight(int);
00123 
00125 
00126   virtual void GetActors2D(vtkPropCollection*);
00127   virtual void ReleaseGraphicsResources(vtkWindow*);
00128   virtual int RenderOverlay(vtkViewport*);
00129   virtual int RenderOpaqueGeometry(vtkViewport*);
00131 
00132 protected:
00133   vtkSliderRepresentation2D();
00134   ~vtkSliderRepresentation2D();
00135 
00136   // Positioning the widget
00137   vtkCoordinate *Point1Coordinate;
00138   vtkCoordinate *Point2Coordinate;
00139 
00140   // Determine the parameter t along the slider
00141   virtual double ComputePickPosition(double eventPos[2]);
00142 
00143   // Define the geometry. It is constructed in canaonical position
00144   // along the x-axis and then rotated into position.
00145   vtkTransform        *XForm;
00146   vtkPoints           *Points;
00147 
00148   vtkCellArray        *SliderCells;
00149   vtkPolyData         *Slider;
00150   vtkTransformPolyDataFilter *SliderXForm;
00151   vtkPolyDataMapper2D *SliderMapper;
00152   vtkActor2D          *SliderActor;
00153   vtkProperty2D       *SliderProperty;
00154   
00155   vtkCellArray        *TubeCells;
00156   vtkPolyData         *Tube;
00157   vtkTransformPolyDataFilter *TubeXForm;
00158   vtkPolyDataMapper2D *TubeMapper;
00159   vtkActor2D          *TubeActor;
00160   vtkProperty2D       *TubeProperty;
00161   
00162   vtkCellArray        *CapCells;
00163   vtkPolyData         *Cap;
00164   vtkTransformPolyDataFilter *CapXForm;
00165   vtkPolyDataMapper2D *CapMapper;
00166   vtkActor2D          *CapActor;
00167   vtkProperty2D       *CapProperty;
00168   
00169   vtkTextProperty     *LabelProperty;
00170   vtkTextMapper       *LabelMapper;
00171   vtkActor2D          *LabelActor;
00172 
00173   vtkTextProperty     *TitleProperty;
00174   vtkTextMapper       *TitleMapper;
00175   vtkActor2D          *TitleActor;
00176 
00177   vtkProperty2D       *SelectedProperty;
00178 
00179   // internal variables used for computation
00180   double X;
00181 
00182 private:
00183   vtkSliderRepresentation2D(const vtkSliderRepresentation2D&);  //Not implemented
00184   void operator=(const vtkSliderRepresentation2D&);  //Not implemented
00185 };
00186 
00187 #endif

Generated by  doxygen 1.7.1