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