vtkSMScalarBarWidgetRepresentationProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMScalarBarWidgetRepresentationProxy.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 =========================================================================*/
22 #ifndef vtkSMScalarBarWidgetRepresentationProxy_h
23 #define vtkSMScalarBarWidgetRepresentationProxy_h
24 
25 #include "vtkRemotingViewsModule.h" //needed for exports
27 #include "vtkSMTrace.h" // needed for vtkSMTrace::TraceItem
28 #include "vtkWeakPointer.h" // For Proxies
29 
30 #include <unordered_map> // For Proxies
31 
33 class vtkSMProxy;
35 class vtkSMViewProxy;
36 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  virtual bool UpdateComponentTitle(vtkPVArrayInformation* dataInfo);
51  static bool UpdateComponentTitle(vtkSMProxy* proxy, vtkPVArrayInformation* dataInfo)
52  {
55  return self ? self->UpdateComponentTitle(dataInfo) : false;
56  }
58 
60 
64  virtual bool PlaceInView(vtkSMProxy* view);
65  static bool PlaceInView(vtkSMProxy* proxy, vtkSMProxy* view)
66  {
69  return self ? self->PlaceInView(view) : false;
70  }
72 
78  void AddRange(vtkSMPVRepresentationProxy* proxy);
79 
85  void RemoveRange(vtkSMPVRepresentationProxy* proxy);
86 
90  void GetRange(double range[2]);
91 
95  void ClearRange();
96 
97 protected:
100 
105  void CreateVTKObjects() override;
106 
110  void ExecuteEvent(unsigned long event) override;
111 
113 
115 
124  std::unordered_map<vtkSMPVRepresentationProxy*, vtkWeakPointer<vtkSMPVRepresentationProxy>>
127 
128 private:
130 
135  void BeginTrackingPropertiesForTrace();
136  void EndTrackingPropertiesForTrace();
138 
143  void ScalarBarWidgetPosition2ToScalarBarLength();
144  void ScalarBarLengthToScalarBarWidgetPosition2();
145 
146  // Used in StartTrackingPropertiesForTrace/EndTrackingPropertiesForTrace.
147  vtkSMTrace::TraceItem* TraceItem;
148 
150  void operator=(const vtkSMScalarBarWidgetRepresentationProxy&) = delete;
151 };
152 
153 #endif
is the representation corresponding to a scalar bar or color legend in a Render View.
#define VTKREMOTINGVIEWS_EXPORT
representation for "Render View" like views in ParaView.
Superclass for all view proxies.
proxy for 3D widgets and their representations in ParaView.
static vtkSMScalarBarWidgetRepresentationProxy * SafeDownCast(vtkObject *o)
void ExecuteEvent(unsigned long event) override
Called every time the user interacts with the widget.
void CreateVTKObjects() override
Overridden from vtkSMProxy to call BeginCreateVTKObjects() and EndCreateVTKObjects().
void PrintSelf(ostream &os, vtkIndent indent) override
static bool UpdateComponentTitle(vtkSMProxy *proxy, vtkPVArrayInformation *dataInfo)
Updates the scalar bar&#39;s component title using the data information to determine component names if p...
static vtkSMNewWidgetRepresentationProxy * New()
range
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
provides meta data about arrays.
static bool PlaceInView(vtkSMProxy *proxy, vtkSMProxy *view)
Attempt to place the scalar bar in the view based on the placement of other currently shown and visib...
std::unordered_map< vtkSMPVRepresentationProxy *, vtkWeakPointer< vtkSMPVRepresentationProxy > > Proxies
Storing a list of proxies linked to this scalar bar.