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