Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkCommand.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCommand.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 =========================================================================*/
00046 #ifndef __vtkCommand_h
00047 #define __vtkCommand_h
00048 
00049 #include "vtkObjectBase.h"
00050 
00051 class vtkObject;
00052 
00053 // The superclass that all commands should be subclasses of
00054 class VTK_COMMON_EXPORT vtkCommand : public vtkObjectBase
00055 {
00056 public:
00058 
00061   void UnRegister();
00062   virtual void UnRegister(vtkObjectBase *) 
00063     { this->UnRegister(); }
00065   
00067 
00076   virtual void Execute(vtkObject *caller, unsigned long eventId, 
00077                        void *callData) = 0;
00079 
00081 
00083   static const char *GetStringFromEventId(unsigned long event);
00084   static unsigned long GetEventIdFromString(const char *event);
00086 
00088 
00090   void SetAbortFlag(int f)  
00091     { this->AbortFlag = f; }
00092   int GetAbortFlag() 
00093     { return this->AbortFlag; }
00094   void AbortFlagOn() 
00095     { this->SetAbortFlag(1); }
00096   void AbortFlagOff() 
00097     { this->SetAbortFlag(0); }
00099   
00100 //BTX
00102 
00106   enum EventIds {
00107     NoEvent = 0,
00108     AnyEvent,
00109     DeleteEvent,
00110     StartEvent,
00111     EndEvent,
00112     RenderEvent,
00113     ProgressEvent,
00114     PickEvent,
00115     StartPickEvent,
00116     EndPickEvent,
00117     AbortCheckEvent,
00118     ExitEvent,
00119     LeftButtonPressEvent,
00120     LeftButtonReleaseEvent,
00121     MiddleButtonPressEvent,
00122     MiddleButtonReleaseEvent,
00123     RightButtonPressEvent,
00124     RightButtonReleaseEvent,
00125     EnterEvent,
00126     LeaveEvent,
00127     KeyPressEvent,
00128     KeyReleaseEvent,
00129     CharEvent,
00130     ExposeEvent,
00131     ConfigureEvent,
00132     TimerEvent,
00133     MouseMoveEvent,
00134     MouseWheelForwardEvent,
00135     MouseWheelBackwardEvent,
00136     ResetCameraEvent,
00137     ResetCameraClippingRangeEvent,
00138     ModifiedEvent,
00139     WindowLevelEvent,
00140     StartWindowLevelEvent,
00141     EndWindowLevelEvent,
00142     ResetWindowLevelEvent,
00143     SetOutputEvent,
00144     ErrorEvent,
00145     WarningEvent,
00146     StartInteractionEvent, //mainly used by vtkInteractorObservers
00147     InteractionEvent,
00148     EndInteractionEvent,
00149     EnableEvent,
00150     DisableEvent,
00151     CreateTimerEvent,
00152     DestroyTimerEvent,
00153     PlacePointEvent,
00154     PlaceWidgetEvent,
00155     CursorChangedEvent,
00156     ExecuteInformationEvent,
00157     RenderWindowMessageEvent,
00158     WrongTagEvent,
00159     StartAnimationCueEvent, // used by vtkAnimationCue
00160     AnimationCueTickEvent,
00161     EndAnimationCueEvent,
00162     VolumeMapperRenderProgressEvent,
00163     VolumeMapperComputeGradientsEndEvent,
00164     VolumeMapperComputeGradientsProgressEvent,
00165     VolumeMapperComputeGradientsStartEvent,
00166     WidgetModifiedEvent,
00167     WidgetValueChangedEvent,
00168     WidgetActivateEvent,
00169     UserEvent = 1000
00170   };
00172 //ETX
00173 
00174 protected:
00175   int AbortFlag;
00176   vtkCommand();
00177   virtual ~vtkCommand() {}
00178 
00179   friend class vtkSubjectHelper;
00180 //BTX
00181   vtkCommand(const vtkCommand& c) : vtkObjectBase(c) {}
00182   void operator=(const vtkCommand&) {}
00183 //ETX
00184 };
00185 
00186 #endif /* __vtkCommand_h */
00187  

Generated on Thu Sep 7 11:42:28 2006 for VTK by  doxygen 1.4.3-20050530