VTK
dox/Rendering/vtkInteractorStyleUser.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInteractorStyleUser.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 
00038 #ifndef __vtkInteractorStyleUser_h
00039 #define __vtkInteractorStyleUser_h
00040 
00041 #include "vtkInteractorStyle.h"
00042 
00043 // new motion flag
00044 #define VTKIS_USERINTERACTION 8 
00045 
00046 class VTK_RENDERING_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle 
00047 {
00048 public:
00049   static vtkInteractorStyleUser *New();
00050   vtkTypeMacro(vtkInteractorStyleUser,vtkInteractorStyle);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052   
00054 
00058   vtkGetVector2Macro(LastPos,int);
00060 
00062 
00065   vtkGetVector2Macro(OldPos,int);
00067 
00069 
00071   vtkGetMacro(ShiftKey,int);
00072   vtkGetMacro(CtrlKey,int);
00074 
00076 
00077   vtkGetMacro(Char,int);
00079 
00081 
00083   vtkGetStringMacro(KeySym);
00085 
00087 
00089   vtkGetMacro(Button,int);
00091 
00093 
00094   virtual void OnMouseMove();
00095   virtual void OnLeftButtonDown();
00096   virtual void OnLeftButtonUp();
00097   virtual void OnMiddleButtonDown();
00098   virtual void OnMiddleButtonUp();
00099   virtual void OnRightButtonDown();
00100   virtual void OnRightButtonUp();
00102 
00104 
00105   virtual void OnChar();
00106   virtual void OnKeyPress();
00107   virtual void OnKeyRelease();
00109 
00111 
00112   virtual void OnExpose();
00113   virtual void OnConfigure();
00114   virtual void OnEnter();
00115   virtual void OnLeave();
00117 
00118   virtual void OnTimer();
00119 
00120 protected:
00121 
00122   vtkInteractorStyleUser();
00123   ~vtkInteractorStyleUser();
00124 
00125   int LastPos[2];
00126   int OldPos[2];
00127 
00128   int ShiftKey;
00129   int CtrlKey;
00130   int Char;
00131   char *KeySym;
00132   int Button;
00133 
00134 private:
00135   vtkInteractorStyleUser(const vtkInteractorStyleUser&);  // Not implemented.
00136   void operator=(const vtkInteractorStyleUser&);  // Not implemented.
00137 };
00138 
00139 #endif