]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
690514cb021ea7947829fe7c81548e9eccbe35f4
[lyx.git] / src / CutAndPaste.h
1 // -*- C++ -*-
2 /* \file CutAndPaste.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jurgen Vigna
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CUTANDPASTE_H
13 #define CUTANDPASTE_H
14
15 #include "support/types.h"
16 #include "ParagraphList.h"
17
18 class Paragraph;
19 class BufferParams;
20 class LyXTextClass;
21 class ErrorList;
22
23 ///
24 namespace CutAndPaste {
25 ///
26 PitPosPair cutSelection(ParagraphList & pars,
27              ParagraphList::iterator startpit,
28              ParagraphList::iterator endpit,
29              int start, int end, lyx::textclass_type tc,
30              bool doclear = false);
31 ///
32 PitPosPair eraseSelection(ParagraphList & pars,
33                ParagraphList::iterator startpit,
34                ParagraphList::iterator endpit,
35                int start, int end, bool doclear = false);
36 ///
37 bool copySelection(ParagraphList::iterator startpit,
38                    ParagraphList::iterator endpit,
39                    int start, int end, lyx::textclass_type tc);
40 ///
41 std::pair<PitPosPair, ParagraphList::iterator>
42 pasteSelection(ParagraphList & pars,
43                ParagraphList::iterator pit, int pos,
44                lyx::textclass_type tc, ErrorList &);
45
46 ///
47 std::pair<PitPosPair, ParagraphList::iterator>
48 pasteSelection(ParagraphList & pars,
49                ParagraphList::iterator pit, int pos,
50                lyx::textclass_type tc,
51                size_t cuts_indexm, ErrorList &);
52
53 ///
54 int nrOfParagraphs();
55
56 /** Needed to switch between different classes this works
57     for a list of paragraphs beginning with the specified par
58     return value is the number of wrong conversions.
59 */
60 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
61                                 lyx::textclass_type c2,
62                                 ParagraphList & par,
63                                 ErrorList &);
64 ///
65 bool checkPastePossible();
66
67 } // end of CutAndPaste
68
69 #endif