00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00039 #ifndef __vtkInteractorStyleTreeMapHover_h
00040 #define __vtkInteractorStyleTreeMapHover_h
00041
00042 #include "vtkInteractorStyleImage.h"
00043
00044 class vtkBalloonRepresentation;
00045 class vtkPoints;
00046 class vtkRenderer;
00047 class vtkTree;
00048 class vtkTreeMapLayout;
00049 class vtkTreeMapToPolyData;
00050 class vtkWorldPointPicker;
00051
00052 class VTK_VIEWS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
00053 {
00054 public:
00055 static vtkInteractorStyleTreeMapHover* New();
00056 vtkTypeMacro(vtkInteractorStyleTreeMapHover,vtkInteractorStyleImage);
00057 void PrintSelf(ostream& os, vtkIndent indent);
00058
00060
00062 void SetLayout(vtkTreeMapLayout* layout);
00063 vtkGetObjectMacro(Layout, vtkTreeMapLayout);
00065
00067
00069 void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
00070 vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
00072
00074
00076 vtkSetStringMacro(LabelField);
00077 vtkGetStringMacro(LabelField);
00079
00081
00083 void OnMouseMove();
00084 void OnLeftButtonUp();
00086
00088
00089 void HighLightItem(vtkIdType id);
00090 void HighLightCurrentSelectedItem();
00092
00093 virtual void SetInteractor(vtkRenderWindowInteractor *rwi);
00094
00096 void SetHighLightColor(double r, double g, double b);
00097
00099 void SetSelectionLightColor(double r, double g, double b);
00100
00102
00103 void SetHighLightWidth(double lw);
00104 double GetHighLightWidth();
00106
00108
00109 void SetSelectionWidth(double lw);
00110 double GetSelectionWidth();
00112
00113 protected:
00114 vtkInteractorStyleTreeMapHover();
00115 ~vtkInteractorStyleTreeMapHover();
00116
00117 private:
00118 vtkInteractorStyleTreeMapHover(const vtkInteractorStyleTreeMapHover&);
00119 void operator=(const vtkInteractorStyleTreeMapHover&);
00120
00121
00122 vtkIdType GetTreeMapIdAtPos(int x, int y);
00123 void GetBoundingBoxForTreeMapItem(vtkIdType id, float *binfo);
00124
00125 vtkWorldPointPicker* Picker;
00126 vtkBalloonRepresentation* Balloon;
00127 vtkActor *HighlightActor;
00128 vtkActor *SelectionActor;
00129 vtkPoints *HighlightPoints;
00130 vtkPoints *SelectionPoints;
00131 vtkTreeMapLayout* Layout;
00132 vtkTreeMapToPolyData* TreeMapToPolyData;
00133 char *LabelField;
00134 vtkIdType CurrentSelectedId;
00135 };
00136
00137 #endif