VTK  9.1.0
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=========================================================================*/
42#ifndef vtkMagnifierWidget_h
43#define vtkMagnifierWidget_h
44
45#include "vtkAbstractWidget.h"
46#include "vtkInteractionWidgetsModule.h" // For export macro
47
49
50class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
51{
52public:
57
59
63 void PrintSelf(ostream& os, vtkIndent indent) override;
65
72 {
73 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
74 }
75
80 {
81 return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
82 }
83
88
93 void SetEnabled(int enabling) override;
94
96
102 vtkSetMacro(KeyPressIncreaseValue, char);
103 vtkGetMacro(KeyPressIncreaseValue, char);
104 vtkSetMacro(KeyPressDecreaseValue, char);
105 vtkGetMacro(KeyPressDecreaseValue, char);
107
108protected:
111
112 // Keypresses to change value
115
116 // process the registered events
119
122 {
123 Invisible = 0,
124 Visible
125 };
126
127private:
128 vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
129 void operator=(const vtkMagnifierWidget&) = delete;
130};
131
132#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:113
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