]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.h
more cursor dispatch
[lyx.git] / src / paragraph_funcs.h
index 1d9190fc7b8b7a310589ebb7342e074440160109..5b22c421171edfcb3ee1a83a8ddc3525bbe1245f 100644 (file)
 #ifndef PARAGRAPH_FUNCS_H
 #define PARAGRAPH_FUNCS_H
 
-#include "ParagraphList.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,
@@ -46,7 +49,7 @@ void mergeParagraph(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);
@@ -60,18 +63,22 @@ bool isFirstInSequence(ParagraphList::iterator par,
 int getEndLabel(ParagraphList::iterator pit,
                ParagraphList const & plist);
 
-
-void latexParagraphs(Buffer const * buf,
-                    ParagraphList const & paragraphs,
-                    std::ostream & ofs,
-                    TexRow & texrow,
-                    LatexRunParams const &,
-                    string const & everypar = string());
-
 /// read a paragraph from a .lyx file. Returns number of unrecognised tokens
-int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
+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