]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.h
Fix dialog handling of Insert Plain Text
[lyx.git] / src / Buffer.h
index de5421ffc99fd5bc6bd626eef3661210010ea7a8..c3ea3ea4bd40098984763f0f35cdfee764c8a1ae 100644 (file)
 #include "insets/InsetCode.h"
 
 #include "support/FileName.h"
-#include "support/docstring.h"
-#include "support/docstream.h"
+#include "support/strfwd.h"
 #include "support/types.h"
 
-#include <iosfwd>
 #include <string>
-#include <utility>
 #include <vector>
 
 
@@ -43,6 +40,7 @@ class LaTeXFeatures;
 class Language;
 class MacroData;
 class OutputParams;
+class Paragraph;
 class ParConstIterator;
 class ParIterator;
 class ParagraphList;
@@ -238,6 +236,9 @@ public:
        /// Mark this buffer as dirty.
        void markDirty();
 
+       /// Returns the buffer's filename. It is always an absolute path.
+       support::FileName fileName() const;
+
        /// Returns the buffer's filename. It is always an absolute path.
        std::string absFileName() const;
 
@@ -251,7 +252,7 @@ public:
        std::string latexName(bool no_path = true) const;
 
        /// Get thee name and type of the log.
-       std::pair<LogType, std::string> logName() const;
+       std::string logName(LogType * type = 0) const;
 
        /// Change name of buffer. Updates "read-only" flag.
        void setFileName(std::string const & newfile);
@@ -355,14 +356,16 @@ public:
        //
        // Macro handling
        //
-       ///
-       void buildMacros();
-       ///
+       /// Collect macros in paragraphs
+       void updateMacros();
+       /// Look for macro defined before par (or in the master buffer)
+       bool hasMacro(docstring const & name, Paragraph const & par) const;
+       /// Look for macro defined anywhere in the buffer (or in the master buffer)
        bool hasMacro(docstring const & name) const;
-       ///
+       /// Return macro defined before par (or in the master buffer)
+       MacroData const & getMacro(docstring const & name, Paragraph const & par) const;
+       /// Return macro defined anywhere in the buffer (or in the master buffer)
        MacroData const & getMacro(docstring const & name) const;
-       ///
-       void insertMacro(docstring const & name, MacroData const & data);
 
        /// Replace the inset contents for insets which InsetCode is equal
        /// to the passed \p inset_code.