vtkSMPropertyGroup.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPropertyGroup.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 =========================================================================*/
15 
16 #ifndef vtkSMPropertyGroup_h
17 #define vtkSMPropertyGroup_h
18 
19 #include "vtkRemotingServerManagerModule.h" //needed for exports
20 #include "vtkSMObject.h"
21 
22 class vtkPVXMLElement;
23 class vtkSMDocumentation;
24 class vtkSMProperty;
25 class vtkSMPropertyGroupInternals;
26 class vtkSMProxy;
27 
29 {
30 public:
31  static vtkSMPropertyGroup* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
35  // Description:
36  // Sets the name of the property group to \p name.
37  vtkSetStringMacro(Name)
38 
39  // Description:
40  // Returns the name of the property group.
41  vtkGetStringMacro(Name)
42 
43  // Description:
44  // Sets the name of the property group to \p name.
45  vtkSetStringMacro(XMLLabel)
46 
47  // Description:
48  // Returns the name of the property group.
49  vtkGetStringMacro(XMLLabel)
50 
51  // Description:
52  // Sets the name of the panel widget to use for the property group.
53  vtkSetStringMacro(PanelWidget)
54 
55  // Description:
56  // Gets the name of the panel widget to use for the property group.
57  vtkGetStringMacro(PanelWidget)
58 
59  // Description:
60  // Sets the panel visibility for the property group.
61  //
62  // \see vtkSMProperty::SetPanelVisibility()
63  vtkSetStringMacro(PanelVisibility)
64 
65  // Description:
66  // Returns the panel visibility for the property group.
67  vtkGetStringMacro(PanelVisibility)
68 
69  // Description:
70  // Returns true if the property group contains zero properties.
71  bool IsEmpty() const;
72 
73  // Description:
74  // Adds \p property to the group. function can be NULL.
75  void AddProperty(const char* function, vtkSMProperty* property);
76 
77  // Description:
78  // Returns the property at \p index.
79  vtkSMProperty* GetProperty(unsigned int index) const;
80 
81  // Description:
82  // Returns the property associated with a given function, if any.
83  vtkSMProperty* GetProperty(const char* function) const;
84 
85  // Description:
86  // Given property in the group, returns its function. Will return NULL if the
87  // property is not present in this group.
88  const char* GetFunction(vtkSMProperty* property) const;
89 
90  // Description:
91  // Returns the number of properties in the group.
92  unsigned int GetNumberOfProperties() const;
93 
94  // Description:
95  // Returns the documentation for this proxy.
96  vtkGetObjectMacro(Documentation, vtkSMDocumentation);
97 
98  // Description:
99  // The server manager configuration XML may define <Hints /> element for
100  // a property. Hints are metadata associated with the property. The
101  // Server Manager does not (and should not) interpret the hints. Hints
102  // provide a mechanism to add GUI pertinant information to the server
103  // manager XML. Returns the XML element for the hints associated with
104  // this property, if any, otherwise returns NULL.
105  vtkGetObjectMacro(Hints, vtkPVXMLElement);
106 
107 protected:
109  ~vtkSMPropertyGroup() override;
110 
111  friend class vtkSMProxy;
112  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
113 
114  void SetHints(vtkPVXMLElement* hints);
116 
118 
119 private:
120  vtkSMPropertyGroup(const vtkSMPropertyGroup&) = delete;
121  void operator=(const vtkSMPropertyGroup&) = delete;
122 
123  char* Name;
124  char* XMLLabel;
125  char* PanelWidget;
126  char* PanelVisibility;
127 
128  vtkSMPropertyGroupInternals* const Internals;
129 };
130 
131 #endif
vtkPVXMLElement * Hints
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element)
Read attributes from an XML element.
superclass for all SM properties
vtkSMDocumentation * Documentation
superclass for most server manager classes
Definition: vtkSMObject.h:29
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
class providing access to the documentation for a vtkSMProxy.
void operator=(const vtkSMProxy &)=delete
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:1006
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void SetHints(vtkPVXMLElement *hints)
char * XMLLabel
Definition: vtkSMProxy.h:963
void PrintSelf(ostream &os, vtkIndent indent) override