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