]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlayout.h
couple more fixes
[lyx.git] / src / lyxlayout.h
index ef8dcbadf479ee81c8468e727412249eacc7d62b..cd9193a4f6435df55a9552853b2a69e5738244cb 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -28,10 +28,9 @@ class LyXTextClass;
 class LyXLayout {
 public:
        ///
-       LyXLayout ();
-
+       LyXLayout();
        ///
-       bool Read (LyXLex &, LyXTextClass const &);
+       bool Read(LyXLex &, LyXTextClass const &);
        ///
        void readAlign(LyXLex &);
        ///
@@ -47,11 +46,13 @@ public:
        ///
        void readSpacing(LyXLex &);
        ///
-       string const & name() const { return name_; }
+       string const & name() const;
        ///
-       void setName(string const & n) { name_ = n; }
+       void setName(string const & n);
        ///
-       string const & obsoleted_by() const { return obsoleted_by_; }
+       string const & obsoleted_by() const;
+       ///
+       string const & depends_on() const;
        ///
        string const & latexname() const { return latexname_; }
        ///
@@ -174,7 +175,7 @@ public:
                return latextype == LATEX_PARAGRAPH;
        }
        ///
-       bool isCommand() const { 
+       bool isCommand() const {
                return latextype == LATEX_COMMAND;
        }
        ///
@@ -187,16 +188,25 @@ public:
        LYX_LATEX_TYPES latextype;
        /// Does this object belong in the title part of the document?
        bool intitle;
+       /// Does this layout allow for an optional parameter?
+       int optionalargs;
+
 private:
        /// Name of the layout/paragraph environment
        string name_;
 
        /** Name of an layout that has replaced this layout.
            This is used to rename a layout, while keeping backward
-           compatibility 
+           compatibility
        */
        string obsoleted_by_;
 
+       /** Name of an layout which preamble must come before this one
+           This is used when the preamble snippet uses macros defined in
+           another preamble
+        */
+       string depends_on_;
+
        /// LaTeX name for environment
        string latexname_;