Real Time Open Sound Control librtosc: /build/rtosc/src/rtosc-0.3.1/include/rtosc/undo-history.h Source File

Real Time Open Sound Control librtosc

undo-history.h
1#ifndef RTOSC_UNDO_H
2#define RTOSC_UNDO_H
3#include <functional>
4
5namespace rtosc
6{
11 class UndoHistory
12{
13 //TODO think about the consequences of largish loads
14 public:
15 UndoHistory(void);
16 ~UndoHistory(void);
17
18 //Records any undoable event
19 void recordEvent(const char *msg);
20
21 //Prints out a history
22 void showHistory(void) const;
23
24 //Seek to another point in history relative to the current one
25 //Negative values mean undo, positive values mean redo
26 void seekHistory(int distance);
27
28 unsigned getPos(void) const;
29 const char *getHistory(int i) const;
30 size_t size(void) const;
31
32 void setCallback(std::function<void(const char*)> cb);
33 private:
34 class UndoHistoryImpl *impl;
35};
36};
37#endif
rtosc::UndoHistory
Known event types: /undo_change /path/location old-data new-data.
Definition: undo-history.h:12