4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup
8 * \author Lars Gullik Bjønnes
11 * Full author contact details are available in file CREDITS.
17 #include "ParagraphList.h"
20 * These are the elements put on the undo stack. Each object
21 * contains complete paragraphs and sufficient information
22 * to restore the state. The work is done in undo_funcs.C
27 * The undo kinds are used to combine consecutive undo recordings
32 * Insert something - these will combine to one big chunk
33 * when many inserts come after each other.
38 * Delete something - these will combine to one big chunk
39 * when many deletes come after each other.
43 /// Atomic - each of these will have its own entry in the stack
47 Undo(undo_kind kind, int inset_id,
49 int cursor, int cursor_pos,
50 ParagraphList const & par_arg);
52 /// Which kind of operation are we recording for?
56 * ID of hosting inset if the cursor is in one.
57 * if -1, then the cursor is not in an inset.
58 * if >= 0, then the cursor is in inset with given id.
62 /// Offset to the first paragraph in the main document paragraph list
65 /// Offset to the last paragraph from the end of the main par. list
69 * Offset from the start of the main document paragraph list,
70 * except if inside an inset, in which case it's the offset
71 * inside the hosting inset.
73 int cursor_par_offset;
75 /// The position of the cursor in the hosting paragraph
78 /// The contents of the paragraphs saved