VTK
vtkCompassWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompassWidget.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  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
21 
67 #ifndef vtkCompassWidget_h
68 #define vtkCompassWidget_h
69 
70 #include "vtkGeovisCoreModule.h" // For export macro
71 #include "vtkAbstractWidget.h"
72 
74 
75 
77 {
78 public:
80  static vtkCompassWidget *New();
81 
83 
85  void PrintSelf(ostream& os, vtkIndent indent);
87 
89 
93  {this->Superclass::SetWidgetRepresentation
94  (reinterpret_cast<vtkWidgetRepresentation*>(r));}
96 
99 
101 
102  double GetHeading();
103  void SetHeading(double v);
104  double GetTilt();
105  void SetTilt(double t);
106  double GetDistance();
107  void SetDistance(double t);
109 
110 protected:
113 
114  // These are the events that are handled
115  static void SelectAction(vtkAbstractWidget*);
116  static void EndSelectAction(vtkAbstractWidget*);
117  static void MoveAction(vtkAbstractWidget*);
118  static void TimerAction(vtkAbstractWidget*);
119 
120 //BTX - manage the state of the widget
123  {
124  Start=0,
128  DistanceAdjusting
129  };
130 //ETX
131 
132  int TimerId;
134  double StartTime;
135 
136 private:
137  vtkCompassWidget(const vtkCompassWidget&); //Not implemented
138  void operator=(const vtkCompassWidget&); //Not implemented
139 };
140 
141 #endif
void PrintSelf(ostream &os, vtkIndent indent)
void SetRepresentation(vtkCompassRepresentation *r)
virtual void CreateDefaultRepresentation()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKGEOVISCORE_EXPORT
define the API for widget / widget representation
static vtkObject * New()
set a value by manipulating something