VTK  9.3.1
vtkMagnifierWidget.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
36 #ifndef vtkMagnifierWidget_h
37 #define vtkMagnifierWidget_h
38 
39 #include "vtkAbstractWidget.h"
40 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
41 #include "vtkInteractionWidgetsModule.h" // For export macro
42 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
43 
44 VTK_ABI_NAMESPACE_BEGIN
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
48 {
49 public:
53  static vtkMagnifierWidget* New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
69  {
70  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
71  }
72 
77  {
78  return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
79  }
80 
84  void CreateDefaultRepresentation() override;
85 
90  void SetEnabled(int enabling) override;
91 
93 
99  vtkSetMacro(KeyPressIncreaseValue, char);
100  vtkGetMacro(KeyPressIncreaseValue, char);
101  vtkSetMacro(KeyPressDecreaseValue, char);
102  vtkGetMacro(KeyPressDecreaseValue, char);
104 
105 protected:
107  ~vtkMagnifierWidget() override;
108 
109  // Keypresses to change value
112 
113  // process the registered events
114  static void MoveAction(vtkAbstractWidget*);
115  static void CharAction(vtkAbstractWidget*);
116 
119  {
120  Invisible = 0,
121  Visible
122  };
123 #if !defined(VTK_LEGACY_REMOVE)
124  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
126 #endif
127 
128 private:
129  vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
130  void operator=(const vtkMagnifierWidget&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
represent a vtkBorderWidget
void SetRepresentation(vtkMagnifierRepresentation *r)
Specify an instance of vtkMagnifierRepresentation used to represent this widget in the scene...
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkMagnifierRepresentation * GetMagnifierRepresentation()
Return the representation as a vtkBorderRepresentation.
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:28
create a moving, magnifying renderer that can inspect the contents of an encapsulating renderer...
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...