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 "support/types.h"
28 * This breaks a paragraph at the specified position.
29 * The new paragraph will:
30 * get the default layout, when flag == 0
31 * will inherit the existing one, except for depth, when flag == 1
32 * will inherit the existing one, including depth, when flag == 2
33 * Be aware that the old or new paragraph does not contain any rows
36 void breakParagraph(BufferParams const & bparams,
37 ParagraphList & paragraphs,
43 void breakParagraphConservative(BufferParams const & bparams,
44 ParagraphList & paragraphs,
49 * Append the next paragraph onto the tail of this one.
50 * Be careful, this doesent make any check at all.
52 void mergeParagraph(BufferParams const & bparams,
53 ParagraphList & paragraphs, pit_type par);
56 /// for the environments
57 pit_type depthHook(pit_type par,
58 ParagraphList const & plist, depth_type depth);
60 pit_type outerHook(pit_type par, ParagraphList const & plist);
62 /// Is it the first par with same depth and layout?
63 bool isFirstInSequence(pit_type par, ParagraphList const & plist);
65 /** Check if the current paragraph is the last paragraph in a
67 int getEndLabel(pit_type par, ParagraphList const & plist);
70 * Get the font of the "environment" of paragraph \p par_offset in \p pars.
71 * All font changes of the paragraph are relative to this font.
73 Font const outerFont(pit_type par_offset, ParagraphList const & pars);
75 /// return the number of InsetOptArg in a paragraph
76 int numberOfOptArgs(Paragraph const & par);
78 /// accept the changes within the complete ParagraphList
79 void acceptChanges(ParagraphList & pars, BufferParams const & bparams);
84 #endif // PARAGRAPH_FUNCS_H