2002-08-20 19:41:13 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-12 14:58:06 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file paragraph_funcs.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-08-21 17:35:24 +00:00
|
|
|
|
*
|
2002-09-12 14:58:06 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2002-08-21 17:35:24 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-12 14:58:06 +00:00
|
|
|
|
*/
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
|
|
|
|
#ifndef PARAGRAPH_FUNCS_H
|
|
|
|
|
#define PARAGRAPH_FUNCS_H
|
|
|
|
|
|
2003-09-06 12:36:58 +00:00
|
|
|
|
#include "ParagraphList_fwd.h"
|
2002-08-20 19:41:13 +00:00
|
|
|
|
#include "support/types.h"
|
|
|
|
|
|
2003-09-06 17:23:08 +00:00
|
|
|
|
#include "support/std_string.h"
|
|
|
|
|
|
2003-03-03 21:15:49 +00:00
|
|
|
|
class Buffer;
|
2002-08-20 19:41:13 +00:00
|
|
|
|
class BufferParams;
|
2003-03-03 21:15:49 +00:00
|
|
|
|
class TexRow;
|
2003-05-22 18:59:10 +00:00
|
|
|
|
class LatexRunParams;
|
2003-09-06 17:23:08 +00:00
|
|
|
|
class LyXFont;
|
2003-03-12 11:52:23 +00:00
|
|
|
|
class LyXLex;
|
2003-08-26 14:50:16 +00:00
|
|
|
|
class InsetOld;
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
|
|
|
|
///
|
2003-03-06 10:02:40 +00:00
|
|
|
|
void breakParagraph(BufferParams const & bparams,
|
|
|
|
|
ParagraphList & paragraphs,
|
2003-03-04 19:52:35 +00:00
|
|
|
|
ParagraphList::iterator par,
|
2002-08-20 19:41:13 +00:00
|
|
|
|
lyx::pos_type pos,
|
|
|
|
|
int flag);
|
|
|
|
|
|
|
|
|
|
///
|
2003-03-06 10:02:40 +00:00
|
|
|
|
void breakParagraphConservative(BufferParams const & bparams,
|
|
|
|
|
ParagraphList & paragraphs,
|
2003-03-04 19:52:35 +00:00
|
|
|
|
ParagraphList::iterator par,
|
2002-08-20 19:41:13 +00:00
|
|
|
|
lyx::pos_type pos);
|
|
|
|
|
|
2002-10-21 16:21:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* Append the next paragraph onto the tail of this one.
|
|
|
|
|
* Be careful, this doesent make any check at all.
|
|
|
|
|
*/
|
2003-03-06 10:02:40 +00:00
|
|
|
|
void mergeParagraph(BufferParams const & bparams,
|
|
|
|
|
ParagraphList & paragraphs,
|
2003-03-04 19:52:35 +00:00
|
|
|
|
ParagraphList::iterator par);
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
2003-04-16 08:12:22 +00:00
|
|
|
|
|
2002-08-20 19:41:13 +00:00
|
|
|
|
/// for the environments
|
2003-04-16 08:12:22 +00:00
|
|
|
|
ParagraphList::iterator depthHook(ParagraphList::iterator pit,
|
|
|
|
|
ParagraphList const & plist,
|
2003-09-06 17:23:08 +00:00
|
|
|
|
lyx::depth_type depth);
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
2003-04-16 08:12:22 +00:00
|
|
|
|
ParagraphList::iterator outerHook(ParagraphList::iterator pit,
|
|
|
|
|
ParagraphList const & plist);
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
|
|
|
|
/// Is it the first par with same depth and layout?
|
2003-04-16 08:12:22 +00:00
|
|
|
|
bool isFirstInSequence(ParagraphList::iterator par,
|
|
|
|
|
ParagraphList const & plist);
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
|
|
|
|
/** Check if the current paragraph is the last paragraph in a
|
|
|
|
|
proof environment */
|
2003-04-16 08:12:22 +00:00
|
|
|
|
int getEndLabel(ParagraphList::iterator pit,
|
|
|
|
|
ParagraphList const & plist);
|
2002-08-20 19:41:13 +00:00
|
|
|
|
|
2003-03-03 21:15:49 +00:00
|
|
|
|
|
2003-08-28 07:41:31 +00:00
|
|
|
|
void latexParagraphs(Buffer const & buf,
|
2003-03-10 17:49:24 +00:00
|
|
|
|
ParagraphList const & paragraphs,
|
|
|
|
|
std::ostream & ofs,
|
|
|
|
|
TexRow & texrow,
|
2003-05-22 18:59:10 +00:00
|
|
|
|
LatexRunParams const &,
|
|
|
|
|
string const & everypar = string());
|
2003-03-10 17:49:24 +00:00
|
|
|
|
|
2003-03-12 11:52:23 +00:00
|
|
|
|
/// read a paragraph from a .lyx file. Returns number of unrecognised tokens
|
|
|
|
|
int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
|
|
|
|
|
|
2003-04-16 04:35:43 +00:00
|
|
|
|
LyXFont const outerFont(ParagraphList::iterator pit,
|
|
|
|
|
ParagraphList const & plist);
|
2003-04-14 18:35:29 +00:00
|
|
|
|
|
2003-08-26 14:50:16 +00:00
|
|
|
|
/// find outermost paragraph containing an inset
|
2003-08-26 16:36:53 +00:00
|
|
|
|
ParagraphList::iterator outerPar(Buffer const & buf, InsetOld const * inset);
|
|
|
|
|
|
|
|
|
|
/// find owning paragraph containing an inset
|
|
|
|
|
Paragraph const & ownerPar(Buffer const & buf, InsetOld const * inset);
|
2003-08-26 14:50:16 +00:00
|
|
|
|
|
|
|
|
|
|
2002-09-12 14:58:06 +00:00
|
|
|
|
#endif // PARAGRAPH_FUNCS_H
|