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