VTK
dox/Interaction/Style/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 "vtkInteractionStyleModule.h" // For export macro
00042 #include "vtkInteractorStyle.h"
00043 
00044 // new motion flag
00045 #define VTKIS_USERINTERACTION 8
00046 
00047 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
00048 {
00049 public:
00050   static vtkInteractorStyleUser *New();
00051   vtkTypeMacro(vtkInteractorStyleUser,vtkInteractorStyle);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00059   vtkGetVector2Macro(LastPos,int);
00061 
00063 
00066   vtkGetVector2Macro(OldPos,int);
00068 
00070 
00072   vtkGetMacro(ShiftKey,int);
00073   vtkGetMacro(CtrlKey,int);
00075 
00077 
00078   vtkGetMacro(Char,int);
00080 
00082 
00084   vtkGetStringMacro(KeySym);
00086 
00088 
00090   vtkGetMacro(Button,int);
00092 
00094 
00095   virtual void OnMouseMove();
00096   virtual void OnLeftButtonDown();
00097   virtual void OnLeftButtonUp();
00098   virtual void OnMiddleButtonDown();
00099   virtual void OnMiddleButtonUp();
00100   virtual void OnRightButtonDown();
00101   virtual void OnRightButtonUp();
00103 
00105 
00106   virtual void OnChar();
00107   virtual void OnKeyPress();
00108   virtual void OnKeyRelease();
00110 
00112 
00113   virtual void OnExpose();
00114   virtual void OnConfigure();
00115   virtual void OnEnter();
00116   virtual void OnLeave();
00118 
00119   virtual void OnTimer();
00120 
00121 protected:
00122 
00123   vtkInteractorStyleUser();
00124   ~vtkInteractorStyleUser();
00125 
00126   int LastPos[2];
00127   int OldPos[2];
00128 
00129   int ShiftKey;
00130   int CtrlKey;
00131   int Char;
00132   char *KeySym;
00133   int Button;
00134 
00135 private:
00136   vtkInteractorStyleUser(const vtkInteractorStyleUser&);  // Not implemented.
00137   void operator=(const vtkInteractorStyleUser&);  // Not implemented.
00138 };
00139 
00140 #endif