00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkWidgetEventTranslator_h
00036 #define __vtkWidgetEventTranslator_h
00037
00038 #include "vtkObject.h"
00039
00040
00041 class vtkEventMap;
00042 class vtkRenderWindowInteractor;
00043 class vtkCallbackCommand;
00044 class vtkEvent;
00045 class vtkAbstractWidget;
00046
00047
00048
00049 class VTK_WIDGETS_EXPORT vtkWidgetEventTranslator : public vtkObject
00050 {
00051 public:
00053 static vtkWidgetEventTranslator *New();
00054
00056
00057 vtkTypeMacro(vtkWidgetEventTranslator,vtkObject);
00058 void PrintSelf(ostream& os, vtkIndent indent);
00060
00062
00065 void SetTranslation(unsigned long VTKEvent, unsigned long widgetEvent);
00066 void SetTranslation(const char *VTKEvent, const char *widgetEvent);
00067 void SetTranslation(unsigned long VTKEvent, int modifier, char keyCode,
00068 int repeatCount, const char* keySym, unsigned long widgetEvent);
00069 void SetTranslation(vtkEvent *VTKevent, unsigned long widgetEvent);
00071
00073
00076 unsigned long GetTranslation(unsigned long VTKEvent);
00077 const char *GetTranslation(const char *VTKEvent);
00078 unsigned long GetTranslation(unsigned long VTKEvent, int modifier, char keyCode,
00079 int repeatCount, char* keySym);
00080 unsigned long GetTranslation(vtkEvent *VTKEvent);
00082
00084
00086 int RemoveTranslation( unsigned long VTKEvent,
00087 int modifier, char keyCode,
00088 int repeatCount, char* keySym);
00089 int RemoveTranslation( vtkEvent *e );
00090 int RemoveTranslation(unsigned long VTKEvent);
00092
00095 void ClearEvents();
00096
00097
00099
00100 void AddEventsToParent(vtkAbstractWidget*, vtkCallbackCommand*, float priority);
00101 void AddEventsToInteractor(vtkRenderWindowInteractor*, vtkCallbackCommand*,
00102 float priority);
00103
00105
00106 protected:
00107
00108 vtkWidgetEventTranslator();
00109 ~vtkWidgetEventTranslator();
00110
00111
00112 vtkEventMap *EventMap;
00113
00114
00115 vtkEvent *Event;
00116
00117 private:
00118 vtkWidgetEventTranslator(const vtkWidgetEventTranslator&);
00119 void operator=(const vtkWidgetEventTranslator&);
00120
00121 };
00122
00123 #endif
00124