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"
18 #include "support/std_string.h"
29 void breakParagraph(BufferParams const & bparams,
30 ParagraphList & paragraphs,
31 ParagraphList::iterator par,
36 void breakParagraphConservative(BufferParams const & bparams,
37 ParagraphList & paragraphs,
38 ParagraphList::iterator par,
42 * Append the next paragraph onto the tail of this one.
43 * Be careful, this doesent make any check at all.
45 void mergeParagraph(BufferParams const & bparams,
46 ParagraphList & paragraphs,
47 ParagraphList::iterator par);
50 /// for the environments
51 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
52 ParagraphList const & plist,
53 lyx::depth_type depth);
55 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
56 ParagraphList const & plist);
58 /// Is it the first par with same depth and layout?
59 bool isFirstInSequence(ParagraphList::iterator par,
60 ParagraphList const & plist);
62 /** Check if the current paragraph is the last paragraph in a
64 int getEndLabel(ParagraphList::iterator pit,
65 ParagraphList const & plist);
68 void latexParagraphs(Buffer const & buf,
69 ParagraphList const & paragraphs,
72 LatexRunParams const &,
73 string const & everypar = string());
75 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
76 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
78 LyXFont const outerFont(ParagraphList::iterator pit,
79 ParagraphList const & plist);
81 /// find outermost paragraph containing an inset
82 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
84 /// find owning paragraph containing an inset
85 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
88 #endif // PARAGRAPH_FUNCS_H