vtkSMStringListDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkSMStringListDomain_h
24 #define vtkSMStringListDomain_h
25 
26 #include "vtkRemotingServerManagerModule.h" //needed for exports
27 #include "vtkSMDomain.h"
28 #include <vector> // needed for vector.
29 
30 struct vtkSMStringListDomainInternals;
31 
33 {
34 public:
35  static vtkSMStringListDomain* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
45  int IsInDomain(vtkSMProperty* property) override;
46 
50  int IsInDomain(const char* string, unsigned int& idx);
51 
56  const char* GetString(unsigned int idx);
57 
61  unsigned int GetNumberOfStrings();
62 
67  void Update(vtkSMProperty*) override;
68 
72  void SetAnimationValue(vtkSMProperty*, int, double) override;
73 
75 
78  vtkGetStringMacro(NoneString);
79  vtkSetStringMacro(NoneString);
81 
83 
93  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
94 
95 protected:
97  ~vtkSMStringListDomain() override;
99 
104  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
105 
106  void ChildSaveState(vtkPVXMLElement* domainElement) override;
107 
112  char* NoneString;
113 
115 
119  virtual void SetStrings(const std::vector<std::string>& strings);
120  const std::vector<std::string>& GetStrings();
122 
123 private:
125  void operator=(const vtkSMStringListDomain&) = delete;
126 
127  vtkSMStringListDomainInternals* SLInternals;
128 };
129 
130 #endif
virtual void ChildSaveState(vtkPVXMLElement *domainElement)
Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attribut...
char * NoneString
Default string always present in this string list.
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual void SetAnimationValue(vtkSMProperty *, int vtkNotUsed(index), double vtkNotUsed(value))
Set the value of an element of a property from the animation editor.
Definition: vtkSMDomain.h:76
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
superclass for all SM properties
virtual int SetDefaultValues(vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
A vtkSMProperty is often defined with a default value in the XML itself.
Definition: vtkSMDomain.h:91
represents the possible values a property can have
Definition: vtkSMDomain.h:37
void PrintSelf(ostream &os, vtkIndent indent) override
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
virtual int IsInDomain(vtkSMProperty *vtkNotUsed(property))
Is the (unchecked) value of the property in the domain? Overwritten by sub-classes.
Definition: vtkSMDomain.h:64
static vtkSMDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.