VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Views/Infovis/vtkInteractorStyleTreeMapHover.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInteractorStyleTreeMapHover.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00039 #ifndef vtkInteractorStyleTreeMapHover_h
00040 #define vtkInteractorStyleTreeMapHover_h
00041 
00042 #include "vtkViewsInfovisModule.h" // For export macro
00043 #include "vtkInteractorStyleImage.h"
00044 
00045 class vtkBalloonRepresentation;
00046 class vtkPoints;
00047 class vtkRenderer;
00048 class vtkTree;
00049 class vtkTreeMapLayout;
00050 class vtkTreeMapToPolyData;
00051 class vtkWorldPointPicker;
00052 
00053 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
00054 {
00055 public:
00056   static vtkInteractorStyleTreeMapHover* New();
00057   vtkTypeMacro(vtkInteractorStyleTreeMapHover,vtkInteractorStyleImage);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00063   void SetLayout(vtkTreeMapLayout* layout);
00064   vtkGetObjectMacro(Layout, vtkTreeMapLayout);
00066 
00068 
00070   void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
00071   vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
00073 
00075 
00077   vtkSetStringMacro(LabelField);
00078   vtkGetStringMacro(LabelField);
00080 
00082 
00084   void OnMouseMove();
00085   void OnLeftButtonUp();
00087 
00089 
00090   void HighLightItem(vtkIdType id);
00091   void HighLightCurrentSelectedItem();
00093 
00094   virtual void SetInteractor(vtkRenderWindowInteractor *rwi);
00095 
00097   void SetHighLightColor(double r, double g, double b);
00098 
00100   void SetSelectionLightColor(double r, double g, double b);
00101 
00103 
00104   void SetHighLightWidth(double lw);
00105   double GetHighLightWidth();
00107 
00109 
00110   void SetSelectionWidth(double lw);
00111   double GetSelectionWidth();
00113 
00114 protected:
00115   vtkInteractorStyleTreeMapHover();
00116   ~vtkInteractorStyleTreeMapHover();
00117 
00118 private:
00119   vtkInteractorStyleTreeMapHover(const vtkInteractorStyleTreeMapHover&); // Not implemented
00120   void operator=(const vtkInteractorStyleTreeMapHover&); // Not implemented
00121 
00122   // These methods are used internally
00123   vtkIdType GetTreeMapIdAtPos(int x, int y);
00124   void GetBoundingBoxForTreeMapItem(vtkIdType id, float *binfo);
00125 
00126   vtkWorldPointPicker* Picker;
00127   vtkBalloonRepresentation* Balloon;
00128   vtkActor *HighlightActor;
00129   vtkActor *SelectionActor;
00130   vtkPoints *HighlightPoints;
00131   vtkPoints *SelectionPoints;
00132   vtkTreeMapLayout* Layout;
00133   vtkTreeMapToPolyData* TreeMapToPolyData;
00134   char *LabelField;
00135   vtkIdType CurrentSelectedId;
00136 };
00137 
00138 #endif