X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fmainundo.h;h=d622adcfb70b7ec096b92be372f5a1fb9811fbfd;hb=a19a685a46ddc630010788707d9e5b9d2342af46;hp=896db1b01f8a5d84d9742dcc646dfb4bda269b9d;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mainundo.h b/cinelerra-5.1/cinelerra/mainundo.h index 896db1b0..d622adcf 100644 --- a/cinelerra-5.1/cinelerra/mainundo.h +++ b/cinelerra-5.1/cinelerra/mainundo.h @@ -2,21 +2,21 @@ /* * 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 @@ -37,16 +37,13 @@ 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 update_undo_before(const char *description = "", void *creator = 0); - void update_undo_after(const char *description, + void update_undo_after(const char *description, uint32_t load_flags, int changes_made = 1); @@ -56,26 +53,31 @@ public: int undo(); int redo(); +// load_flags for the next undo/redo stack item + int undo_load_flags(); + int redo_load_flags(); void dump(FILE *fp=stdout); + + void save(FILE *fp); + void load(FILE *fp); private: // Entry point for all update commands - void update_undo_entry(const char *description, - uint32_t load_flags, - void *creator, + 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); + 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; - - - + UndoStackItem *next_undo(); + UndoStackItem *next_redo(); // 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); + int load_undo_before(FileXML *file, uint32_t load_flags); + int load_undo_after(FileXML *file, uint32_t load_flags); MWindow *mwindow;