2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
15 #include "ParagraphList.h"
18 * These are the elements put on the undo stack. Each object
19 * contains complete paragraphs and sufficient information
20 * to restore the state. The work is done in undo_funcs.C
25 * The undo kinds are used to combine consecutive undo recordings
30 * Insert something - these will combine to one big chunk
31 * when many inserts come after each other.
36 * Delete something - these will combine to one big chunk
37 * when many deletes come after each other.
41 /// Atomic - each of these will have its own entry in the stack
45 Undo(undo_kind kind
, int inset_id
,
47 int cursor
, int cursor_pos
,
48 ParagraphList
const & par_arg
);
50 /// Which kind of operation are we recording for?
54 * ID of hosting inset if the cursor is in one.
55 * if -1, then the cursor is not in an inset.
56 * if >= 0, then the cursor is in inset with given id.
60 /// Offset to the first paragraph in the main document paragraph list
63 /// Offset to the last paragraph from the end of the main par. list
67 * Offset from the start of the main document paragraph list,
68 * except if inside an inset, in which case it's the offset
69 * inside the hosting inset.
71 int cursor_par_offset
;
73 /// The position of the cursor in the hosting paragraph
76 /// The contents of the paragraphs saved