00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00028 #ifndef __vtkCommand_h
00029 #define __vtkCommand_h
00030
00031 #include "vtkWin32Header.h"
00032
00033 class vtkObject;
00034
00035
00036 class VTK_COMMON_EXPORT vtkCommand
00037 {
00038 public:
00039 void Delete() {
00040 this->UnRegister(); }
00041
00043
00044 void Register();
00045 void Register(vtkObject *) {
00046 this->Register(); }
00048
00050
00053 void UnRegister();
00054 void UnRegister(vtkObject *) {
00055 this->UnRegister(); }
00057
00058 virtual void Execute(vtkObject *caller, unsigned long, void *callData) = 0;
00059 static const char *GetStringFromEventId(unsigned long event);
00060 static unsigned long GetEventIdFromString(const char *event);
00061
00062
00063
00064
00065
00066
00067
00068 enum EventIds {
00069 NoEvent = 0,
00070 AnyEvent,
00071 DeleteEvent,
00072 StartEvent,
00073 EndEvent,
00074 ProgressEvent,
00075 PickEvent,
00076 StartPickEvent,
00077 EndPickEvent,
00078 AbortCheckEvent,
00079 ExitEvent,
00080 LeftButtonPressEvent,
00081 LeftButtonReleaseEvent,
00082 MiddleButtonPressEvent,
00083 MiddleButtonReleaseEvent,
00084 RightButtonPressEvent,
00085 RightButtonReleaseEvent,
00086 EnterEvent,
00087 LeaveEvent,
00088 KeyPressEvent,
00089 KeyReleaseEvent,
00090 CharEvent,
00091 ConfigureEvent,
00092 TimerEvent,
00093 MouseMoveEvent,
00094 ResetCameraEvent,
00095 ResetCameraClippingRangeEvent,
00096 ModifiedEvent,
00097 WindowLevelEvent,
00098 NextDataEvent,
00099 PushDataStartEvent,
00100 SetOutputEvent,
00101 EndOfDataEvent,
00102 ErrorEvent,
00103 WarningEvent,
00104 UserEvent = 1000
00105 };
00106
00107 protected:
00108 int ReferenceCount;
00109 vtkCommand() { this->ReferenceCount = 1;};
00110 virtual ~vtkCommand() {};
00111 };
00112
00113 #endif
00114