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
* <p>
14
* This interface is used to record changes triggered by an end user in the
15
* screen of a AuboCap program node contribution (e.g. when a button is
16
* clicked). It should be used in a AuboCap program node to support the
17
* Undo/Redo functionality in AuboScope.
18
* </p>
19
*
20
* <p>
21
* NOTE: Do not use this functionality for AuboCap installation nodes, since it
22
* is not supported (and has no effect). <br>
23
*
24
* NOTE: This functionality is not relevant for AuboCap program nodes with a
25
* HTML-based user interface, since automatic undo is supported for these.
26
* </p>
27
*/
28
class
ARCS_ABI_EXPORT
UndoRedoManager
29
{
30
public
:
31
UndoRedoManager
(
UndoRedoManager
&f);
32
UndoRedoManager
(
UndoRedoManager
&&f);
33
virtual
~UndoRedoManager
();
34
35
/**
36
* <p>
37
* Group changes into one Undo/Redo step.
38
* </p>
39
*
40
* Currently Undo/Redo supports changes to the program tree and the data
41
* model.
42
*
43
* @param undoableChanges Code to be recorded as one Undo/Redo step.
44
* Pressing Undo in AuboScope will undo all changes
45
* done to the program tree and the data model inside this block of code.
46
*/
47
void
recordChanges
(
const
std::string &text,
48
std::function<
void
()> undoableChanges);
49
50
private
:
51
friend
class
DataSwitch
;
52
UndoRedoManager
();
53
void
*
d_
{
nullptr
};
54
};
55
}
// namespace aubo_scope
56
}
// namespace arcs
57
58
#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
定义
undo_redo_manager.h:29
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:51
arcs::aubo_scope::UndoRedoManager::UndoRedoManager
UndoRedoManager(UndoRedoManager &&f)
arcs::aubo_scope::UndoRedoManager::d_
void * d_
定义
undo_redo_manager.h:53
arcs::aubo_scope::UndoRedoManager::recordChanges
void recordChanges(const std::string &text, std::function< void()> undoableChanges)
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