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