]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.h
Remove embedding stuff from InsetBibtex.
[lyx.git] / src / Buffer.h
index 51c3855f8775c46880d04aace8dea689a69410af..edafa55a0c7aeca8d78841bf1b938c62fd224f3f 100644 (file)
@@ -18,7 +18,6 @@
 #include "support/types.h"
 #include "support/SignalSlot.h"
 
-#include <set>
 #include <string>
 #include <vector>
 
@@ -32,6 +31,8 @@ class ErrorItem;
 class ErrorList;
 class FuncRequest;
 class Inset;
+class InsetRef;
+class InsetLabel;
 class Font;
 class Format;
 class Lexer;
@@ -41,6 +42,8 @@ class LyXVC;
 class LaTeXFeatures;
 class Language;
 class MacroData;
+class MacroNameSet;
+class MacroSet;
 class OutputParams;
 class Paragraph;
 class ParConstIterator;
@@ -58,6 +61,7 @@ class WorkAreaManager;
 
 namespace support {
 class FileName;
+class FileNameList;
 }
 
 /** The buffer object.
@@ -304,7 +308,7 @@ public:
        void updateBibfilesCache() const;
        /// Return the cache with all bibfiles in use (including bibfiles
        /// of loaded child documents).
-       EmbeddedFileList const & getBibfilesCache() const;
+       support::FileNameList const & getBibfilesCache() const;
        ///
        void getLabelList(std::vector<docstring> &) const;
 
@@ -366,14 +370,10 @@ public:
        /// Iterate through the whole buffer and try to resolve macros
        void updateMacroInstances() const;
 
-       typedef std::set<docstring> MacroNameSet;
-
-       /// List macro names of this buffer. the parent and the children
+       /// List macro names of this buffer, the parent and the children
        void listMacroNames(MacroNameSet & macros) const;
-       /// Write out all macros somewhere defined in the parent,
-       /// its parents and its children, which are visible at the beginning 
-       /// of this buffer
-       void writeParentMacros(odocstream & os) const;
+       /// Collect macros of the parent and its children in front of this buffer.
+       void listParentMacros(MacroSet & macros, LaTeXFeatures & features) const;
 
        /// Return macro defined before pos (or in the master buffer)
        MacroData const * getMacro(docstring const & name, DocIterator const & pos, bool global = true) const;
@@ -434,10 +434,6 @@ public:
 
        ///
        void autoSave() const;
-       ///
-       void loadChildDocuments() const;
-       ///
-       void resetChildDocuments(bool close_them) const;
 
        /// return the format of the buffer on a string
        std::string bufferFormat() const;
@@ -454,34 +450,23 @@ public:
        ///
        std::vector<Format const *> exportableFormats(bool only_viewable) const;
 
-       /// Register word for completion word list.
-       void registerWord(docstring const & word);
        ///
-       std::set<docstring> const & registeredWords() const { return words_; }
-       
+       typedef std::vector<std::pair<InsetRef *, ParIterator> > References;
+       References & references(docstring const & label);
+       References const & references(docstring const & label) const;
+       void clearReferenceCache() const;
+       void setInsetLabel(docstring const & label, InsetLabel const * il);
+       InsetLabel const * insetLabel(docstring const & label) const;
+
 private:
        /// search for macro in local (buffer) table or in children
        MacroData const * getBufferMacro(docstring const & name,
                                         DocIterator const & pos) const;
-       /** Update macro table in the whole text inset
-           \param it at the start of the text inset)
-       */
-       void updateInsetMacros(DocIterator & it, 
-                              DocIterator & scope) const;
-       /** Update macro table for paragraphs until \c lastpit
+       /** Update macro table starting with position of it
            \param it in some text inset
-           \param lastpit last processed paragraph
        */
-       void updateEnvironmentMacros(DocIterator & it, 
-                                    pit_type lastpit, 
+       void updateMacros(DocIterator & it,
                                     DocIterator & scope) const;
-       /** Update macro table for one paragraph block with 
-           same layout and depth, until \c lastpit
-           \param it in some text inset
-           \param lastpit last processed paragraph
-       */
-       void updateBlockMacros(DocIterator & it, 
-                              DocIterator & scope) const;
 
        /// 
        bool readFileHelper(support::FileName const & s);
@@ -510,8 +495,6 @@ private:
        //Signal setBusy(bool) = 0;
        /// Reset autosave timers for all users.
        Signal resetAutosaveTimers_;
-       
-       std::set<docstring> words_;
 };