X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBuffer.h;h=f932a565cef68516a1ee7e39662750bdcf827ff3;hb=1c362c80b22012d66472da713ffa0cf3d71815e7;hp=eb9b581bf71f0b37273c5a0faafd99a547e3063b;hpb=76dc2c0d3002db400f4826e6f3b3e8bf84f830f4;p=lyx.git diff --git a/src/Buffer.h b/src/Buffer.h index eb9b581bf7..f932a565ce 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -24,8 +24,8 @@ namespace lyx { +class BiblioInfo; class BufferParams; -class EmbeddedFileList; class DocIterator; class ErrorItem; class ErrorList; @@ -43,6 +43,7 @@ class LaTeXFeatures; class Language; class MacroData; class MacroNameSet; +class MacroSet; class OutputParams; class Paragraph; class ParConstIterator; @@ -60,6 +61,7 @@ class WorkAreaManager; namespace support { class FileName; +class FileNameList; } /** The buffer object. @@ -277,6 +279,9 @@ public: */ Buffer const * masterBuffer() const; + /// \return true if \p child is a child of this \c Buffer. + bool isChild(Buffer * child) const; + /// Is buffer read-only? bool isReadonly() const; @@ -304,9 +309,16 @@ public: /// Update the cache with all bibfiles in use (including bibfiles /// of loaded child documents). void updateBibfilesCache() const; + /// + void invalidateBibinfoCache(); /// Return the cache with all bibfiles in use (including bibfiles /// of loaded child documents). - EmbeddedFileList const & getBibfilesCache() const; + support::FileNameList const & getBibfilesCache() const; + /// \return the bibliography information for this buffer's master, + /// or just for it, if it isn't a child. + BiblioInfo const & masterBibInfo() const; + /// \return the bibliography information for this buffer ONLY. + BiblioInfo const & localBibInfo() const; /// void getLabelList(std::vector &) const; @@ -368,12 +380,10 @@ public: /// Iterate through the whole buffer and try to resolve macros void updateMacroInstances() const; - /// 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; @@ -404,15 +414,10 @@ public: /// method is const because modifying this backend does not touch /// the document contents. TocBackend & tocBackend() const; - - //@{ - EmbeddedFileList & embeddedFiles(); - EmbeddedFileList const & embeddedFiles() const; - bool embedded() const; - //@} + /// Undo & undo(); - + /// This function is called when the buffer is changed. void changed() const; /// This function is called when the buffer structure is changed.