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