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.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
12 #ifndef PARAGRAPH_FUNCS_H
13 #define PARAGRAPH_FUNCS_H
15 #include "ParagraphList.h"
16 #include "support/types.h"
26 void breakParagraph(BufferParams const & bparams,
27 ParagraphList & paragraphs,
28 ParagraphList::iterator par,
33 void breakParagraphConservative(BufferParams const & bparams,
34 ParagraphList & paragraphs,
35 ParagraphList::iterator par,
39 * Append the next paragraph onto the tail of this one.
40 * Be careful, this doesent make any check at all.
42 void mergeParagraph(BufferParams const & bparams,
43 ParagraphList & paragraphs,
44 ParagraphList::iterator par);
47 /// for the environments
48 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
49 ParagraphList const & plist,
50 Paragraph::depth_type depth);
52 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
53 ParagraphList const & plist);
55 /// Is it the first par with same depth and layout?
56 bool isFirstInSequence(ParagraphList::iterator par,
57 ParagraphList const & plist);
59 /** Check if the current paragraph is the last paragraph in a
61 int getEndLabel(ParagraphList::iterator pit,
62 ParagraphList const & plist);
65 void latexParagraphs(Buffer const * buf,
66 ParagraphList const & paragraphs,
69 LatexRunParams const &,
70 string const & everypar = string());
72 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
73 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
75 LyXFont const outerFont(ParagraphList::iterator pit,
76 ParagraphList const & plist);
78 /// find outermost paragraph containing an inset
79 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
81 /// find owning paragraph containing an inset
82 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
85 #endif // PARAGRAPH_FUNCS_H