r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / undostackitem.h
blobb34b7d199366687f5a4b5c4e9ca428b95423a62a
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