r602: Fix baver's code... don't insert timecode when show_tc is not set
[cinelerra_cv/mob.git] / cinelerra / mainundo.h
blobd3699c7083f67c4bbc8cd067f22e60bd02051827
1 #ifndef MAINUNDO_H
2 #define MAINUNDO_H
5 #include "mwindow.inc"
6 #include "undostack.h"
8 #include <stdint.h>
11 class MainUndoStackItem;
14 class MainUndo
16 public:
17 MainUndo(MWindow *mwindow);
18 ~MainUndo();
20 // Use this function for UndoStackItem subclasses with custom
21 // undo and redo functions. All fields including description must
22 // be populated before calling this function.
23 void push_undo_item(UndoStackItem *item);
25 // Use the following functions for the default save/restore undo method
26 void update_undo_before(char *description, uint32_t load_flags);
27 void update_undo_after();
29 int undo();
30 int redo();
32 private:
33 UndoStack undo_stack;
34 MainUndoStackItem* new_entry; // for setting the after buffer
35 MWindow *mwindow;
36 int undo_before_updated;
39 #endif