namespace lyx {
+class BiblioInfo;
class BufferParams;
-class EmbeddedFileList;
class DocIterator;
class ErrorItem;
class ErrorList;
namespace support {
class FileName;
+class FileNameList;
}
/** The buffer object.
};
- /// Method to check if a file is externally modified, used by
+ /// Method to check if a file is externally modified, used by
/// isExternallyModified()
/**
* timestamp is fast but inaccurate. For example, the granularity
* of timestamp on a FAT filesystem is 2 second. Also, various operations
* may touch the timestamp of a file even when its content is unchanged.
*
- * checksum is accurate but slow, which can be a problem when it is
+ * checksum is accurate but slow, which can be a problem when it is
* frequently used, or used for a large file on a slow (network) file
* system.
*
checksum_method, ///< Use file checksum
timestamp_method, ///< Use timestamp, and checksum if timestamp has changed
};
-
+
/** Constructor
\param file
\param b optional \c false by default
/// Write file. Returns \c false if unsuccesful.
bool writeFile(support::FileName const &) const;
- /// Loads LyX file \c filename into buffer, * and \return success
+ /// Loads LyX file \c filename into buffer, * and \return success
bool loadLyXFile(support::FileName const & s);
/// Fill in the ErrorList with the TeXErrors
*/
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;
/// 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<docstring> &) const;
/// get source code (latex/docbook) for some paragraphs, or all paragraphs
/// including preamble
void getSourceCode(odocstream & os, pit_type par_begin, pit_type par_end,
- bool full_source);
+ bool full_source) const;
/// Access to error list.
/// This method is used only for GUI visualisation of Buffer related
/// 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;
+ ///
+ void updateTocItem(std::string const &, DocIterator const &) const;
/// This function is called when the buffer structure is changed.
void structureChanged() const;
/// This function is called when some parsing error shows up.
void updateMacros(DocIterator & it,
DocIterator & scope) const;
- ///
+ ///
bool readFileHelper(support::FileName const & s);
///
std::vector<std::string> backends() const;