VTK  9.2.5
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:
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:
118 
119  // Keypresses to change value
122 
123  // process the registered events
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
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:119
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 *)
static vtkMagnifierWidget * New()
Method to instantiate class.
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.
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)