]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.h
* Paragraph: Cosmetics and cleanups, remove uneeded redirection and uniformize Privat...
[lyx.git] / src / Buffer.h
index ff5e50148a5f872948d2c966a3b4da32b98d705a..7296a8f366bd2aadd469b6acd1d89186c4894050 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef BUFFER_H
 #define BUFFER_H
 
-#include "DocIterator.h"
+#include "insets/InsetCode.h"
 
 #include "support/FileName.h"
 #include "support/limited_stack.h"
 namespace lyx {
 
 class BufferParams;
+class EmbeddedFiles;
 class ErrorItem;
 class ErrorList;
 class FuncRequest;
 class Inset;
-class InsetText;
 class Font;
 class Lexer;
 class LyXRC;
@@ -218,7 +218,7 @@ public:
        void markClean() const;
 
        ///
-       void markBakClean();
+       void markBakClean() const;
 
        ///
        void markDepClean(std::string const & name);
@@ -301,14 +301,6 @@ public:
        ///
        bool isMultiLingual() const;
 
-       /// Does this mean that this is buffer local?
-       limited_stack<Undo> & undostack();
-       limited_stack<Undo> const & undostack() const;
-
-       /// Does this mean that this is buffer local?
-       limited_stack<Undo> & redostack();
-       limited_stack<Undo> const & redostack() const;
-
        ///
        BufferParams & params();
        BufferParams const & params() const;
@@ -366,9 +358,11 @@ public:
        ///
        void insertMacro(docstring const & name, MacroData const & data);
 
-       ///
+       /// Replace the inset contents for insets which InsetCode is equal
+       /// to the passed \p inset_code.
        void changeRefsIfUnique(docstring const & from, docstring const & to,
-               Inset::Code code);
+               InsetCode code);
+
 /// 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);
@@ -388,11 +382,11 @@ public:
        EmbeddedFiles & embeddedFiles();
        EmbeddedFiles const & embeddedFiles() const;
        //@}
+
+       Undo & undo();
        
        /// This function is called when the buffer is changed.
        void changed() const;
-       /// This function is called if the buffer is being closed.
-       void closing(Buffer *) const;
        /// This function is called when the buffer structure is changed.
        void structureChanged() const;
        /// This function is called when an embedded file is changed
@@ -412,6 +406,12 @@ public:
 
        void setGuiDelegate(frontend::GuiBufferDelegate * gui);
 
+       ///
+       void autoSave() const;
+       ///
+       bool writeAs(std::string const & newname = std::string());
+       ///
+       bool menuWrite();
 
 private:
        /** Inserts a file into a document