]> git.lyx.org Git - lyx.git/blob - src/CutAndPaste.h
Alfredo's second patch
[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 PitPosPair cutSelection(ParagraphList & pars,
25              ParagraphList::iterator startpit, 
26              ParagraphList::iterator endpit,
27              int start, int end, lyx::textclass_type tc,
28              bool doclear = false);
29 ///
30 PitPosPair eraseSelection(ParagraphList & pars,
31                ParagraphList::iterator startpit, 
32                ParagraphList::iterator endpit,
33                int start, int end, bool doclear = false);
34 ///
35 bool copySelection(ParagraphList::iterator startpit, 
36                    ParagraphList::iterator endpit,
37                    int start, int end, lyx::textclass_type tc);
38 ///
39 std::pair<PitPosPair, ParagraphList::iterator>
40 pasteSelection(ParagraphList & pars,
41                ParagraphList::iterator pit, int pos,
42                lyx::textclass_type tc);
43
44 ///
45 int nrOfParagraphs();
46
47 /** needed to switch between different classes this works
48     for a list of paragraphs beginning with the specified par
49     return value is the number of wrong conversions
50 */
51 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
52                                 lyx::textclass_type c2,
53                                 Paragraph * par,
54                                 BufferParams const & bparams);
55 ///
56 bool checkPastePossible();
57
58 } // end of CutAndPaste
59
60 #endif