VTK  9.3.1
vtkInteractorStyleTreeMapHover.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
24 #ifndef vtkInteractorStyleTreeMapHover_h
25 #define vtkInteractorStyleTreeMapHover_h
26 
28 #include "vtkViewsInfovisModule.h" // For export macro
29 
30 VTK_ABI_NAMESPACE_BEGIN
32 class vtkPoints;
33 class vtkRenderer;
34 class vtkTree;
35 class vtkTreeMapLayout;
38 
39 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
51  void SetLayout(vtkTreeMapLayout* layout);
52  vtkGetObjectMacro(Layout, vtkTreeMapLayout);
54 
56 
60  void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
61  vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
63 
65 
68  vtkSetStringMacro(LabelField);
69  vtkGetStringMacro(LabelField);
71 
73 
77  void OnMouseMove() override;
78  void OnLeftButtonUp() override;
80 
82 
85  void HighLightItem(vtkIdType id);
86  void HighLightCurrentSelectedItem();
88 
89  void SetInteractor(vtkRenderWindowInteractor* rwi) override;
90 
94  void SetHighLightColor(double r, double g, double b);
95 
99  void SetSelectionLightColor(double r, double g, double b);
100 
102 
105  void SetHighLightWidth(double lw);
106  double GetHighLightWidth();
108 
110 
113  void SetSelectionWidth(double lw);
114  double GetSelectionWidth();
116 
117 protected:
119  ~vtkInteractorStyleTreeMapHover() override;
120 
121 private:
123  void operator=(const vtkInteractorStyleTreeMapHover&) = delete;
124 
125  // These methods are used internally
126  vtkIdType GetTreeMapIdAtPos(int x, int y);
127  void GetBoundingBoxForTreeMapItem(vtkIdType id, float* binfo);
128 
129  vtkWorldPointPicker* Picker;
130  vtkBalloonRepresentation* Balloon;
131  vtkActor* HighlightActor;
132  vtkActor* SelectionActor;
133  vtkPoints* HighlightPoints;
134  vtkPoints* SelectionPoints;
135  vtkTreeMapLayout* Layout;
136  vtkTreeMapToPolyData* TreeMapToPolyData;
137  char* LabelField;
138  vtkIdType CurrentSelectedId;
139 };
140 
141 VTK_ABI_NAMESPACE_END
142 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
void SetInteractor(vtkRenderWindowInteractor *interactor) override
Set/Get the Interactor wrapper being controlled by this object.
abstract specification for renderers
Definition: vtkRenderer.h:61
layout a vtkTree into a tree map
int vtkIdType
Definition: vtkType.h:315
static vtkInteractorStyleImage * New()
interactive manipulation of the camera specialized for images
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:28
represent the vtkBalloonWidget
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
converts a tree to a polygonal data representing a tree map
A rooted tree data structure.
Definition: vtkTree.h:45
find world x,y,z corresponding to display x,y,z
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
An interactor style for a tree map view.
represent and manipulate 3D points
Definition: vtkPoints.h:28