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