vtkSMPropertyModificationUndoElement.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkSMPropertyModificationUndoElement_h
14 #define vtkSMPropertyModificationUndoElement_h
15 
16 #include "vtkRemotingServerManagerModule.h" // needed for exports
17 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
18 #include "vtkSMUndoElement.h"
19 class vtkSMProxy;
20 
22 {
23 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
31  int Undo() override;
32 
36  int Redo() override;
37 
41  void ModifiedProperty(vtkSMProxy* proxy, const char* propertyname);
42 
51  bool Merge(vtkUndoElement* vtkNotUsed(new_element)) override;
52 
53 protected:
56 
57  int RevertToState();
58 
59  vtkSetStringMacro(PropertyName);
60 
61  vtkTypeUInt32 ProxyGlobalID;
62  char* PropertyName;
64 
65 private:
67  void operator=(const vtkSMPropertyModificationUndoElement&) = delete;
68 };
69 
70 #endif
unit undo-redo-able operation.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
virtual int Undo()=0
Undo the operation encapsulated by this element.
virtual bool Merge(vtkUndoElement *vtkNotUsed(new_element))
Called on the older element in the UndoSet to merge with the element being added if both the elements...
virtual int Redo()=0
Redo the operation encaspsulated by this element.
This is the concrete implementation for the Undo element for a property modification event...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
static vtkObject * New()
abstract superclass for Server Manager undo elements.