]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.h
Cmake build: Creating a define for a header file found
[lyx.git] / src / Layout.h
index 45bdf460bf7a0eb3245325a80bc17bda96d15df0..d84ca372b62d2cb74ea7ec37440a7e081672ad42 100644 (file)
@@ -86,21 +86,35 @@ public:
        ///
        std::string const & latexname() const { return latexname_; }
        ///
+       std::string const & itemcommand() const { return itemcommand_; }
+       ///
        void setLatexName(std::string const & n) { latexname_ = n; }
        /// The arguments of this layout
        struct latexarg {
                docstring labelstring;
+               docstring menustring;
                bool mandatory;
                docstring ldelim;
                docstring rdelim;
+               docstring presetarg;
                docstring tooltip;
                std::string requires;
+               std::string decoration;
+               FontInfo font;
+               FontInfo labelfont;
+               bool autoinsert;
        };
        ///
-       typedef std::map<unsigned int, latexarg> LaTeXArgMap;
+       typedef std::map<std::string, latexarg> LaTeXArgMap;
+       ///
+       LaTeXArgMap args() const;
        ///
        LaTeXArgMap const & latexargs() const { return latexargs_; }
        ///
+       LaTeXArgMap const & postcommandargs() const { return postcommandargs_; }
+       ///
+       LaTeXArgMap const & itemargs() const { return itemargs_; }
+       ///
        int optArgs() const;
        ///
        int requiredArgs() const;
@@ -166,6 +180,24 @@ public:
                        || latextype == LATEX_ITEM_ENVIRONMENT
                        || latextype == LATEX_LIST_ENVIRONMENT;
        }
+       /// Is this the kind of layout in which adjacent paragraphs
+       /// are handled as one group?
+       bool isParagraphGroup() const {
+       return latextype == LATEX_ENVIRONMENT
+               || latextype == LATEX_BIB_ENVIRONMENT;
+       }
+       ///
+       bool labelIsInline() const {
+               return labeltype == LABEL_STATIC
+                       || labeltype == LABEL_SENSITIVE
+                 || labeltype == LABEL_ENUMERATE
+                       || labeltype == LABEL_ITEMIZE;
+       }
+       bool labelIsAbove() const {
+               return labeltype == LABEL_ABOVE
+                       || labeltype == LABEL_CENTERED
+                 || labeltype == LABEL_BIBLIO;
+       }
 
        ///
        bool operator==(Layout const &) const;
@@ -318,6 +350,8 @@ private:
        docstring labelstring_appendix_;
        /// LaTeX parameter for environment
        std::string latexparam_;
+       /// Item command in lists
+       std::string itemcommand_;
        /// Left delimiter of the content
        docstring leftdelim_;
        /// Right delimiter of the content
@@ -396,6 +430,10 @@ private:
        std::set<std::string> requires_;
        ///
        LaTeXArgMap latexargs_;
+       ///
+       LaTeXArgMap postcommandargs_;
+       ///
+       LaTeXArgMap itemargs_;
 };
 
 } // namespace lyx