*
* \author Lars Gullik Bjønnes
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#ifndef PARAGRAPH_FUNCS_H
#define PARAGRAPH_FUNCS_H
-#include "ParagraphList.h"
-#include "paragraph.h"
+#include "ParagraphList_fwd.h"
#include "support/types.h"
+#include <string>
+
class Buffer;
class BufferParams;
-class TexRow;
-class LatexRunParams;
+class LyXFont;
class LyXLex;
+class InsetBase;
+
///
void breakParagraph(BufferParams const & bparams,
/// for the environments
ParagraphList::iterator depthHook(ParagraphList::iterator pit,
ParagraphList const & plist,
- Paragraph::depth_type depth);
+ lyx::depth_type depth);
ParagraphList::iterator outerHook(ParagraphList::iterator pit,
ParagraphList const & plist);
int getEndLabel(ParagraphList::iterator pit,
ParagraphList const & plist);
-
-void latexParagraphs(Buffer const * buf,
- ParagraphList const & paragraphs,
- std::ostream & ofs,
- TexRow & texrow,
- LatexRunParams const &,
- bool moving_arg,
- string const & everypar = string());
-
/// read a paragraph from a .lyx file. Returns number of unrecognised tokens
-int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
-
-LyXFont const realizeFont(LyXFont const & font,
- BufferParams const & params);
+int readParagraph(Buffer const & buf, Paragraph & par, LyXLex & lex);
LyXFont const outerFont(ParagraphList::iterator pit,
ParagraphList const & plist);
+/// find outermost paragraph containing an inset
+ParagraphList::iterator outerPar(Buffer const & buf, InsetBase const * inset);
+
+/// find owning paragraph containing an inset
+Paragraph const & ownerPar(Buffer const & buf, InsetBase const * inset);
+
+/// return the range of pars [beg, end[ owning the range of y [ystart, yend]
+void getParsInRange(ParagraphList & pl,
+ int ystart, int yend,
+ ParagraphList::iterator & beg,
+ ParagraphList::iterator & end);
+
#endif // PARAGRAPH_FUNCS_H