]> git.lyx.org Git - lyx.git/blob - src/paragraph_funcs.h
a new biblio::asValidLatexString helper function.
[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 ///
26 void breakParagraph(BufferParams const & bparams,
27                     ParagraphList & paragraphs,
28                     lyx::par_type par,
29                     lyx::pos_type pos,
30                     int flag);
31
32 ///
33 void breakParagraphConservative(BufferParams const & bparams,
34                                 ParagraphList & paragraphs,
35                                 lyx::par_type par,
36                                 lyx::pos_type pos);
37
38 /**
39  * Append the next paragraph onto the tail of this one.
40  * Be careful, this doesent make any check at all.
41  */
42 void mergeParagraph(BufferParams const & bparams,
43         ParagraphList & paragraphs, lyx::par_type par);
44
45
46 /// for the environments
47 lyx::par_type depthHook(lyx::par_type par,
48         ParagraphList const & plist, lyx::depth_type depth);
49
50 lyx::par_type outerHook(lyx::par_type par, ParagraphList const & plist);
51
52 /// Is it the first par with same depth and layout?
53 bool isFirstInSequence(lyx::par_type par, ParagraphList const & plist);
54
55 /** Check if the current paragraph is the last paragraph in a
56     proof environment */
57 int getEndLabel(lyx::par_type par, ParagraphList const & plist);
58
59 LyXFont const outerFont(lyx::par_type par, ParagraphList const & plist);
60
61 /// find outermost paragraph containing an inset
62 lyx::par_type outerPar(Buffer const & buf, InsetBase const * inset);
63
64 /// find owning paragraph containing an inset
65 Paragraph const & ownerPar(Buffer const & buf, InsetBase const * inset);
66
67 /// return the range of pars [beg, end[ owning the range of y [ystart, yend]
68 void getParsInRange(ParagraphList & plist,
69                                 int ystart, int yend,
70                                 lyx::par_type & beg,
71                                 lyx::par_type & end);
72
73 #endif // PARAGRAPH_FUNCS_H