VTK
dox/Charts/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 "vtkWeakPointer.h" // For vtkWeakPointer
00028 #include "vtkVector.h" // For vtkVector2i
00029 
00030 class vtkRenderWindowInteractor;
00031 
00032 class vtkContextKeyEvent
00033 {
00034 public:
00035   vtkContextKeyEvent();
00036   ~vtkContextKeyEvent();
00037 
00039   void SetInteractor(vtkRenderWindowInteractor *interactor);
00040 
00043   vtkRenderWindowInteractor* GetInteractor() const;
00044 
00046   void SetPosition(const vtkVector2i& position) { this->Position = position; }
00047 
00049   vtkVector2i GetPosition() const { return this->Position; }
00050 
00051   char GetKeyCode() const;
00052 
00053 protected:
00054   vtkWeakPointer<vtkRenderWindowInteractor> Interactor;
00055   vtkVector2i Position;
00056 };
00057 
00058 #endif // __vtkContextKeyEvent_h