]> git.lyx.org Git - lyx.git/blob - src/paragraph_funcs.h
cleanup some debug messages
[lyx.git] / src / paragraph_funcs.h
1 // -*- C++ -*-
2 /**
3  * \file paragraph_funcs.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef PARAGRAPH_FUNCS_H
13 #define PARAGRAPH_FUNCS_H
14
15 #include "support/types.h"
16
17 class Buffer;
18 class BufferParams;
19 class InsetBase;
20 class LyXFont;
21 class Paragraph;
22 class ParagraphList;
23
24 /**
25  * This breaks a paragraph at the specified position.
26  * The new paragraph will:
27  * get the default layout, when flag == 0
28  * will inherit the existing one, except for depth, when flag == 1
29  * will inherit the existing one, including depth, when flag == 2
30  * Be aware that the old or new paragraph does not contain any rows
31  * after this.
32  */
33 void breakParagraph(BufferParams const & bparams,
34                     ParagraphList & paragraphs,
35                     lyx::pit_type par,
36                     lyx::pos_type pos,
37                     int flag);
38
39 ///
40 void breakParagraphConservative(BufferParams const & bparams,
41                                 ParagraphList & paragraphs,
42                                 lyx::pit_type par,
43                                 lyx::pos_type pos);
44
45 /**
46  * Append the next paragraph onto the tail of this one.
47  * Be careful, this doesent make any check at all.
48  */
49 void mergeParagraph(BufferParams const & bparams,
50         ParagraphList & paragraphs, lyx::pit_type par);
51
52
53 /// for the environments
54 lyx::pit_type depthHook(lyx::pit_type par,
55         ParagraphList const & plist, lyx::depth_type depth);
56
57 lyx::pit_type outerHook(lyx::pit_type par, ParagraphList const & plist);
58
59 /// Is it the first par with same depth and layout?
60 bool isFirstInSequence(lyx::pit_type par, ParagraphList const & plist);
61
62 /** Check if the current paragraph is the last paragraph in a
63     proof environment */
64 int getEndLabel(lyx::pit_type par, ParagraphList const & plist);
65
66 LyXFont const outerFont(lyx::pit_type par_offset, ParagraphList const & pars);
67
68 /// return the number of InsetOptArg in a paragraph
69 int numberOfOptArgs(Paragraph const & par);
70
71 #endif // PARAGRAPH_FUNCS_H