]> git.lyx.org Git - lyx.git/blob - src/paragraph_funcs.h
35d172f28176ec6c4bdd811c8fc56245dc615d30
[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 "paragraph.h"
16 #include "ParagraphList_fwd.h"
17 #include "support/types.h"
18
19 class Buffer;
20 class BufferParams;
21 class TexRow;
22 class LatexRunParams;
23 class LyXLex;
24 class InsetOld;
25
26 ///
27 void breakParagraph(BufferParams const & bparams,
28                     ParagraphList & paragraphs,
29                     ParagraphList::iterator par,
30                     lyx::pos_type pos,
31                     int flag);
32
33 ///
34 void breakParagraphConservative(BufferParams const & bparams,
35                                 ParagraphList & paragraphs,
36                                 ParagraphList::iterator par,
37                                 lyx::pos_type pos);
38
39 /**
40  * Append the next paragraph onto the tail of this one.
41  * Be careful, this doesent make any check at all.
42  */
43 void mergeParagraph(BufferParams const & bparams,
44                     ParagraphList & paragraphs,
45                     ParagraphList::iterator par);
46
47
48 /// for the environments
49 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
50                                   ParagraphList const & plist,
51                                   Paragraph::depth_type depth);
52
53 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
54                                   ParagraphList const & plist);
55
56 /// Is it the first par with same depth and layout?
57 bool isFirstInSequence(ParagraphList::iterator par,
58                        ParagraphList const & plist);
59
60 /** Check if the current paragraph is the last paragraph in a
61     proof environment */
62 int getEndLabel(ParagraphList::iterator pit,
63                 ParagraphList const & plist);
64
65
66 void latexParagraphs(Buffer const & buf,
67                      ParagraphList const & paragraphs,
68                      std::ostream & ofs,
69                      TexRow & texrow,
70                      LatexRunParams const &,
71                      string const & everypar = string());
72
73 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
74 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
75
76 LyXFont const outerFont(ParagraphList::iterator pit,
77                         ParagraphList const & plist);
78
79 /// find outermost paragraph containing an inset
80 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
81
82 /// find owning paragraph containing an inset
83 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
84
85
86 #endif // PARAGRAPH_FUNCS_H