vtkPropertyDecorator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef vtkPropertyDecorator_h
5 #define vtkPropertyDecorator_h
6 
8 
9 #include "vtkCommand.h"
10 #include "vtkObject.h"
11 #include "vtkSMProxy.h"
12 
13 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
14 #include "vtkWeakPointer.h"
15 
16 #include <string>
17 
18 class vtkPVXMLElement;
19 class vtkSMProxy;
20 
30 {
31 
32 public:
33  static vtkPropertyDecorator* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
46  void virtual Initialize(vtkPVXMLElement* xml, vtkSMProxy* proxy);
47 
56  virtual bool CanShow(bool show_advanced) const
57  {
58  (void)show_advanced;
59  return true;
60  }
61 
70  virtual bool Enable() const { return true; }
71 
77  enum
78  {
79  VisibilityChangedEvent = vtkCommand::UserEvent + 1000,
80  EnableStateChangedEvent = vtkCommand::UserEvent + 1001
81  };
82 
98 
99 protected:
101  ~vtkPropertyDecorator() override;
102  vtkPVXMLElement* XML() const;
103  vtkSMProxy* Proxy() const;
104 
105  void InvokeVisibilityChangedEvent();
106  void InvokeEnableStateChangedEvent();
107 
108 private:
110  void operator=(const vtkPropertyDecorator&) = delete;
111 
114 };
115 
116 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTKREMOTINGAPPLICATIONCOMPONENTS_EXPORT
vtkPropertyDecorator hold the logic of pqPropertyDecorator TODO provides a mechanism to decorate pqPr...
virtual bool CanShow(bool show_advanced) const
Override this method to override the visibility of the widget in the panel.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
virtual bool Enable() const
Override this method to override the enable state of the widget in the panel.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
void operator=(const vtkObjectBase &)