Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / undostackitem.h
blob20682a94d0a0cd8ff6e8ce71e6713ad5a3117679
1 #ifndef UNDOSTACKITEM_H
2 #define UNDOSTACKITEM_H
4 #include "linklist.h"
7 class UndoStackItem : public ListItem<UndoStackItem>
9 public:
10 UndoStackItem();
11 virtual ~UndoStackItem();
13 void set_description(char *description);
14 void set_creator(void *creator);
16 // This function must be overridden in derived objects.
17 // It is called both to undo and to redo an operation.
18 // The override must do the following:
19 // - change the EDL to undo an operation;
20 // - change the internal information of the item so that the next invocation
21 // of undo() does a redo (i.e. undoes the undone operation).
22 virtual void undo();
24 // Return the amount of memory used for the data associated with this
25 // object in order to enable limiting the amount of memory used by the
26 // undo stack.
27 // Ignore overhead and just report the specific data values that the
28 // derived object adds.
29 virtual int get_size();
32 // command description for the menu item
33 char *description;
34 // who created this item
35 void* creator;
38 #endif
40 // Local Variables:
41 // mode: C++
42 // c-file-style: "linux"
43 // End: