]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
e27cb4ccbe1e49f80a52933a269bd6f3281ba036
[lyx.git] / src / CutAndPaste.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995-2001 the LyX Team.
8  *
9  * ====================================================== */
10
11 #ifndef CUTANDPASTE_H
12 #define CUTANDPASTE_H
13
14 #include "support/types.h"
15 #include "ParagraphList.h"
16
17 class Paragraph;
18 class BufferParams;
19 class LyXTextClass;
20
21 ///
22 namespace CutAndPaste {
23 ///
24 std::pair<ParagraphList::iterator, int>
25 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 std::pair<ParagraphList::iterator, int>
32 eraseSelection(ParagraphList & pars,
33                ParagraphList::iterator startpit, 
34                ParagraphList::iterator endpit,
35                int start, int end, bool doclear = false);
36 ///
37 bool copySelection(Paragraph * startpar, Paragraph * endpar,
38                    int start, int end, lyx::textclass_type tc);
39 ///
40 bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
41                     int & pos, lyx::textclass_type tc);
42
43 ///
44 int nrOfParagraphs();
45
46 /** needed to switch between different classes this works
47     for a list of paragraphs beginning with the specified par
48     return value is the number of wrong conversions
49 */
50 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
51                                 lyx::textclass_type c2,
52                                 Paragraph * par,
53                                 BufferParams const & bparams);
54 ///
55 bool checkPastePossible();
56
57 } // end of CutAndPaste
58
59 #endif