ParaView
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 "vtkPVClientServerCoreRenderingModule.h" //needed for exports
28 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
29 
30 class vtkAbstractWidget;
31 class vtkPVRenderView;
32 class vtkWidgetRepresentation;
33 
34 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtk3DWidgetRepresentation : public vtkDataRepresentation
35 {
36 public:
37  static vtk3DWidgetRepresentation* New();
38  vtkTypeMacro(vtk3DWidgetRepresentation, vtkDataRepresentation);
39  void PrintSelf(ostream& os, vtkIndent indent);
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 
76 protected:
79 
85  virtual bool AddToView(vtkView* view);
86 
92  virtual bool RemoveFromView(vtkView* view);
93 
97  void UpdateEnabled();
98 
104  void OnRepresentationModified();
105 
111  void OnViewModified();
112 
113  bool Enabled;
115  vtkAbstractWidget* Widget;
116  vtkWidgetRepresentation* Representation;
117  vtkWeakPointer<vtkPVRenderView> View;
118 
119 private:
120  vtk3DWidgetRepresentation(const vtk3DWidgetRepresentation&) VTK_DELETE_FUNCTION;
121  void operator=(const vtk3DWidgetRepresentation&) VTK_DELETE_FUNCTION;
122  unsigned long RepresentationObserverTag;
123  unsigned long ViewObserverTag;
124 };
125 
126 #endif
vtk3DWidgetRepresentation is a vtkDataRepresentation subclass for 3D widgets and their representation...
vtkWidgetRepresentation * Representation
Render View for ParaView.
vtkWeakPointer< vtkPVRenderView > View