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