00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00042 #ifndef __vtkInteractorStyleRubberBand2D_h
00043 #define __vtkInteractorStyleRubberBand2D_h
00044
00045 #include "vtkInteractorStyle.h"
00046
00047 class vtkUnsignedCharArray;
00048
00049 class VTK_RENDERING_EXPORT vtkInteractorStyleRubberBand2D : public vtkInteractorStyle
00050 {
00051 public:
00052 static vtkInteractorStyleRubberBand2D *New();
00053 vtkTypeMacro(vtkInteractorStyleRubberBand2D, vtkInteractorStyle);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00056 virtual void OnLeftButtonDown();
00057 virtual void OnLeftButtonUp();
00058 virtual void OnMiddleButtonDown();
00059 virtual void OnMiddleButtonUp();
00060 virtual void OnRightButtonDown();
00061 virtual void OnRightButtonUp();
00062 virtual void OnMouseMove();
00063 virtual void OnMouseWheelForward();
00064 virtual void OnMouseWheelBackward();
00065
00067
00068 vtkSetMacro(RenderOnMouseMove, bool);
00069 vtkGetMacro(RenderOnMouseMove, bool);
00070 vtkBooleanMacro(RenderOnMouseMove, bool);
00072
00073
00075
00076 enum
00077 {
00078 SELECT_NORMAL = 0,
00079 SELECT_UNION = 1
00080 };
00081
00083
00085
00086 vtkGetMacro(Interaction, int);
00088
00089
00090 enum
00091 {
00092 NONE,
00093 PANNING,
00094 ZOOMING,
00095 SELECTING
00096 };
00097
00098
00100
00104 vtkGetVector2Macro(StartPosition,int);
00105 vtkGetVector2Macro(EndPosition,int);
00107
00108 protected:
00109 vtkInteractorStyleRubberBand2D();
00110 ~vtkInteractorStyleRubberBand2D();
00111
00112
00113 int Interaction;
00114
00115
00116 void RedrawRubberBand();
00117
00118
00119 int StartPosition[2];
00120
00121
00122 int EndPosition[2];
00123
00124
00125 vtkUnsignedCharArray* PixelArray;
00126
00127
00128 bool RenderOnMouseMove;
00129
00130 private:
00131 vtkInteractorStyleRubberBand2D(const vtkInteractorStyleRubberBand2D&);
00132 void operator=(const vtkInteractorStyleRubberBand2D&);
00133 };
00134
00135 #endif