]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
reverse last change
[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 class LyXTextClass;
23
24 ///
25 class CutAndPaste {
26 public:
27         /// realcut == false is we actually want a delete
28         static
29         bool cutSelection(Paragraph * startpar, Paragraph ** endpar,
30                           int start, int & end, char tc, bool doclear = false,
31                           bool realcut = true);
32         ///
33         static
34         bool copySelection(Paragraph * startpar, Paragraph * endpar,
35                            int start, int end, char tc);
36         ///
37         static
38         bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
39                             int & pos, char tc);
40         ///
41         static
42         int nrOfParagraphs();
43         /** needed to switch between different classes this works
44             for a list of paragraphs beginning with the specified par
45             return value is the number of wrong conversions
46         */
47         static
48         int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
49                                         lyx::textclass_type c2,
50                                         Paragraph * par,
51                                         BufferParams const & bparams);
52         ///
53         static
54         bool checkPastePossible(Paragraph *);
55 };
56
57 #endif