AuboStudio SDK
0.6.3
undo_redo_manager.h
浏览该文件的文档.
1
#ifndef AUBO_SCOPE_UNDO_REDO_MANAGER_H
2
#define AUBO_SCOPE_UNDO_REDO_MANAGER_H
3
4
#include <functional>
5
#include <
aubo_caps/class_forward.h
>
6
7
namespace
arcs
{
8
namespace
aubo_scope
{
9
ARCS_CLASS_FORWARD
(
UndoRedoManager
);
10
11
/**
12
* @ingroup ProgramApi
13
* \chinese
14
* 撤销/重做管理器
15
* 此接口用于记录终端用户在 AuboCap 程序节点贡献画面中触发的更改(例如,点击按钮时)。
16
* 应在 AuboCap 程序节点中使用,以支持 AuboScope 中的撤销/重做功能。
17
*
18
* 注意:请勿对 AuboCap 安装节点使用此功能,因为它不受支持(且无效)。<br>
19
* 注意:此功能不适用于具有基于 HTML 的用户界面的 AuboCap 程序节点,因为这些节点
20
* 已支持自动撤销。
21
* \endchinese
22
* \english
23
* UndoRedoManager
24
* This interface is used to record changes triggered by an end user in the
25
* screen of a AuboCap program node contribution (e.g. when a button is
26
* clicked). It should be used in a AuboCap program node to support the
27
* Undo/Redo functionality in AuboScope.
28
*
29
* NOTE: Do not use this functionality for AuboCap installation nodes, since it
30
* is not supported (and has no effect). <br>
31
* NOTE: This functionality is not relevant for AuboCap program nodes with a
32
* HTML-based user interface, since automatic undo is supported for these.
33
* \endenglish
34
*/
35
class
ARCS_ABI_EXPORT
UndoRedoManager
36
{
37
public
:
38
UndoRedoManager
(
UndoRedoManager
&f);
39
UndoRedoManager
(
UndoRedoManager
&&f);
40
virtual
~UndoRedoManager
();
41
42
/**
43
* \chinese
44
* <p>
45
* 将一组变更归并为一个撤销/重做步骤。
46
* </p>
47
* 目前撤销/重做支持程序树和数据模型的更改。
48
*
49
* @param undoableChanges 被记录为一个撤销/重做步骤的代码块。在AuboScope中
50
* 按下"撤销"将撤销此代码块内对程序树和数据模型所做的所有更改。
51
* \endchinese
52
* \english
53
* <p>
54
* Group changes into one Undo/Redo step.
55
* </p>
56
*
57
* Currently Undo/Redo supports changes to the program tree and the data
58
* model.
59
*
60
* @param undoableChanges Code to be recorded as one Undo/Redo step.
61
* Pressing Undo in AuboScope will undo all changes
62
* done to the program tree and the data model inside this block of code.
63
* \endenglish
64
*/
65
void
recordChanges
(
const
std::string &text,
66
std::function<
void
()> undoableChanges);
67
68
private
:
69
friend
class
DataSwitch
;
70
UndoRedoManager
();
71
void
*
d_
{
nullptr
};
72
};
73
}
// namespace aubo_scope
74
}
// namespace arcs
75
76
#endif
class_forward.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
定义
class_forward.h:16
ARCS_CLASS_FORWARD
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
定义
class_forward.h:68
arcs::aubo_scope::UndoRedoManager
\chinese 撤销/重做管理器 此接口用于记录终端用户在 AuboCap 程序节点贡献画面中触发的更改(例如,点击按钮时)。 应在 AuboCap 程序节点中使用,以支持 AuboScope 中的撤...
定义
undo_redo_manager.h:36
arcs::aubo_scope::UndoRedoManager::UndoRedoManager
UndoRedoManager(UndoRedoManager &f)
arcs::aubo_scope::UndoRedoManager::~UndoRedoManager
virtual ~UndoRedoManager()
arcs::aubo_scope::UndoRedoManager::DataSwitch
friend class DataSwitch
定义
undo_redo_manager.h:69
arcs::aubo_scope::UndoRedoManager::UndoRedoManager
UndoRedoManager(UndoRedoManager &&f)
arcs::aubo_scope::UndoRedoManager::d_
void * d_
定义
undo_redo_manager.h:71
arcs::aubo_scope::UndoRedoManager::recordChanges
void recordChanges(const std::string &text, std::function< void()> undoableChanges)
\chinese
arcs::aubo_scope::UndoRedoManager::UndoRedoManager
UndoRedoManager()
arcs::aubo_scope
定义
contribution_provider.h:8
arcs
定义
contribution_provider.h:7
include
aubo_caps
domain
undoredo
undo_redo_manager.h
制作者
1.16.1