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
30#ifndef vtkResliceCursorWidget_h
31#define vtkResliceCursorWidget_h
32
33#include "vtkAbstractWidget.h"
34#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
35#include "vtkInteractionWidgetsModule.h" // For export macro
36#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
37
38VTK_ABI_NAMESPACE_BEGIN
40
41class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorWidget : public vtkAbstractWidget
42{
43public:
48
50
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
63 {
64 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
65 }
66
71 {
72 return reinterpret_cast<vtkResliceCursorRepresentation*>(this->WidgetRep);
73 }
74
79
85 void SetEnabled(int) override;
86
88
91 vtkSetMacro(ManageWindowLevel, vtkTypeBool);
92 vtkGetMacro(ManageWindowLevel, vtkTypeBool);
93 vtkBooleanMacro(ManageWindowLevel, vtkTypeBool);
95
99 enum
100 {
101 WindowLevelEvent = 1055,
104 ResetCursorEvent
105 };
106
110 virtual void ResetResliceCursor();
111
112protected:
115
116 // These are the callbacks for this widget
125
126 // helper methods for cursor management
127 void SetCursor(int state) override;
128
129 // Start Window Level
131
132 // Invoke the appropriate event based on state
134
135 // Manage the state of the widget
138 {
139 Start = 0,
140 Active
141 };
142#if !defined(VTK_LEGACY_REMOVE)
143 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
145#endif
146
147 // Keep track whether key modifier key is pressed
150
151private:
153 void operator=(const vtkResliceCursorWidget&) = delete;
154};
155
156VTK_ABI_NAMESPACE_END
157#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 vtkResliceCursorWidget * New()
Instantiate this class.
static void EndResizeThicknessAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class macros.
void SetCursor(int state) override
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 *)
vtkResliceCursorRepresentation * GetResliceCursorRepresentation()
Return the representation as a vtkResliceCursorRepresentation.
~vtkResliceCursorWidget() override
static void RotateAction(vtkAbstractWidget *)
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)