vtkSMSelectionLink.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkSMSelectionLink_h
12 #define vtkSMSelectionLink_h
13 
14 #include "vtkRemotingViewsModule.h" //needed for exports
15 #include "vtkSMLink.h"
16 
17 class vtkSMSourceProxy;
18 class vtkSMSelectionLinkInternals;
19 class vtkSMSelectionLinkObserver;
20 
21 class VTKREMOTINGVIEWS_EXPORT vtkSMSelectionLink : public vtkSMLink
22 {
23 public:
24  static vtkSMSelectionLink* New();
25  vtkTypeMacro(vtkSMSelectionLink, vtkSMLink);
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
38  void AddLinkedSelection(vtkSMProxy* proxy, int updateDir);
39  void RemoveLinkedSelection(vtkSMProxy* proxy);
41 
45  unsigned int GetNumberOfLinkedObjects() override;
46 
50  vtkSMProxy* GetLinkedProxy(int index) override;
51 
56  int GetLinkedObjectDirection(int index) override;
57 
61  void RemoveAllLinks() override;
62 
66  void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator) override;
67 
73  vtkSetMacro(ConvertToIndices, bool);
74  vtkGetMacro(ConvertToIndices, bool);
75 
76 protected:
78  ~vtkSMSelectionLink() override;
79 
80  friend class vtkSMSelectionLinkInternals;
81  friend class vtkSMSelectionLinkObserver;
82 
86  int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator) override;
87 
91  void SaveXMLState(const char* linkname, vtkPVXMLElement* parent) override;
92 
96  void UpdateVTKObjects(vtkSMProxy* vtkNotUsed(caller)) override{};
97 
101  void PropertyModified(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)) override{};
102 
106  void UpdateProperty(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)) override{};
107 
111  virtual void SelectionModified(vtkSMSourceProxy* caller, unsigned int portIndex);
112 
116  void UpdateState() override;
117 
118 private:
119  vtkSMSelectionLinkInternals* Internals;
120 
121  bool ConvertToIndices;
122 
123  vtkSMSelectionLink(const vtkSMSelectionLink&) = delete;
124  void operator=(const vtkSMSelectionLink&) = delete;
125 };
126 #endif
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkSMSourceProxy
proxy for a VTK source on a server
Definition: vtkSMSourceProxy.h:37
vtkIndent
vtkSMMessage
vtkSMSessionObject::New
static vtkSMSessionObject * New()
vtkPVXMLElement
Definition: vtkPVXMLElement.h:23
vtkSMProxyLocator
is used to locate proxies referred to in state xmls while loading state files.
Definition: vtkSMProxyLocator.h:24