VTK  9.3.1
vtkContextKeyEvent.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
3 
13 #ifndef vtkContextKeyEvent_h
14 #define vtkContextKeyEvent_h
15 
16 #include "vtkRenderingContext2DModule.h" // For export macro
17 #include "vtkVector.h" // For vtkVector2i
18 #include "vtkWeakPointer.h" // For vtkWeakPointer
19 
20 VTK_ABI_NAMESPACE_BEGIN
22 
23 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextKeyEvent
24 {
25 public:
27 
31  void SetInteractor(vtkRenderWindowInteractor* interactor);
32 
37  vtkRenderWindowInteractor* GetInteractor() const;
38 
42  void SetPosition(const vtkVector2i& position) { this->Position = position; }
43 
47  vtkVector2i GetPosition() const { return this->Position; }
48 
49  char GetKeyCode() const;
50 
51 protected:
54 };
55 
56 VTK_ABI_NAMESPACE_END
57 #endif // vtkContextKeyEvent_h
58 // VTK-HeaderTest-Exclude: vtkContextKeyEvent.h
data structure to represent key events.
vtkVector2i GetPosition() const
Get the position of the mouse when the key was pressed.
platform-independent render window interaction including picking and frame rate control.
void SetPosition(const vtkVector2i &position)
Set the position of the mouse when the key was pressed.
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:440
vtkWeakPointer< vtkRenderWindowInteractor > Interactor