diff options
Diffstat (limited to 'core/undo_redo.h')
-rw-r--r-- | core/undo_redo.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/undo_redo.h b/core/undo_redo.h index d1b2d3de9e..141a413c2a 100644 --- a/core/undo_redo.h +++ b/core/undo_redo.h @@ -38,9 +38,15 @@ class UndoRedo : public Object { OBJ_TYPE(UndoRedo,Object); + OBJ_SAVE_TYPE( UndoRedo ); public: typedef void (*CommitNotifyCallback)(void *p_ud,const String& p_name); + Variant _add_do_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error); + Variant _add_undo_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error); + + typedef void (*MethodNotifyCallback)(void *p_ud,Object*p_base,const StringName& p_name,VARIANT_ARG_DECLARE); + typedef void (*PropertyNotifyCallback)(void *p_ud,Object*p_base,const StringName& p_property,const Variant& p_value); private: struct Operation { @@ -80,6 +86,15 @@ private: CommitNotifyCallback callback; void* callback_ud; + void* method_callbck_ud; + void* prop_callback_ud; + + MethodNotifyCallback method_callback; + PropertyNotifyCallback property_callback; + + +protected: + static void _bind_methods(); public: @@ -106,6 +121,9 @@ public: void set_commit_notify_callback(CommitNotifyCallback p_callback,void* p_ud); + void set_method_notify_callback(MethodNotifyCallback p_method_callback,void* p_ud); + void set_property_notify_callback(PropertyNotifyCallback p_property_callback,void* p_ud); + UndoRedo(); ~UndoRedo(); }; |