]> git.lyx.org Git - lyx.git/blob - src/paragraph_funcs.h
Alfredo's second patch
[lyx.git] / src / paragraph_funcs.h
1 // -*- C++ -*-
2 /**
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.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef PARAGRAPH_FUNCS_H
13 #define PARAGRAPH_FUNCS_H
14
15 #include "ParagraphList.h"
16 #include "paragraph.h"
17 #include "support/types.h"
18
19 class Buffer;
20 class BufferParams;
21 class TexRow;
22 class LyXLex;
23
24 ///
25 void breakParagraph(BufferParams const & bparams,
26                     ParagraphList & paragraphs,
27                     ParagraphList::iterator par,
28                     lyx::pos_type pos,
29                     int flag);
30
31 ///
32 void breakParagraphConservative(BufferParams const & bparams,
33                                 ParagraphList & paragraphs,
34                                 ParagraphList::iterator par,
35                                 lyx::pos_type pos);
36
37 /**
38  * Append the next paragraph onto the tail of this one.
39  * Be careful, this doesent make any check at all.
40  */
41 void mergeParagraph(BufferParams const & bparams,
42                     ParagraphList & paragraphs,
43                     ParagraphList::iterator par);
44
45
46 /// for the environments
47 ParagraphList::iterator depthHook(ParagraphList::iterator pit,
48                                   ParagraphList const & plist,
49                                   Paragraph::depth_type depth);
50
51 ParagraphList::iterator outerHook(ParagraphList::iterator pit,
52                                   ParagraphList const & plist);
53
54 /// Is it the first par with same depth and layout?
55 bool isFirstInSequence(ParagraphList::iterator par,
56                        ParagraphList const & plist);
57
58 /** Check if the current paragraph is the last paragraph in a
59     proof environment */
60 int getEndLabel(ParagraphList::iterator pit,
61                 ParagraphList const & plist);
62
63
64 void latexParagraphs(Buffer const * buf,
65                      ParagraphList const & paragraphs,
66                      ParagraphList::iterator par,
67                      ParagraphList::iterator endpar,
68                      std::ostream & ofs,
69                      TexRow & texrow,
70                      bool moving_arg = false);
71
72 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
73 int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
74
75 LyXFont const realizeFont(LyXFont const & font,
76                           BufferParams const & params);
77
78 LyXFont const outerFont(ParagraphList::iterator pit,
79                         ParagraphList const & plist);
80
81 #endif // PARAGRAPH_FUNCS_H