VTK  9.3.0
vtkResliceCursorWidget.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
33 #ifndef vtkResliceCursorWidget_h
34 #define vtkResliceCursorWidget_h
35 
36 #include "vtkAbstractWidget.h"
37 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
38 #include "vtkInteractionWidgetsModule.h" // For export macro
39 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
40 
41 VTK_ABI_NAMESPACE_BEGIN
43 
44 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorWidget : public vtkAbstractWidget
45 {
46 public:
51 
53 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
66  {
67  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
68  }
69 
74  {
75  return reinterpret_cast<vtkResliceCursorRepresentation*>(this->WidgetRep);
76  }
77 
81  void CreateDefaultRepresentation() override;
82 
88  void SetEnabled(int) override;
89 
91 
94  vtkSetMacro(ManageWindowLevel, vtkTypeBool);
95  vtkGetMacro(ManageWindowLevel, vtkTypeBool);
96  vtkBooleanMacro(ManageWindowLevel, vtkTypeBool);
98 
102  enum
103  {
104  WindowLevelEvent = 1055,
107  ResetCursorEvent
108  };
109 
113  virtual void ResetResliceCursor();
114 
115 protected:
118 
119  // These are the callbacks for this widget
128 
129  // helper methods for cursor management
130  void SetCursor(int state) override;
131 
132  // Start Window Level
134 
135  // Invoke the appropriate event based on state
137 
138  // Manage the state of the widget
141  {
142  Start = 0,
143  Active
144  };
145 #if !defined(VTK_LEGACY_REMOVE)
146  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
148 #endif
149 
150  // Keep track whether key modifier key is pressed
153 
154 private:
156  void operator=(const vtkResliceCursorWidget&) = delete;
157 };
158 
159 VTK_ABI_NAMESPACE_END
160 #endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:29
represent the vtkResliceCursorWidget
represent a reslice cursor
static void EndResizeThicknessAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class macros.
void SetCursor(int state) override
vtkResliceCursorRepresentation * GetResliceCursorRepresentation()
Return the representation as a vtkResliceCursorRepresentation.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void ResetResliceCursorAction(vtkAbstractWidget *)
virtual void ResetResliceCursor()
Reset the cursor back to its initial state.
void SetRepresentation(vtkResliceCursorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void MoveAction(vtkAbstractWidget *)
void SetEnabled(int) override
Methods for activiating this widget.
static void EndSelectAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
static void ResizeThicknessAction(vtkAbstractWidget *)
~vtkResliceCursorWidget() override
static void RotateAction(vtkAbstractWidget *)
static vtkResliceCursorWidget * New()
Instantiate this class.
static void TranslateAction(vtkAbstractWidget *)
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_DEPRECATED_IN_9_2_0(reason)