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 /// returns false if no undo possible
21 bool textUndo(BufferView *);
23 /// 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 setUndo(BufferView *, Undo::undo_kind kind,
46 ParagraphList::iterator first, ParagraphList::iterator last);
47 /// Convienience: Prepare undo when change in a single paragraph.
48 void setUndo(BufferView *, Undo::undo_kind kind,
49 ParagraphList::iterator first);
51 /// Convienience: Prepare undo for the paragraph that contains the cursor
52 void setUndo(BufferView *, Undo::undo_kind kind);
54 /// Convienience: Prepare and finish undo for the paragraph that contains the cursor
55 void setCursorParUndo(BufferView *);
57 /// Are we avoiding tracking undos currently ?
58 extern bool undo_frozen;
60 #endif // UNDO_FUNCS_H