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 
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
#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:140
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()