]> git.lyx.org Git - lyx.git/blob - src/undo_funcs.h
fix typo that put too many include paths for most people
[lyx.git] / src / undo_funcs.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #ifndef UNDO_FUNCS_H
12 #define UNDO_FUNCS_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "undo.h"
19
20 class BufferView;
21 class Paragraph;
22 class LyXCursor;
23
24 /// returns false if no undo possible
25 extern bool textUndo(BufferView *);
26 /// returns false if no redo possible
27 extern bool textRedo(BufferView *);
28 /// used by TextUndo/TextRedo
29 extern bool textHandleUndo(BufferView *, Undo * undo);
30 /// makes sure the next operation will be stored
31 extern void finishUndo();
32 /// this is dangerous and for internal use only
33 extern void freezeUndo();
34 /// this is dangerous and for internal use only
35 extern void unFreezeUndo();
36 ///
37 extern void setUndo(BufferView *, Undo::undo_kind kind,
38                     Paragraph const * first, Paragraph const * behind);
39 ///
40 extern void setRedo(BufferView *, Undo::undo_kind kind,
41                     Paragraph const * first, Paragraph const * behind);
42 ///
43 extern Undo * createUndo(BufferView *, Undo::undo_kind kind,
44                          Paragraph const * first, Paragraph const * behind);
45 /// for external use in lyx_cb.C
46 extern void setCursorParUndo(BufferView *);
47
48 // returns a pointer to the very first Paragraph depending of where we are
49 // so it will return the first paragraph of the buffer or the first paragraph
50 // of the textinset we're in.
51 extern Paragraph * firstUndoParagraph(BufferView *, int inset_arg);
52
53 ///
54 extern LyXCursor const & undoCursor(BufferView * bv);
55
56 /// the flag used by FinishUndo();
57 extern bool undo_finished;
58 /// a flag
59 extern bool undo_frozen;
60
61 #endif