vtkSMSelectionLink.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMSelectionLink.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 vtkSMSelectionLink_h
24 #define vtkSMSelectionLink_h
25 
26 #include "vtkRemotingViewsModule.h" //needed for exports
27 #include "vtkSMLink.h"
28 
29 class vtkSMSourceProxy;
30 class vtkSMSelectionLinkInternals;
31 class vtkSMSelectionLinkObserver;
32 
34 {
35 public:
36  static vtkSMSelectionLink* New();
37  vtkTypeMacro(vtkSMSelectionLink, vtkSMLink);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
50  void AddLinkedSelection(vtkSMProxy* proxy, int updateDir);
51  void RemoveLinkedSelection(vtkSMProxy* proxy);
53 
57  unsigned int GetNumberOfLinkedObjects() override;
58 
62  vtkSMProxy* GetLinkedProxy(int index) override;
63 
68  int GetLinkedObjectDirection(int index) override;
69 
73  void RemoveAllLinks() override;
74 
78  void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator) override;
79 
85  vtkSetMacro(ConvertToIndices, bool);
86  vtkGetMacro(ConvertToIndices, bool);
87 
88 protected:
90  ~vtkSMSelectionLink() override;
91 
92  friend class vtkSMSelectionLinkInternals;
93  friend class vtkSMSelectionLinkObserver;
94 
98  int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator) override;
99 
103  void SaveXMLState(const char* linkname, vtkPVXMLElement* parent) override;
104 
108  void UpdateVTKObjects(vtkSMProxy* vtkNotUsed(caller)) override{};
109 
113  void PropertyModified(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)) override{};
114 
118  void UpdateProperty(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)) override{};
119 
123  virtual void SelectionModified(vtkSMSourceProxy* caller, unsigned int portIndex);
124 
128  void UpdateState() override;
129 
130 private:
131  vtkSMSelectionLinkInternals* Internals;
132 
133  // lock flag to prevent multiple selection modification at the same time
134  bool ModifyingSelection;
135  bool ConvertToIndices;
136 
137  vtkSMSelectionLink(const vtkSMSelectionLink&) = delete;
138  void operator=(const vtkSMSelectionLink&) = delete;
139 };
140 #endif
#define VTKREMOTINGVIEWS_EXPORT
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
proxy for a VTK source on a server
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
is used to locate proxies referred to in state xmls while loading state files.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkSMSessionObject * New()