00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkInteractorStyleUser.h,v $ 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 00035 #ifndef __vtkInteractorStyleUser_h 00036 #define __vtkInteractorStyleUser_h 00037 00038 #include "vtkInteractorStyle.h" 00039 00040 // new motion flag 00041 #define VTKIS_USERINTERACTION 8 00042 00043 class VTK_RENDERING_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle 00044 { 00045 public: 00046 static vtkInteractorStyleUser *New(); 00047 vtkTypeRevisionMacro(vtkInteractorStyleUser,vtkInteractorStyle); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00055 vtkGetVector2Macro(LastPos,int); 00057 00059 00062 vtkGetVector2Macro(OldPos,int); 00064 00066 00068 vtkGetMacro(ShiftKey,int); 00069 vtkGetMacro(CtrlKey,int); 00071 00073 00074 vtkGetMacro(Char,int); 00076 00078 00080 vtkGetStringMacro(KeySym); 00082 00084 00086 vtkGetMacro(Button,int); 00088 00090 00091 virtual void OnMouseMove(); 00092 virtual void OnLeftButtonDown(); 00093 virtual void OnLeftButtonUp(); 00094 virtual void OnMiddleButtonDown(); 00095 virtual void OnMiddleButtonUp(); 00096 virtual void OnRightButtonDown(); 00097 virtual void OnRightButtonUp(); 00099 00101 00102 virtual void OnChar(); 00103 virtual void OnKeyPress(); 00104 virtual void OnKeyRelease(); 00106 00108 00109 virtual void OnExpose(); 00110 virtual void OnConfigure(); 00111 virtual void OnEnter(); 00112 virtual void OnLeave(); 00114 00115 virtual void OnTimer(); 00116 00117 protected: 00118 00119 vtkInteractorStyleUser(); 00120 ~vtkInteractorStyleUser(); 00121 00122 int LastPos[2]; 00123 int OldPos[2]; 00124 00125 int ShiftKey; 00126 int CtrlKey; 00127 int Char; 00128 char *KeySym; 00129 int Button; 00130 00131 private: 00132 vtkInteractorStyleUser(const vtkInteractorStyleUser&); // Not implemented. 00133 void operator=(const vtkInteractorStyleUser&); // Not implemented. 00134 }; 00135 00136 #endif