VTK  9.3.1
vtkDisplaySizedImplicitPlaneWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
90 #ifndef vtkDisplaySizedImplicitPlaneWidget_h
91 #define vtkDisplaySizedImplicitPlaneWidget_h
92 
93 #include "vtkAbstractWidget.h"
94 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
95 #include "vtkInteractionWidgetsModule.h" // For export macro
96 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
97 
98 VTK_ABI_NAMESPACE_BEGIN
100 class vtkDisplaySizedImplicitPlaneInteractionCallback;
101 
102 class VTKINTERACTIONWIDGETS_EXPORT vtkDisplaySizedImplicitPlaneWidget : public vtkAbstractWidget
103 {
104  friend class vtkDisplaySizedImplicitPlaneInteractionCallback;
105 
106 public:
111 
113 
117  void PrintSelf(ostream& os, vtkIndent indent) override;
119 
125  void SetRepresentation(vtkDisplaySizedImplicitPlaneRepresentation* rep);
126 
127  // Description:
128  // Disable/Enable the widget if needed.
129  // Unobserved the camera if the widget is disabled.
130  void SetEnabled(int enabling) override;
131 
136  void SetLockNormalToCamera(int lock);
137 
142  {
143  return reinterpret_cast<vtkDisplaySizedImplicitPlaneRepresentation*>(this->WidgetRep);
144  }
145 
149  void CreateDefaultRepresentation() override;
150 
151 protected:
154 
155  // Manage the state of the widget
158  {
159  Start = 0,
160  Active
161  };
162 #if !defined(VTK_LEGACY_REMOVE)
163  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
165 #endif
166 
167  // These methods handle events
168  static void SelectAction(vtkAbstractWidget*);
169  static void PickOriginAction(vtkAbstractWidget*);
170  static void PickNormalAction(vtkAbstractWidget*);
171  static void TranslateAction(vtkAbstractWidget*);
172  static void ScaleAction(vtkAbstractWidget*);
173  static void EndSelectAction(vtkAbstractWidget*);
174  static void MoveAction(vtkAbstractWidget*);
175  static void MovePlaneAction(vtkAbstractWidget*);
176  static void SelectAction3D(vtkAbstractWidget*);
177  static void EndSelectAction3D(vtkAbstractWidget*);
178  static void MoveAction3D(vtkAbstractWidget*);
179  static void TranslationAxisLock(vtkAbstractWidget*);
180  static void TranslationAxisUnLock(vtkAbstractWidget*);
181 
186  int UpdateCursorShape(int interactionState);
187 
189 
192  vtkDisplaySizedImplicitPlaneInteractionCallback* InteractionCallback;
193  void InvokeInteractionCallback();
195 
196 private:
198  void operator=(const vtkDisplaySizedImplicitPlaneWidget&) = delete;
199 };
200 
201 VTK_ABI_NAMESPACE_END
202 #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:28
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...