VTK  9.7.20260728
vtkInteractorStyleManipulator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
20
21#ifndef vtkInteractorStyleManipulator_h
22#define vtkInteractorStyleManipulator_h
23
24#include "vtkInteractorStyle.h"
25
26#include "vtkInteractionStyleModule.h" // needed for export macro
27
28VTK_ABI_NAMESPACE_BEGIN
29class vtkCollection;
31class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleManipulator : public vtkInteractorStyle
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
43 void OnMouseMove() override;
44 void OnLeftButtonDown() override;
45 void OnLeftButtonUp() override;
46 void OnMiddleButtonDown() override;
47 void OnMiddleButtonUp() override;
48 void OnRightButtonDown() override;
49 void OnRightButtonUp() override;
50 void OnMouseWheelForward() override;
51 void OnMouseWheelBackward() override;
53
55
60 void OnKeyDown() override;
61 void OnKeyUp() override;
63
68
73
75
78 vtkGetObjectMacro(CameraManipulators, vtkCollection);
80
82
86 vtkSetMacro(MouseWheelZoomsToCursor, bool);
87 vtkGetMacro(MouseWheelZoomsToCursor, bool);
89
91
100 vtkSetMacro(MouseMotionFactor, double);
101 vtkGetMacro(MouseMotionFactor, double);
103
104 void Dolly() override;
105
109 vtkCameraManipulator* FindManipulator(int button, bool alt, bool control, bool shift);
110
111protected:
114
115private:
117 void operator=(const vtkInteractorStyleManipulator&) = delete;
118
119 bool MouseWheelZoomsToCursor = false;
120 double MouseMotionFactor = 1.0;
121
122 // The CameraInteractors also store there button and modifier.
123 vtkCollection* CameraManipulators;
124
125 class vtkInternals;
126 std::unique_ptr<vtkInternals> Internals;
127 friend class vtkInternals;
128};
129VTK_ABI_NAMESPACE_END
130#endif
Abstraction of style away from button.
create and manipulate ordered lists of objects
a simple class to control print indentation
Definition vtkIndent.h:108
~vtkInteractorStyleManipulator() override
vtkCameraManipulator * FindManipulator(int button, bool alt, bool control, bool shift)
Returns the chosen manipulator based on the modifiers.
void OnMiddleButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void RemoveAllManipulators()
Removes all manipulators.
void OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnKeyUp() override
Unlike mouse events, these are forwarded to all camera manipulators since we don't have a mechanism t...
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMouseWheelBackward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnKeyDown() override
Unlike mouse events, these are forwarded to all camera manipulators since we don't have a mechanism t...
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void AddManipulator(vtkCameraManipulator *m)
Access to adding or removing manipulators.
static vtkInteractorStyleManipulator * New()
void OnMouseWheelForward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.