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