VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkWebInteractionEvent.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 =========================================================================*/ 00020 #ifndef __vtkWebInteractionEvent_h 00021 #define __vtkWebInteractionEvent_h 00022 00023 #include "vtkObject.h" 00024 #include "vtkWebCoreModule.h" // needed for exports 00025 00026 class VTKWEBCORE_EXPORT vtkWebInteractionEvent : public vtkObject 00027 { 00028 public: 00029 static vtkWebInteractionEvent* New(); 00030 vtkTypeMacro(vtkWebInteractionEvent, vtkObject); 00031 void PrintSelf(ostream& os, vtkIndent indent); 00032 00033 enum MouseButton 00034 { 00035 LEFT_BUTTON = 0x01, 00036 MIDDLE_BUTTON = 0x02, 00037 RIGHT_BUTTON = 0x04, 00038 }; 00039 00040 enum ModifierKeys 00041 { 00042 SHIFT_KEY = 0x01, 00043 CTRL_KEY = 0x02, 00044 ALT_KEY = 0x04, 00045 META_KEY = 0x08 00046 }; 00047 00049 00050 vtkSetMacro(Buttons, unsigned int); 00051 vtkGetMacro(Buttons, unsigned int); 00053 00055 00056 vtkSetMacro(Modifiers, unsigned int); 00057 vtkGetMacro(Modifiers, unsigned int); 00059 00061 00062 vtkSetMacro(KeyCode, char); 00063 vtkGetMacro(KeyCode, char); 00065 00067 00068 vtkSetMacro(X, double); 00069 vtkGetMacro(X, double); 00070 vtkSetMacro(Y, double); 00071 vtkGetMacro(Y, double); 00072 vtkSetMacro(Scroll, double); 00073 vtkGetMacro(Scroll, double); 00075 00076 // Handle double click 00077 vtkSetMacro(RepeatCount, int); 00078 vtkGetMacro(RepeatCount, int); 00079 //BTX 00080 protected: 00081 vtkWebInteractionEvent(); 00082 ~vtkWebInteractionEvent(); 00083 00084 unsigned int Buttons; 00085 unsigned int Modifiers; 00086 char KeyCode; 00087 double X; 00088 double Y; 00089 double Scroll; 00090 int RepeatCount; 00091 00092 private: 00093 vtkWebInteractionEvent(const vtkWebInteractionEvent&); // Not implemented 00094 void operator=(const vtkWebInteractionEvent&); // Not implemented 00095 //ETX 00096 }; 00097 00098 #endif