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"
28 void breakParagraph(BufferParams const & bparams,
29 ParagraphList & paragraphs,
30 ParagraphList::iterator par,
35 void breakParagraphConservative(BufferParams const & bparams,
36 ParagraphList & paragraphs,
37 ParagraphList::iterator par,
41 * Append the next paragraph onto the tail of this one.
42 * Be careful, this doesent make any check at all.
44 void mergeParagraph(BufferParams const & bparams,
45 ParagraphList & paragraphs,
46 ParagraphList::iterator par);
49 /// for the environments
50 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
51 ParagraphList const & plist,
52 lyx::depth_type depth);
54 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
55 ParagraphList const & plist);
57 /// Is it the first par with same depth and layout?
58 bool isFirstInSequence(ParagraphList::iterator par,
59 ParagraphList const & plist);
61 /** Check if the current paragraph is the last paragraph in a
63 int getEndLabel(ParagraphList::iterator pit,
64 ParagraphList const & plist);
66 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
67 int readParagraph(Buffer const & buf, Paragraph & par, LyXLex & lex);
69 LyXFont const outerFont(ParagraphList::iterator pit,
70 ParagraphList const & plist);
72 /// find outermost paragraph containing an inset
73 ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
75 /// find owning paragraph containing an inset
76 Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
78 /// return the range of pars [beg, end[ owning the range of y [ystart, yend]
79 void getParsInRange(ParagraphList & pl,
81 ParagraphList::iterator & beg,
82 ParagraphList::iterator & end);
86 #endif // PARAGRAPH_FUNCS_H