]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
two patches from john
[lyx.git] / src / CutAndPaste.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 CUTANDPASTE_H
12 #define CUTANDPASTE_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "support/types.h"
19
20 class Paragraph;
21 class BufferParams;
22
23 ///
24 class CutAndPaste {
25 public:
26         ///
27         static
28         bool cutSelection(Paragraph * startpar, Paragraph ** endpar,
29                           int start, int & end, char tc, bool doclear = false,
30                           bool realcut = true);
31         ///
32         static
33         bool copySelection(Paragraph * startpar, Paragraph * endpar,
34                            int start, int end, char tc);
35         ///
36         static
37         bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
38                             int & pos, char tc);
39         ///
40         static
41         int nrOfParagraphs();
42         /** needed to switch between different classes this works
43             for a list of paragraphs beginning with the specified par 
44             return value is the number of wrong conversions
45         */
46         static
47         int SwitchLayoutsBetweenClasses(lyx::textclass_type class1,
48                                         lyx::textclass_type class2,
49                                         Paragraph * par,
50                                         BufferParams const & bparams);
51         ///
52         static
53         bool checkPastePossible(Paragraph *);
54 };
55
56 #endif