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 * - Decrease depth by one (or change layout to default layout) when
31 * keep_layout == false
32 * - keep current depth and layout when keep_layout == true
34 void breakParagraph(BufferParams const & bparams,
35 ParagraphList & paragraphs,
41 void breakParagraphConservative(BufferParams const & bparams,
42 ParagraphList & paragraphs,
47 * Append the next paragraph onto the tail of this one.
48 * Be careful, this doesent make any check at all.
50 void mergeParagraph(BufferParams const & bparams,
51 ParagraphList & paragraphs, pit_type par);
54 /// for the environments
55 pit_type depthHook(pit_type par,
56 ParagraphList const & plist, depth_type depth);
58 pit_type outerHook(pit_type par, ParagraphList const & plist);
60 /// Is it the first par with same depth and layout?
61 bool isFirstInSequence(pit_type par, ParagraphList const & plist);
63 /** Check if the current paragraph is the last paragraph in a
65 int getEndLabel(pit_type par, ParagraphList const & plist);
68 * Get the font of the "environment" of paragraph \p par_offset in \p pars.
69 * All font changes of the paragraph are relative to this font.
71 Font const outerFont(pit_type par_offset, ParagraphList const & pars);
73 /// accept the changes within the complete ParagraphList
74 void acceptChanges(ParagraphList & pars, BufferParams const & bparams);
79 #endif // PARAGRAPH_FUNCS_H