2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995-2001 The LyX Team.
9 * ====================================================== */
15 #include "ParagraphList.h"
20 /// This will undo the last action - returns false if no undo possible
21 bool textUndo(BufferView *);
23 /// This will redo the last undo - returns false if no redo possible
24 bool textRedo(BufferView *);
26 /// Makes sure the next operation will be stored
30 * Whilst undo is frozen, all actions do not get added
39 * Record undo information - call with the first paragraph that will be changed
40 * and the last paragraph that will be changed. So we give an inclusive
42 * This is called before you make the changes to the paragraph, and it
43 * will record the original information of the paragraphs in the undo stack.
45 void recordUndo(BufferView *, Undo::undo_kind kind,
46 ParagraphList::iterator first, ParagraphList::iterator last);
47 /// Convienience: Prepare undo when change in a single paragraph.
48 void recordUndo(BufferView *, Undo::undo_kind kind,
49 ParagraphList::iterator first);
51 /// Convienience: Prepare undo for the paragraph that contains the cursor
52 void recordUndo(BufferView *, Undo::undo_kind kind);
54 /// Are we avoiding tracking undos currently ?
55 extern bool undo_frozen;
57 #endif // UNDO_FUNCS_H