vtkSMStringListDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMStringListDomain.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 =========================================================================*/
35 #ifndef vtkSMStringListDomain_h
36 #define vtkSMStringListDomain_h
37 
38 #include "vtkRemotingServerManagerModule.h" //needed for exports
39 #include "vtkSMDomain.h"
40 #include <vector> // needed for vector.
41 
42 struct vtkSMStringListDomainInternals;
43 
45 {
46 public:
47  static vtkSMStringListDomain* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
57  int IsInDomain(vtkSMProperty* property) override;
58 
62  int IsInDomain(const char* string, unsigned int& idx);
63 
68  const char* GetString(unsigned int idx);
69 
73  unsigned int GetNumberOfStrings();
74 
79  void Update(vtkSMProperty*) override;
80 
84  void SetAnimationValue(vtkSMProperty*, int, double) override;
85 
87 
90  vtkGetStringMacro(NoneString);
91  vtkSetStringMacro(NoneString);
93 
95 
105  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
106 
107 protected:
109  ~vtkSMStringListDomain() override;
111 
116  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
117 
118  void ChildSaveState(vtkPVXMLElement* domainElement) override;
119 
124  char* NoneString;
125 
127 
131  virtual void SetStrings(const std::vector<std::string>& strings);
132  const std::vector<std::string>& GetStrings();
134 
135 private:
137  void operator=(const vtkSMStringListDomain&) = delete;
138 
139  vtkSMStringListDomainInternals* SLInternals;
140 };
141 
142 #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:88
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:103
represents the possible values a property can have
Definition: vtkSMDomain.h:49
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:76
static vtkSMDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.