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 =========================================================================*/
48 #ifndef vtkMagnifierWidget_h
49 #define vtkMagnifierWidget_h
50 
51 #include "vtkAbstractWidget.h"
52 #include "vtkInteractionWidgetsModule.h" // For export macro
53 
55 
56 class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
57 {
58 public:
63 
65 
69  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
78  {
79  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
80  }
81 
86  {
87  return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
88  }
89 
93  void CreateDefaultRepresentation() override;
94 
99  void SetEnabled(int enabling) override;
100 
102 
108  vtkSetMacro(KeyPressIncreaseValue, char);
109  vtkGetMacro(KeyPressIncreaseValue, char);
110  vtkSetMacro(KeyPressDecreaseValue, char);
111  vtkGetMacro(KeyPressDecreaseValue, char);
113 
114 protected:
117 
118  // Keypresses to change value
121 
122  // process the registered events
125 
128  {
129  Invisible = 0,
130  Visible
131  };
132 
133 private:
134  vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
135  void operator=(const vtkMagnifierWidget&) = delete;
136 };
137 
138 #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 *)
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