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_fwd.h"
16 #include "support/types.h"
30 void breakParagraph(BufferParams const & bparams,
31 ParagraphList & paragraphs,
32 ParagraphList::iterator par,
37 void breakParagraphConservative(BufferParams const & bparams,
38 ParagraphList & paragraphs,
39 ParagraphList::iterator par,
43 * Append the next paragraph onto the tail of this one.
44 * Be careful, this doesent make any check at all.
46 void mergeParagraph(BufferParams const & bparams,
47 ParagraphList & paragraphs,
48 ParagraphList::iterator par);
51 /// for the environments
52 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
53 ParagraphList const & plist,
54 lyx::depth_type depth);
56 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
57 ParagraphList const & plist);
59 /// Is it the first par with same depth and layout?
60 bool isFirstInSequence(ParagraphList::iterator par,
61 ParagraphList const & plist);
63 /** Check if the current paragraph is the last paragraph in a
65 int getEndLabel(ParagraphList::iterator pit,
66 ParagraphList const & plist);
69 void latexParagraphs(Buffer const & buf,
70 ParagraphList const & paragraphs,
73 LatexRunParams const &,
74 std::string const & everypar = std::string());
76 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
77 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
79 LyXFont const outerFont(ParagraphList::iterator pit,
80 ParagraphList const & plist);
82 /// find outermost paragraph containing an inset
83 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
85 /// find owning paragraph containing an inset
86 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
89 #endif // PARAGRAPH_FUNCS_H