VTK  9.2.6
vtkDisplaySizedImplicitPlaneWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDisplaySizedImplicitPlaneWidget.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 =========================================================================*/
102 #ifndef vtkDisplaySizedImplicitPlaneWidget_h
103 #define vtkDisplaySizedImplicitPlaneWidget_h
104 
105 #include "vtkAbstractWidget.h"
106 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
107 #include "vtkInteractionWidgetsModule.h" // For export macro
108 
110 class vtkDisplaySizedImplicitPlaneInteractionCallback;
111 
112 class VTKINTERACTIONWIDGETS_EXPORT vtkDisplaySizedImplicitPlaneWidget : public vtkAbstractWidget
113 {
114  friend class vtkDisplaySizedImplicitPlaneInteractionCallback;
115 
116 public:
121 
123 
127  void PrintSelf(ostream& os, vtkIndent indent) override;
129 
135  void SetRepresentation(vtkDisplaySizedImplicitPlaneRepresentation* rep);
136 
137  // Description:
138  // Disable/Enable the widget if needed.
139  // Unobserved the camera if the widget is disabled.
140  void SetEnabled(int enabling) override;
141 
146  void SetLockNormalToCamera(int lock);
147 
152  {
153  return reinterpret_cast<vtkDisplaySizedImplicitPlaneRepresentation*>(this->WidgetRep);
154  }
155 
159  void CreateDefaultRepresentation() override;
160 
161 protected:
164 
165  // Manage the state of the widget
168  {
169  Start = 0,
170  Active
171  };
172 #if !defined(VTK_LEGACY_REMOVE)
173  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
175 #endif
176 
177  // These methods handle events
178  static void SelectAction(vtkAbstractWidget*);
179  static void PickOriginAction(vtkAbstractWidget*);
180  static void PickNormalAction(vtkAbstractWidget*);
181  static void TranslateAction(vtkAbstractWidget*);
182  static void ScaleAction(vtkAbstractWidget*);
183  static void EndSelectAction(vtkAbstractWidget*);
184  static void MoveAction(vtkAbstractWidget*);
185  static void MovePlaneAction(vtkAbstractWidget*);
186  static void SelectAction3D(vtkAbstractWidget*);
187  static void EndSelectAction3D(vtkAbstractWidget*);
188  static void MoveAction3D(vtkAbstractWidget*);
189  static void TranslationAxisLock(vtkAbstractWidget*);
190  static void TranslationAxisUnLock(vtkAbstractWidget*);
191 
196  int UpdateCursorShape(int interactionState);
197 
199 
202  vtkDisplaySizedImplicitPlaneInteractionCallback* InteractionCallback;
203  void InvokeInteractionCallback();
205 
206 private:
208  void operator=(const vtkDisplaySizedImplicitPlaneWidget&) = delete;
209 };
210 
211 #endif
3D widget for manipulating a display sized plane
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
vtkDisplaySizedImplicitPlaneRepresentation * GetDisplaySizedImplicitPlaneRepresentation()
Return the representation as a vtkDisplaySizedImplicitPlaneRepresentation.
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
vtkDisplaySizedImplicitPlaneInteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
a class defining the representation for a vtkDisplaySizedImplicitPlaneWidget
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...