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