vtk3DWidgetRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtk3DWidgetRepresentation_h
12 #define vtk3DWidgetRepresentation_h
13 
14 #include "vtkDataRepresentation.h"
15 #include "vtkRemotingViewsModule.h" //needed for exports
16 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
17 
18 class vtkAbstractWidget;
19 class vtkPVRenderView;
21 
23 {
24 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
30 
33  void SetWidget(vtkAbstractWidget*);
34  vtkGetObjectMacro(Widget, vtkAbstractWidget);
36 
38 
41  void SetRepresentation(vtkWidgetRepresentation*);
42  vtkGetObjectMacro(Representation, vtkWidgetRepresentation);
44 
46 
50  vtkSetMacro(UseNonCompositedRenderer, bool);
51  vtkGetMacro(UseNonCompositedRenderer, bool);
52  vtkBooleanMacro(UseNonCompositedRenderer, bool);
54 
56 
59  void SetEnabled(bool);
60  vtkGetMacro(Enabled, bool);
61  vtkBooleanMacro(Enabled, bool);
63 
65 
74  void SetReferenceBounds(const double bds[6]);
75  void PlaceWidget(const double bds[6]);
76  void SetUseReferenceBounds(bool);
78 
79 protected:
81  ~vtk3DWidgetRepresentation() override;
82 
88  bool AddToView(vtkView* view) override;
89 
95  bool RemoveFromView(vtkView* view) override;
96 
100  void UpdateEnabled();
101 
107  void OnRepresentationModified();
108 
114  void OnViewModified();
115 
116  bool Enabled;
121 
122 private:
124  void operator=(const vtk3DWidgetRepresentation&) = delete;
125  unsigned long RepresentationObserverTag;
126  unsigned long ViewObserverTag;
127 
128  double ReferenceBounds[6];
129  bool UseReferenceBounds;
130  double PlaceWidgetBounds[6];
131 
132  void PlaceWidget();
133 };
134 
135 #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 &)