ParaView
vtkSMPropertyModificationUndoElement.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPropertyModificationUndoElement.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 =========================================================================*/
25 #ifndef vtkSMPropertyModificationUndoElement_h
26 #define vtkSMPropertyModificationUndoElement_h
27 
28 #include "vtkPVServerManagerDefaultModule.h" //needed for exports
29 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
30 #include "vtkSMUndoElement.h"
31 class vtkSMProxy;
32 
33 class VTKPVSERVERMANAGERDEFAULT_EXPORT vtkSMPropertyModificationUndoElement
34  : public vtkSMUndoElement
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
44  virtual int Undo();
45 
49  virtual int Redo();
50 
54  void ModifiedProperty(vtkSMProxy* proxy, const char* propertyname);
55 
64  virtual bool Merge(vtkUndoElement* vtkNotUsed(new_element));
65 
66 protected:
69 
70  int RevertToState();
71 
72  vtkSetStringMacro(PropertyName);
73 
74  vtkTypeUInt32 ProxyGlobalID;
75  char* PropertyName;
77 
78 private:
80  const vtkSMPropertyModificationUndoElement&) VTK_DELETE_FUNCTION;
81  void operator=(const vtkSMPropertyModificationUndoElement&) VTK_DELETE_FUNCTION;
82 };
83 
84 #endif
unit undo-redo-able operation.
void PrintSelf(ostream &os, vtkIndent indent)
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:152
abstract superclass for Server Manager undo elements.