]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
Patch from John (figinset) and Dekel (RTL and spellchecker)
[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         static
27         bool cutSelection(LyXParagraph * startpar, LyXParagraph ** endpar,
28                           int start, int & end,
29                           char tc, bool doclear = false);
30         ///
31         static
32         bool copySelection(LyXParagraph * startpar, LyXParagraph * endpar,
33                            int start, int end, char tc);
34         ///
35         static
36         bool pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
37                             int & pos, char tc);
38         ///
39         static
40         int nrOfParagraphs();
41         /** needed to switch between different classes this works
42             for a list of paragraphs beginning with the specified par 
43             return value is the number of wrong conversions
44         */
45         static
46         int SwitchLayoutsBetweenClasses(LyXTextClassList::size_type class1,
47                                         LyXTextClassList::size_type class2,
48                                         LyXParagraph * par);
49         ///
50         static
51         bool checkPastePossible(LyXParagraph *, int pos);
52 };
53
54 #endif