VTK
vtkImplicitCylinderWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitCylinderWidget.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 =========================================================================*/
92 #ifndef vtkImplicitCylinderWidget_h
93 #define vtkImplicitCylinderWidget_h
94 
95 #include "vtkInteractionWidgetsModule.h" // For export macro
96 #include "vtkAbstractWidget.h"
97 
99 class vtkInteractionCallback;
100 
102 {
103  friend class vtkInteractionCallback;
104 
105 public:
107  static vtkImplicitCylinderWidget *New();
108 
110 
112  void PrintSelf(ostream& os, vtkIndent indent);
114 
118  void SetRepresentation( vtkImplicitCylinderRepresentation *rep );
119 
120  // Descritpion:
121  // Disable/Enable the widget if needed.
122  // Unobserved the camera if the widget is disabled.
123  void SetEnabled(int enabling);
124 
126 
128  {return reinterpret_cast<vtkImplicitCylinderRepresentation*>(this->WidgetRep);}
130 
133 
134 protected:
137 
138  // Manage the state of the widget
140  enum _WidgetState {Start=0,Active};
141 
142  // These methods handle events
143  static void SelectAction(vtkAbstractWidget*);
144  static void TranslateAction(vtkAbstractWidget*);
145  static void ScaleAction(vtkAbstractWidget*);
146  static void EndSelectAction(vtkAbstractWidget*);
147  static void MoveAction(vtkAbstractWidget*);
148  static void MoveCylinderAction(vtkAbstractWidget*);
149 
152  int UpdateCursorShape( int interactionState );
153 
155 
156  vtkInteractionCallback *InteractionCallback;
157  void InvokeInteractionCallback();
159 
160 private:
161  vtkImplicitCylinderWidget(const vtkImplicitCylinderWidget&); //Not implemented
162  void operator=(const vtkImplicitCylinderWidget&); //Not implemented
163 };
164 
165 #endif
void PrintSelf(ostream &os, vtkIndent indent)
defining the representation for a vtkImplicitCylinderWidget
3D widget for manipulating an infinite cylnder
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
define the API for widget / widget representation
vtkImplicitCylinderRepresentation * GetCylinderRepresentation()
vtkInteractionCallback * InteractionCallback
static vtkObject * New()
virtual void SetEnabled(int)