VTK  9.7.20261004
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28
29VTK_ABI_NAMESPACE_BEGIN
30class vtkCollection;
32class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleManipulator
33 : public vtkInteractorStyle
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
41
45 void OnMouseMove() override;
46 void OnLeftButtonDown() override;
47 void OnLeftButtonUp() override;
48 void OnMiddleButtonDown() override;
49 void OnMiddleButtonUp() override;
50 void OnRightButtonDown() override;
51 void OnRightButtonUp() override;
52 void OnMouseWheelForward() override;
53 void OnMouseWheelBackward() override;
55
57
62 void OnKeyDown() override;
63 void OnKeyUp() override;
65
70
75
77
80 vtkGetObjectMacro(CameraManipulators, vtkCollection);
82
84
88 vtkSetMacro(MouseWheelZoomsToCursor, bool);
89 vtkGetMacro(MouseWheelZoomsToCursor, bool);
91
93
102 vtkSetMacro(MouseMotionFactor, double);
103 vtkGetMacro(MouseMotionFactor, double);
105
106 void Dolly() override;
107
111 vtkCameraManipulator* FindManipulator(int button, bool alt, bool control, bool shift);
112
113protected:
116
117private:
119 void operator=(const vtkInteractorStyleManipulator&) = delete;
120
121 bool MouseWheelZoomsToCursor = false;
122 double MouseMotionFactor = 1.0;
123
124 // The CameraInteractors also store there button and modifier.
125 vtkCollection* CameraManipulators;
126
127 class vtkInternals;
128 std::unique_ptr<vtkInternals> Internals;
129 friend class vtkInternals;
130};
131VTK_ABI_NAMESPACE_END
132#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.
#define VTK_MARSHALAUTO