VTK  9.2.6
vtkCoordinateFrameWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCoordinateFrameWidget.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 =========================================================================*/
95 #ifndef vtkCoordinateFrameWidget_h
96 #define vtkCoordinateFrameWidget_h
97 
98 #include "vtkAbstractWidget.h"
99 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
100 #include "vtkInteractionWidgetsModule.h" // For export macro
101 
103 class vtkCoordinateFrameWidgetInteractionCallback;
104 
105 class VTKINTERACTIONWIDGETS_EXPORT vtkCoordinateFrameWidget : public vtkAbstractWidget
106 {
107  friend class vtkCoordinateFrameWidgetInteractionCallback;
108 
109 public:
113  static vtkCoordinateFrameWidget* New();
114 
116 
120  void PrintSelf(ostream& os, vtkIndent indent) override;
122 
128  void SetRepresentation(vtkCoordinateFrameRepresentation* rep);
129 
130  // Description:
131  // Disable/Enable the widget if needed.
132  // Unobserved the camera if the widget is disabled.
133  void SetEnabled(int enabling) override;
134 
139  {
140  return reinterpret_cast<vtkCoordinateFrameRepresentation*>(this->WidgetRep);
141  }
142 
146  void CreateDefaultRepresentation() override;
147 
148 protected:
150  ~vtkCoordinateFrameWidget() override;
151 
152  // Manage the state of the widget
155  {
156  Start = 0,
157  Active
158  };
159 #if !defined(VTK_LEGACY_REMOVE)
160  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
162 #endif
163 
164  // These methods handle events
165  static void SelectAction(vtkAbstractWidget*);
166  static void PickOriginAction(vtkAbstractWidget*);
167  static void PickNormalAction(vtkAbstractWidget*);
168  static void PickDirectionPointAction(vtkAbstractWidget* w);
169  static void TranslateAction(vtkAbstractWidget*);
170  static void EndSelectAction(vtkAbstractWidget*);
171  static void MoveAction(vtkAbstractWidget*);
172  static void TranslationAxisLock(vtkAbstractWidget*);
173  static void TranslationAxisUnLock(vtkAbstractWidget*);
174 
179  int UpdateCursorShape(int interactionState);
180 
182 
185  vtkCoordinateFrameWidgetInteractionCallback* InteractionCallback;
186  void InvokeInteractionCallback();
188 private:
190  void operator=(const vtkCoordinateFrameWidget&) = delete;
191 };
192 
193 #endif
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
vtkCoordinateFrameWidgetInteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
vtkCoordinateFrameRepresentation * GetCoordinateFrameRepresentation()
Return the representation as a vtkCoordinateFrameRepresentation.
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:39
a class defining the representation for a vtkCoordinateFrameWidget
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
3D widget for manipulating a display sized coordinate frame widget
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...