VTK
dox/Views/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 "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&); // Not implemented
00119   void operator=(const vtkInteractorStyleTreeMapHover&); // Not implemented
00120 
00121   // These methods are used internally
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