VTK  9.7.1
vtkCoordinateFrameWidget.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
83 #ifndef vtkCoordinateFrameWidget_h
84 #define vtkCoordinateFrameWidget_h
85 
86 #include "vtkAbstractWidget.h"
87 #include "vtkInteractionWidgetsModule.h" // For export macro
88 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
89 
90 VTK_ABI_NAMESPACE_BEGIN
92 class vtkCoordinateFrameWidgetInteractionCallback;
93 
94 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCoordinateFrameWidget
95  : public vtkAbstractWidget
96 {
97  friend class vtkCoordinateFrameWidgetInteractionCallback;
98 
99 public:
103  static vtkCoordinateFrameWidget* New();
104 
106 
110  void PrintSelf(ostream& os, vtkIndent indent) override;
112 
118  void SetRepresentation(vtkCoordinateFrameRepresentation* rep);
119 
120  // Description:
121  // Disable/Enable the widget if needed.
122  // Unobserved the camera if the widget is disabled.
123  void SetEnabled(int enabling) override;
124 
129  {
130  return reinterpret_cast<vtkCoordinateFrameRepresentation*>(this->WidgetRep);
131  }
132 
136  void CreateDefaultRepresentation() override;
137 
138 protected:
140  ~vtkCoordinateFrameWidget() override;
141 
142  // Manage the state of the widget
145  {
146  Start = 0,
147  Active
148  };
149 
150  // These methods handle events
151  static void SelectAction(vtkAbstractWidget*);
152  static void PickOriginAction(vtkAbstractWidget*);
153  static void PickNormalAction(vtkAbstractWidget*);
154  static void PickDirectionPointAction(vtkAbstractWidget* w);
155  static void TranslateAction(vtkAbstractWidget*);
156  static void EndSelectAction(vtkAbstractWidget*);
157  static void MoveAction(vtkAbstractWidget*);
158  static void TranslationAxisLock(vtkAbstractWidget*);
159  static void TranslationAxisUnLock(vtkAbstractWidget*);
160 
165  int UpdateCursorShape(int interactionState);
166 
168 
171  vtkCoordinateFrameWidgetInteractionCallback* InteractionCallback;
172  void InvokeInteractionCallback();
174 private:
176  void operator=(const vtkCoordinateFrameWidget&) = delete;
177 };
178 
179 VTK_ABI_NAMESPACE_END
180 #endif
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:28
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
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...