Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Hybrid/vtkScalarBarWidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00055 #ifndef __vtkScalarBarWidget_h
00056 #define __vtkScalarBarWidget_h
00057
00058 #include "vtkInteractorObserver.h"
00059 class vtkScalarBarActor;
00060
00061 class VTK_HYBRID_EXPORT vtkScalarBarWidget : public vtkInteractorObserver
00062 {
00063 public:
00064 static vtkScalarBarWidget *New();
00065 vtkTypeRevisionMacro(vtkScalarBarWidget,vtkInteractorObserver);
00066 void PrintSelf(ostream& os, vtkIndent indent);
00067
00069
00070 void SetScalarBarActor(vtkScalarBarActor *scalarbar);
00071 vtkGetObjectMacro(ScalarBarActor,vtkScalarBarActor);
00073
00075 virtual void SetEnabled(int);
00076
00077 protected:
00078 vtkScalarBarWidget();
00079 ~vtkScalarBarWidget();
00080
00081
00082 vtkScalarBarActor *ScalarBarActor;
00083
00084
00085 static void ProcessEvents(vtkObject* object,
00086 unsigned long event,
00087 void* clientdata,
00088 void* calldata);
00089
00090
00091 void OnLeftButtonDown();
00092 void OnLeftButtonUp();
00093 void OnRightButtonDown();
00094 void OnRightButtonUp();
00095 void OnMouseMove();
00096
00097
00098 float StartPosition[2];
00099
00100
00101 int State;
00102
00103
00104 int LeftButtonDown;
00105 int RightButtonDown;
00106 enum WidgetState
00107 {
00108 Moving=0,
00109 AdjustingP1,
00110 AdjustingP2,
00111 AdjustingP3,
00112 AdjustingP4,
00113 AdjustingE1,
00114 AdjustingE2,
00115 AdjustingE3,
00116 AdjustingE4,
00117 Inside,
00118 Outside
00119 };
00120
00121
00122
00123
00124 int ComputeStateBasedOnPosition(int X, int Y, int *pos1, int *pos2);
00125
00126
00127 void SetCursor(int State);
00128
00129 private:
00130 vtkScalarBarWidget(const vtkScalarBarWidget&);
00131 void operator=(const vtkScalarBarWidget&);
00132 };
00133
00134 #endif