2 /******************************************************************************
3 * MODULE : archiver.hpp
4 * DESCRIPTION: undo/redo history
5 * COPYRIGHT : (C) 2009 Joris van der Hoeven
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
16 class archiver_rep
: public concrete_struct
{
17 patch archive
; // undo and redo archive
18 patch current
; // current sequence of modifications
19 int depth
; // archive depth
20 int last_save
; // archive depth at last save
21 int last_autosave
; // archive depth at last autosave
33 void start_slave (double a
);
36 void cancel (); // cancel current series of modifications
37 void confirm (); // move current modifications to history
38 void retract (); // reopen last history item for further modifications
39 void forget (); // undo and forget about last history item
42 int undo_possibilities ();
43 int redo_possibilities ();
44 path
undo_one (int i
);
45 path
redo_one (int i
);
50 void require_autosave ();
52 void notify_autosave ();
54 bool conform_autosave ();
61 CONCRETE_CODE (archiver
);
63 #endif // defined ARCHIVER_H