X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayout.h;h=b7c6e708cd1f1c02db73fb28ec3a8b6ce212ee16;hb=3d4076b598deb18660e50ec9c327efc3b15f15d0;hp=f8c1ed46f9f13e65ce1a868a6f28a01d728ab8a3;hpb=1500e44cbad09d0d2aecdd1511f69ea5ae084633;p=lyx.git diff --git a/src/Layout.h b/src/Layout.h index f8c1ed46f9..b7c6e708cd 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -75,6 +75,8 @@ public: void readSpacing(Lexer &); /// void readArgument(Lexer &); + /// Write a layout definition in utf8 encoding + void write(std::ostream &) const; /// docstring const & name() const { return name_; } /// @@ -86,24 +88,32 @@ public: /// std::string const & latexname() const { return latexname_; } /// - void setLatexName(std::string const & n) { latexname_ = n; } + std::string const & itemcommand() const { return itemcommand_; } /// The arguments of this layout struct latexarg { docstring labelstring; + docstring menustring; bool mandatory; docstring ldelim; docstring rdelim; + docstring defaultarg; + docstring presetarg; docstring tooltip; std::string requires; std::string decoration; FontInfo font; FontInfo labelfont; + bool autoinsert; }; /// typedef std::map 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; @@ -171,6 +181,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; @@ -323,6 +351,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 @@ -402,6 +432,8 @@ private: /// LaTeXArgMap latexargs_; /// + LaTeXArgMap postcommandargs_; + /// LaTeXArgMap itemargs_; };