vtkXYPlotWidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00045 #ifndef __vtkXYPlotWidget_h
00046 #define __vtkXYPlotWidget_h
00047
00048 #include "vtkInteractorObserver.h"
00049 class vtkXYPlotActor;
00050
00051 class VTK_HYBRID_EXPORT vtkXYPlotWidget : public vtkInteractorObserver
00052 {
00053 public:
00054 static vtkXYPlotWidget *New();
00055 vtkTypeRevisionMacro(vtkXYPlotWidget,vtkInteractorObserver);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00057
00059
00060 virtual void SetXYPlotActor(vtkXYPlotActor *);
00061 vtkGetObjectMacro(XYPlotActor,vtkXYPlotActor);
00063
00065 virtual void SetEnabled(int);
00066
00067 protected:
00068 vtkXYPlotWidget();
00069 ~vtkXYPlotWidget();
00070
00071
00072 vtkXYPlotActor *XYPlotActor;
00073
00074
00075 static void ProcessEvents(vtkObject* object,
00076 unsigned long event,
00077 void* clientdata,
00078 void* calldata);
00079
00080
00081 void OnLeftButtonDown();
00082 void OnLeftButtonUp();
00083 void OnMouseMove();
00084
00085
00086 float StartPosition[2];
00087
00088
00089 int State;
00090 enum WidgetState
00091 {
00092 Moving=0,
00093 AdjustingP1,
00094 AdjustingP2,
00095 AdjustingP3,
00096 AdjustingP4,
00097 AdjustingE1,
00098 AdjustingE2,
00099 AdjustingE3,
00100 AdjustingE4,
00101 Inside,
00102 Outside
00103 };
00104
00105
00106
00107
00108 int ComputeStateBasedOnPosition(int X, int Y, int *pos1, int *pos2);
00109
00110
00111 void SetCursor(int State);
00112
00113 private:
00114 vtkXYPlotWidget(const vtkXYPlotWidget&);
00115 void operator=(const vtkXYPlotWidget&);
00116 };
00117
00118 #endif