VTK
vtkContextKeyEvent.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContextScene.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 =========================================================================*/
15 
25 #ifndef vtkContextKeyEvent_h
26 #define vtkContextKeyEvent_h
27 
28 #include "vtkRenderingContext2DModule.h" // For export macro
29 #include "vtkWeakPointer.h" // For vtkWeakPointer
30 #include "vtkVector.h" // For vtkVector2i
31 
33 
34 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextKeyEvent
35 {
36 public:
38 
42  void SetInteractor(vtkRenderWindowInteractor *interactor);
43 
48  vtkRenderWindowInteractor* GetInteractor() const;
49 
53  void SetPosition(const vtkVector2i& position) { this->Position = position; }
54 
58  vtkVector2i GetPosition() const { return this->Position; }
59 
60  char GetKeyCode() const;
61 
62 protected:
65 };
66 
67 #endif // vtkContextKeyEvent_h
68 // 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:408
vtkWeakPointer< vtkRenderWindowInteractor > Interactor