4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5 * Copyright (C) 2003-2016 Cinelerra CV contributors
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef UNDOSTACKITEM_H
24 #define UNDOSTACKITEM_H
29 class UndoStackItem : public ListItem<UndoStackItem>
33 virtual ~UndoStackItem();
35 void set_description(const char *description);
36 void set_creator(void *creator);
38 // This function must be overridden in derived objects.
39 // It is called both to undo and to redo an operation.
40 // The override must do the following:
41 // - change the EDL to undo an operation;
42 // - change the internal information of the item so that the next invocation
43 // of undo() does a redo (i.e. undoes the undone operation).
46 // Return the amount of memory used for the data associated with this
47 // object in order to enable limiting the amount of memory used by the
49 // Ignore overhead and just report the specific data values that the
50 // derived object adds.
51 virtual int get_size();
54 // command description for the menu item
56 // who created this item