00001 #ifndef UNDOSTACKITEM_H 00002 #define UNDOSTACKITEM_H 00003 00004 #include "linklist.h" 00005 00006 00007 class UndoStackItem : public ListItem<UndoStackItem> 00008 { 00009 public: 00010 UndoStackItem(); 00011 virtual ~UndoStackItem(); 00012 00013 void set_description(char *description); 00014 void set_creator(void *creator); 00015 00016 // This function must be overridden in derived objects. 00017 // It is called both to undo and to redo an operation. 00018 // The override must do the following: 00019 // - change the EDL to undo an operation; 00020 // - change the internal information of the item so that the next invocation 00021 // of undo() does a redo (i.e. undoes the undone operation). 00022 virtual void undo(); 00023 00024 // Return the amount of memory used for the data associated with this 00025 // object in order to enable limiting the amount of memory used by the 00026 // undo stack. 00027 // Ignore overhead and just report the specific data values that the 00028 // derived object adds. 00029 virtual int get_size(); 00030 00031 00032 // command description for the menu item 00033 char *description; 00034 // who created this item 00035 void* creator; 00036 }; 00037 00038 #endif
1.4.4