]> git.lyx.org Git - features.git/blob - src/CutAndPaste.h
make CutAndPaste be a namespace instead of a class
[features.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
16 class Paragraph;
17 class BufferParams;
18 class LyXTextClass;
19
20 ///
21 namespace CutAndPaste {
22
23 /// realcut == false is we actually want a delete
24 bool cutSelection(Paragraph * startpar, Paragraph ** endpar,
25                   int start, int & end, char tc, bool doclear = false,
26                   bool realcut = true);
27 ///
28 bool copySelection(Paragraph * startpar, Paragraph * endpar,
29                    int start, int end, char tc);
30 ///
31 bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
32                     int & pos, char tc);
33
34 ///
35 int nrOfParagraphs();
36
37 /** needed to switch between different classes this works
38     for a list of paragraphs beginning with the specified par
39     return value is the number of wrong conversions
40 */
41 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
42                                 lyx::textclass_type c2,
43                                 Paragraph * par,
44                                 BufferParams const & bparams);
45 ///
46 bool checkPastePossible(Paragraph *);
47
48 } // end of CutAndPaste
49
50 #endif