Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / undostackitem.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * Copyright (C) 2003-2016 Cinelerra CV contributors
6  *
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.
11  *
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.
16  *
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
20  *
21  */
22
23 #ifndef UNDOSTACKITEM_H
24 #define UNDOSTACKITEM_H
25
26 #include "linklist.h"
27
28
29 class UndoStackItem : public ListItem<UndoStackItem>
30 {
31 public:
32         UndoStackItem();
33         virtual ~UndoStackItem();
34
35         void set_description(const char *description);
36         void set_creator(void *creator);
37
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).
44         virtual void undo();
45
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
48 // undo stack.
49 // Ignore overhead and just report the specific data values that the
50 // derived object adds.
51         virtual int get_size();
52
53
54 // command description for the menu item
55         char *description;
56 // who created this item
57         void* creator;
58 };
59
60 #endif