]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.h
an example for the sweave module, prepared by Gregor Gorjanc
[lyx.git] / src / Layout.h
index e4aab34c5db7b86f96a53811603613e0561cc0f4..d251d292c2ec6e7f51e3093cfa488bda955fdfea 100644 (file)
@@ -24,6 +24,7 @@
 
 namespace lyx {
 
+class Language;
 class Lexer;
 class TextClass;
 
@@ -89,6 +90,12 @@ public:
        docstring const & category() const { return category_; }
        ///
        docstring const & preamble() const { return preamble_; }
+       /// Get language dependent macro definitions needed for this layout
+       /// for language \p lang
+       docstring const langpreamble(Language const * lang) const;
+       /// Get language and babel dependent macro definitions needed for
+       /// this layout for language \p lang
+       docstring const babelpreamble(Language const * lang) const;
        ///
        std::set<std::string> const & requires() const { return requires_; }
        ///
@@ -266,6 +273,10 @@ private:
        docstring category_;
        /// Macro definitions needed for this layout
        docstring preamble_;
+       /// Language dependent macro definitions needed for this layout
+       docstring langpreamble_;
+       /// Language and babel dependent macro definitions needed for this layout
+       docstring babelpreamble_;
        /// Packages needed for this layout
        std::set<std::string> requires_;
 };