HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_undos.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_undos_h__
10 #define __HOM_undos_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 
16 #include <string>
17 #include <vector>
18 #include <stddef.h>
19 
20 class HOM_NetworkEditor;
21 class HOM_UndosDisabler;
22 class HOM_UndosGroup;
23 
24 SWIGOUT(%rename(undos) HOM_undos;)
26 {
27 public:
28  virtual ~HOM_undos()
29  {}
30 
31  virtual std::string __repr__() = 0;
32 
33  virtual bool areEnabled() = 0;
34 
35  SWIGOUT(%newobject disabler;)
36  virtual HOM_UndosDisabler *disabler() = 0;
37 
38  SWIGOUT(%newobject group;)
39  SWIGOUT(%kwargs group;)
40  virtual HOM_UndosGroup *group(const char *label,
41  HOM_NetworkEditor *editor = nullptr) = 0;
42 
43  SWIGOUT(%ignore _addPythonUndo;)
44  virtual void _addPythonUndo(
45  void *undo,
46  const char *label,
47  const char *tag) = 0;
48 
49  virtual void removeUndos(const char *tag) = 0;
50 
51  virtual void clear() = 0;
52 
53  virtual size_t memoryUsage() = 0;
54 
55  virtual size_t memoryUsageLimit() = 0;
56 
57  virtual bool performUndo() = 0;
58 
59  virtual bool performRedo() = 0;
60 
61  virtual std::vector<std::string> undoLabels() = 0;
62 
63  virtual std::vector<std::string> redoLabels() = 0;
64 
65 #ifdef SWIG
66 %extend
67 {
68  void add(
69  InterpreterObject undo,
70  const char *label,
71  const char *tag=nullptr) {
72 
73  self->_addPythonUndo(undo, label, tag);
74 
75  };
76 
77 }
78 #endif
79 };
80 
81 #endif
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
virtual ~HOM_undos()
Definition: HOM_undos.h:28
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)