X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fmainundo.h;fp=cinelerra-5.0%2Fcinelerra%2Fmainundo.h;h=0000000000000000000000000000000000000000;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=896db1b01f8a5d84d9742dcc646dfb4bda269b9d;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/mainundo.h b/cinelerra-5.0/cinelerra/mainundo.h deleted file mode 100644 index 896db1b0..00000000 --- a/cinelerra-5.0/cinelerra/mainundo.h +++ /dev/null @@ -1,85 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef MAINUNDO_H -#define MAINUNDO_H - -#include -#include - -#include "bctimer.inc" -#include "filexml.inc" -#include "mwindow.inc" -#include "undostack.inc" - - -class MainUndo -{ -public: - MainUndo(MWindow *mwindow); - ~MainUndo(); - - - - -// For tweeking operations: -// If a pair of update_undo_before and update_undo_after are called -// within a certain time limit and the creator is nonzero and equal, -// the before undo is discarded and the previous after undo is replaced. - void update_undo_before(const char *description = "", - void *creator = 0); - void update_undo_after(const char *description, - uint32_t load_flags, - int changes_made = 1); - -// Used in undo and redo to reset the creators in all the records. - void reset_creators(); - - int undo(); - int redo(); - - void dump(FILE *fp=stdout); -private: -// Entry point for all update commands - void update_undo_entry(const char *description, - uint32_t load_flags, - void *creator, - int changes_made); - int load_from_undo(FileXML *file, uint32_t load_flags); - -// Placing the before & after undo operations in the same stack makes the -// compression more efficient. -// So even numbers are before and odd numbers are after - UndoStack *undo_stack; - - - - -// loads undo from the stringfile to the project - int load_undo_before(FileXML *file, uint32_t load_flags); - int load_undo_after(FileXML *file, uint32_t load_flags); - - - MWindow *mwindow; - Timer *last_update; -}; - -#endif