VTK
dox/Rendering/Context2D/vtkContextKeyEvent.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkContextScene.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00024 #ifndef __vtkContextKeyEvent_h
00025 #define __vtkContextKeyEvent_h
00026 
00027 #include "vtkRenderingContext2DModule.h" // For export macro
00028 #include "vtkWeakPointer.h" // For vtkWeakPointer
00029 #include "vtkVector.h" // For vtkVector2i
00030 
00031 class vtkRenderWindowInteractor;
00032 
00033 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextKeyEvent
00034 {
00035 public:
00036   vtkContextKeyEvent();
00037   ~vtkContextKeyEvent();
00038 
00040   void SetInteractor(vtkRenderWindowInteractor *interactor);
00041 
00044   vtkRenderWindowInteractor* GetInteractor() const;
00045 
00047   void SetPosition(const vtkVector2i& position) { this->Position = position; }
00048 
00050   vtkVector2i GetPosition() const { return this->Position; }
00051 
00052   char GetKeyCode() const;
00053 
00054 protected:
00055   vtkWeakPointer<vtkRenderWindowInteractor> Interactor;
00056   vtkVector2i Position;
00057 };
00058 
00059 #endif // __vtkContextKeyEvent_h
00060 // VTK-HeaderTest-Exclude: vtkContextKeyEvent.h