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=========================================================================*/
45#ifndef vtkMagnifierWidget_h
46#define vtkMagnifierWidget_h
47
48#include "vtkAbstractWidget.h"
49#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
50#include "vtkInteractionWidgetsModule.h" // For export macro
51
53
54class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
55{
56public:
61
63
67 void PrintSelf(ostream& os, vtkIndent indent) override;
69
76 {
77 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
78 }
79
84 {
85 return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
86 }
87
92
97 void SetEnabled(int enabling) override;
98
100
106 vtkSetMacro(KeyPressIncreaseValue, char);
107 vtkGetMacro(KeyPressIncreaseValue, char);
108 vtkSetMacro(KeyPressDecreaseValue, char);
109 vtkGetMacro(KeyPressDecreaseValue, char);
111
112protected:
115
116 // Keypresses to change value
119
120 // process the registered events
123
126 {
127 Invisible = 0,
128 Visible
129 };
130#if !defined(VTK_LEGACY_REMOVE)
131 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
133#endif
134
135private:
136 vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
137 void operator=(const vtkMagnifierWidget&) = delete;
138};
139
140#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition vtkIndent.h:34
represent a vtkBorderWidget
create a moving, magnifying renderer that can inspect the contents of an encapsulating renderer.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void CharAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the this widget must activate the representation.
~vtkMagnifierWidget() override
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkMagnifierRepresentation *r)
Specify an instance of vtkMagnifierRepresentation used to represent this widget in the scene.
vtkMagnifierRepresentation * GetMagnifierRepresentation()
Return the representation as a vtkBorderRepresentation.
static vtkMagnifierWidget * New()
Method to instantiate class.
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)