vtk3DWidgetRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtk3DWidgetRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtk3DWidgetRepresentation_h
24 #define vtk3DWidgetRepresentation_h
25 
26 #include "vtkDataRepresentation.h"
27 #include "vtkRemotingViewsModule.h" //needed for exports
28 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
29 
30 class vtkAbstractWidget;
31 class vtkPVRenderView;
33 
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  void SetWidget(vtkAbstractWidget*);
46  vtkGetObjectMacro(Widget, vtkAbstractWidget);
48 
50 
53  void SetRepresentation(vtkWidgetRepresentation*);
54  vtkGetObjectMacro(Representation, vtkWidgetRepresentation);
56 
58 
62  vtkSetMacro(UseNonCompositedRenderer, bool);
63  vtkGetMacro(UseNonCompositedRenderer, bool);
64  vtkBooleanMacro(UseNonCompositedRenderer, bool);
66 
68 
71  void SetEnabled(bool);
72  vtkGetMacro(Enabled, bool);
73  vtkBooleanMacro(Enabled, bool);
75 
77 
86  void SetReferenceBounds(const double bds[6]);
87  void PlaceWidget(const double bds[6]);
88  void SetUseReferenceBounds(bool);
90 
91 protected:
93  ~vtk3DWidgetRepresentation() override;
94 
100  bool AddToView(vtkView* view) override;
101 
107  bool RemoveFromView(vtkView* view) override;
108 
112  void UpdateEnabled();
113 
119  void OnRepresentationModified();
120 
126  void OnViewModified();
127 
128  bool Enabled;
133 
134 private:
136  void operator=(const vtk3DWidgetRepresentation&) = delete;
137  unsigned long RepresentationObserverTag;
138  unsigned long ViewObserverTag;
139 
140  double ReferenceBounds[6];
141  bool UseReferenceBounds;
142  double PlaceWidgetBounds[6];
143 
144  void PlaceWidget();
145 };
146 
147 #endif
#define VTKREMOTINGVIEWS_EXPORT
virtual bool AddToView(vtkView *vtkNotUsed(view))
virtual bool RemoveFromView(vtkView *vtkNotUsed(view))
vtk3DWidgetRepresentation is a vtkDataRepresentation subclass for 3D widgets and their representation...
void PrintSelf(ostream &os, vtkIndent indent)
static vtkDataRepresentation * New()
vtkWidgetRepresentation * Representation
Render View for ParaView.
vtkWeakPointer< vtkPVRenderView > View
void operator=(const vtkObjectBase &)