]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.h
comment
[lyx.git] / src / BufferList.h
index 179cc358bc2af2d1400b10704d870697ddccfa87..1943c16ba3a5046e7f704e4bc86c8295c0a6ed2b 100644 (file)
@@ -40,15 +40,17 @@ public:
        iterator end();
        const_iterator end() const;
 
-       /// write all buffers, asking the user, returns false if cancelled
-       bool quitWriteAll();
-
        /// create a new buffer
+       /// \return 0 if the Buffer creation is not possible for whatever reason.
        Buffer * newBuffer(std::string const & s, bool ronly = false);
 
        /// delete a buffer
        void release(Buffer * b);
 
+       /// Release \p child if it really is a child and is not used elsewhere.
+       /// \return true is the file was closed.
+       bool releaseChild(Buffer * parent, Buffer * child);
+
        /// Close all open buffers.
        void closeAll();
 
@@ -61,8 +63,11 @@ public:
        /// emergency save for all buffers
        void emergencyWriteAll();
 
-       /// close buffer. Returns false if cancelled by user
-       bool close(Buffer * buf, bool ask);
+       /// save emergency file for the given buffer
+       /**
+         * \return a status message towards the user.
+         */
+       docstring emergencyWrite(Buffer * buf);
 
        /// return true if no buffers loaded
        bool empty() const;
@@ -108,16 +113,10 @@ private:
        BufferList(BufferList const &);
        void operator=(BufferList const &);
 
-       /// ask to save a buffer on quit, returns false if should cancel
-       bool quitWriteBuffer(Buffer * buf);
-
        typedef std::vector<Buffer *> BufferStorage;
 
        /// storage of all buffers
        BufferStorage bstore;
-
-       /// save emergency file for the given buffer
-       void emergencyWrite(Buffer * buf);
 };
 
 /// Implementation is in LyX.cpp