]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
3f7fece80708824279b642b1904b2704af91dea2
[lyx.git] / src / CutAndPaste.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995-2000 the LyX Team.
8  *
9  * ====================================================== */
10
11 #ifndef CUTANDPASTE_H
12 #define CUTANDPASTE_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "layout.h"
19
20 class LyXParagraph;
21
22 ///
23 class CutAndPaste {
24 public:
25         ///
26         bool cutSelection(LyXParagraph * startpar, LyXParagraph ** endpar,
27                           int start, int & end, char tc, bool doclear = false);
28         ///
29         bool copySelection(LyXParagraph * startpar, LyXParagraph * endpar,
30                            int start, int end, char tc);
31         ///
32         bool pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
33                             int & pos, char tc);
34         ///
35         int nrOfParagraphs() const;
36         /** needed to switch between different classes this works
37             for a list of paragraphs beginning with the specified par 
38             return value is the number of wrong conversions
39         */ 
40         int SwitchLayoutsBetweenClasses(LyXTextClassList::size_type class1,
41                                         LyXTextClassList::size_type class2,
42                                         LyXParagraph * par);
43         ///
44         LyXTextClassList::size_type getBufferTextClass() const;
45         ///
46         bool checkPastePossible(LyXParagraph *, int pos) const;
47 private:
48         ///
49         void DeleteBuffer();
50         ///
51         LyXTextClassList::size_type textclass;
52 };
53
54 #endif