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 
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  virtual HOM_UndosGroup *group(const char *label) = 0;
40 
41  SWIGOUT(%ignore _addPythonUndo;)
42  virtual void _addPythonUndo(
43  void *undo,
44  const char *label,
45  const char *tag) = 0;
46 
47  virtual void removeUndos(const char *tag) = 0;
48 
49  virtual void clear() = 0;
50 
51  virtual size_t memoryUsage() = 0;
52 
53  virtual size_t memoryUsageLimit() = 0;
54 
55  virtual bool performUndo() = 0;
56 
57  virtual bool performRedo() = 0;
58 
59  virtual std::vector<std::string> undoLabels() = 0;
60 
61  virtual std::vector<std::string> redoLabels() = 0;
62 
63 #ifdef SWIG
64 %extend
65 {
66  void add(
67  InterpreterObject undo,
68  const char *label,
69  const char *tag=nullptr) {
70 
71  self->_addPythonUndo(undo, label, tag);
72 
73  };
74 
75 }
76 #endif
77 };
78 
79 #endif
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#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
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * string
Definition: glew.h:1844
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLboolean GLuint group
Definition: glew.h:2745