]> git.lyx.org Git - features.git/blob - src/CutAndPaste.h
Some cleanup, and prepare for new feature.
[features.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
22 ///
23 namespace CutAndPaste {
24 ///
25 PitPosPair cutSelection(ParagraphList & pars,
26              ParagraphList::iterator startpit,
27              ParagraphList::iterator endpit,
28              int start, int end, lyx::textclass_type tc,
29              bool doclear = false);
30 ///
31 PitPosPair eraseSelection(ParagraphList & pars,
32                ParagraphList::iterator startpit,
33                ParagraphList::iterator endpit,
34                int start, int end, bool doclear = false);
35 ///
36 bool copySelection(ParagraphList::iterator startpit,
37                    ParagraphList::iterator endpit,
38                    int start, int end, lyx::textclass_type tc);
39 ///
40 std::pair<PitPosPair, ParagraphList::iterator>
41 pasteSelection(ParagraphList & pars,
42                ParagraphList::iterator pit, int pos,
43                lyx::textclass_type tc);
44
45 ///
46 std::pair<PitPosPair, ParagraphList::iterator>
47 pasteSelection(ParagraphList & pars,
48                ParagraphList::iterator pit, int pos,
49                lyx::textclass_type tc,
50                size_t cuts_index);
51
52 ///
53 int nrOfParagraphs();
54
55 /** Needed to switch between different classes this works
56     for a list of paragraphs beginning with the specified par
57     return value is the number of wrong conversions.
58 */
59 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
60                                 lyx::textclass_type c2,
61                                 ParagraphList & par);
62 ///
63 bool checkPastePossible();
64
65 } // end of CutAndPaste
66
67 #endif