VTK  9.3.0
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 
32 
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.
vtkWeakPointer< vtkRenderWindowInteractor > Interactor
vtkVector2i GetPosition() const
Get the position of the mouse when the key was pressed.
void SetPosition(const vtkVector2i &position)
Set the position of the mouse when the key was pressed.
vtkRenderWindowInteractor * GetInteractor() const
Get the interactor for the key event.
char GetKeyCode() const
void SetInteractor(vtkRenderWindowInteractor *interactor)
Set the interactor for the key event.
platform-independent render window interaction including picking and frame rate control.
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:411
@ position
Definition: vtkX3D.h:261