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 "paragraph.h"
16 #include "ParagraphList_fwd.h"
17 #include "support/types.h"
27 void breakParagraph(BufferParams const & bparams,
28 ParagraphList & paragraphs,
29 ParagraphList::iterator par,
34 void breakParagraphConservative(BufferParams const & bparams,
35 ParagraphList & paragraphs,
36 ParagraphList::iterator par,
40 * Append the next paragraph onto the tail of this one.
41 * Be careful, this doesent make any check at all.
43 void mergeParagraph(BufferParams const & bparams,
44 ParagraphList & paragraphs,
45 ParagraphList::iterator par);
48 /// for the environments
49 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
50 ParagraphList const & plist,
51 Paragraph::depth_type depth);
53 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
54 ParagraphList const & plist);
56 /// Is it the first par with same depth and layout?
57 bool isFirstInSequence(ParagraphList::iterator par,
58 ParagraphList const & plist);
60 /** Check if the current paragraph is the last paragraph in a
62 int getEndLabel(ParagraphList::iterator pit,
63 ParagraphList const & plist);
66 void latexParagraphs(Buffer const & buf,
67 ParagraphList const & paragraphs,
70 LatexRunParams const &,
71 string const & everypar = string());
73 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
74 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
76 LyXFont const outerFont(ParagraphList::iterator pit,
77 ParagraphList const & plist);
79 /// find outermost paragraph containing an inset
80 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
82 /// find owning paragraph containing an inset
83 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
86 #endif // PARAGRAPH_FUNCS_H