VTK  9.2.6
vtkMagnifierWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMagnifierWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
48 #ifndef vtkMagnifierWidget_h
49 #define vtkMagnifierWidget_h
50 
51 #include "vtkAbstractWidget.h"
52 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
53 #include "vtkInteractionWidgetsModule.h" // For export macro
54 
56 
57 class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
58 {
59 public:
63  static vtkMagnifierWidget* New();
64 
66 
70  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
79  {
80  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
81  }
82 
87  {
88  return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
89  }
90 
94  void CreateDefaultRepresentation() override;
95 
100  void SetEnabled(int enabling) override;
101 
103 
109  vtkSetMacro(KeyPressIncreaseValue, char);
110  vtkGetMacro(KeyPressIncreaseValue, char);
111  vtkSetMacro(KeyPressDecreaseValue, char);
112  vtkGetMacro(KeyPressDecreaseValue, char);
114 
115 protected:
117  ~vtkMagnifierWidget() override;
118 
119  // Keypresses to change value
122 
123  // process the registered events
124  static void MoveAction(vtkAbstractWidget*);
125  static void CharAction(vtkAbstractWidget*);
126 
129  {
130  Invisible = 0,
131  Visible
132  };
133 #if !defined(VTK_LEGACY_REMOVE)
134  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
136 #endif
137 
138 private:
139  vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
140  void operator=(const vtkMagnifierWidget&) = delete;
141 };
142 
143 #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:39
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...