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