]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
Minimal fix needed to give Qt a label dialog again.
[lyx.git] / src / buffer.h
index bae622f9e890559dd3ac1bd1e7906b3d7cfe9066..e43a5939ad12062df3fe47f6ae79b4965af7b0c0 100644 (file)
 #ifndef BUFFER_H
 #define BUFFER_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include "LString.h"
 #include "undo.h"
 #include "support/limited_stack.h"
@@ -26,6 +22,7 @@
 #include "texrow.h"
 #include "ParagraphList.h"
 #include "paragraph.h"
+#include "author.h"
 
 #include <boost/shared_ptr.hpp>
 
@@ -35,18 +32,9 @@ class TeXErrors;
 class LaTeXFeatures;
 class Language;
 class ParIterator;
+class ParConstIterator;
 
 
-///
-struct DEPCLEAN {
-       ///
-       bool clean;
-       ///
-       string master;
-       ///
-       DEPCLEAN * next;
-};
-
 /** The buffer object.
   This is the buffer object. It contains all the informations about
   a document loaded into LyX. I am not sure if the class is complete or
@@ -124,7 +112,7 @@ public:
                                        LyXFont &);
        ///
        void insertStringAsLines(Paragraph *&, lyx::pos_type &,
-                                LyXFont const &, string const &) const;
+                                LyXFont const &, string const &);
        ///
        Paragraph * getParFromID(int id) const;
 private:
@@ -162,8 +150,10 @@ public:
        /** LaTeX all paragraphs from par to endpar.
            \param \a endpar if == 0 then to the end
        */
-       void latexParagraphs(std::ostream & os, Paragraph * par,
-                            Paragraph * endpar, TexRow & texrow, bool moving_arg = false) const;
+       void latexParagraphs(std::ostream & os,
+                            ParagraphList::iterator par,
+                            ParagraphList::iterator endpar,
+                            TexRow & texrow, bool moving_arg = false) const;
        ///
        void simpleDocBookOnePar(std::ostream &,
                                 Paragraph * par, int & desc_on,
@@ -177,12 +167,6 @@ public:
        ///
        void makeDocBookFile(string const & filename,
                             bool nice, bool only_body = false);
-       /// Open SGML/XML tag.
-       int sgmlOpenTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
-               string const & latexname) const;
-       /// Closes SGML/XML tag.
-       int sgmlCloseTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
-               string const & latexname) const;
        ///
        void sgmlError(Paragraph * par, int pos, string const & message) const;
 
@@ -265,8 +249,8 @@ public:
        */
        void validate(LaTeXFeatures &) const;
 
-       ///
-       std::vector<std::pair<string, string> > const getBibkeyList() const;
+       /// return all bibkeys from buffer and its childs
+       void fillWithBibKeys(std::vector<std::pair<string, string> > & keys) const;
        ///
        std::vector<string> const getLabelList() const;
 
@@ -307,7 +291,19 @@ public:
 
        /// Used when typesetting to place errorboxes.
        TexRow texrow;
+
+       /// the author list for the document
+       AuthorList & authors();
+
 private:
+       typedef std::map<string, bool> DepClean;
+
+       /// need to regenerate .tex ?
+       DepClean dep_clean_;
+
+       /// the author list
+       AuthorList authorlist;
+
        /// is save needed
        mutable bool lyx_clean;
 
@@ -317,9 +313,6 @@ private:
        /// is this a unnamed file (New...)
        bool unnamed;
 
-       /// is regenerating #.tex# necessary
-       DEPCLEAN * dep_clean;
-
        /// buffer is r/o
        bool read_only;
 
@@ -408,7 +401,11 @@ public:
        ///
        ParIterator par_iterator_begin();
        ///
+       ParConstIterator par_iterator_begin() const;
+       ///
        ParIterator par_iterator_end();
+       ///
+       ParConstIterator par_iterator_end() const;
 
        ///
        Inset * getInsetFromID(int id_arg) const;