X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLayout.h;h=cf5647dbc39b1132e8719acbf9573b7f15197b18;hb=cfeddb92;hp=4f5a6b89e3f6e27cb21e526fc204868ba631df61;hpb=9c4929ca406091267dafa40f5e083a27db046bf6;p=lyx.git diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 4f5a6b89e3..cf5647dbc3 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -85,12 +85,21 @@ public: FontInfo labelfont() const { return labelfont_; } /// ColorCode bgcolor() const { return bgcolor_; } + /// + Layout::LaTeXArgMap const & latexargs() const { return latexargs_; } /// - Layout::LaTeXArgMap latexargs() const { return latexargs_; } + Layout::LaTeXArgMap const & postcommandargs() const { return postcommandargs_; } + /// Returns latexargs() + postcommandargs(). + /// But note that it returns a *copy*, not a reference, so do not do + /// anything like: + /// Layout::LaTeXArgMap::iterator it = args().begin(); + /// Layout::LaTeXArgMap::iterator en = args().end(); + /// Those are iterators for different containers. + Layout::LaTeXArgMap args() const; /// - unsigned int numOptArgs() const; + unsigned int optArgs() const; /// - unsigned int numRequiredArgs() const; + unsigned int requiredArgs() const; /// docstring preamble() const { return preamble_; } /// Get language dependent macro definitions needed for this inset @@ -155,6 +164,8 @@ public: /// bool forceLTR() const { return forceltr_; } /// + bool forceOwnlines() const { return forceownlines_; } + /// bool isInToc() const { return intoc_; } /// bool spellcheck() const { return spellcheck_; } @@ -162,14 +173,16 @@ public: bool resetsFont() const { return resetsfont_; } /// bool isDisplay() const { return display_; } + /// + bool forcelocalfontswitch() const { return forcelocalfontswitch_; } + /// + docstring const & obsoleted_by() const { return obsoleted_by_; } private: /// void makeDefaultCSS() const; /// std::string defaultCSSClass() const; /// - std::string defaultCSSLabelClass() const { return defaultCSSClass() + "_label"; } - /// void readArgument(Lexer &); /// docstring name_; @@ -253,6 +266,8 @@ private: /// bool forceltr_; /// + bool forceownlines_; + /// bool needprotect_; /// should the contents be written to TOC strings? bool intoc_; @@ -263,11 +278,21 @@ private: /// bool display_; /// + bool forcelocalfontswitch_; + /** Name of an insetlayout that has replaced this insetlayout. + This is used to rename an insetlayout, while keeping backward + compatibility + */ + docstring obsoleted_by_; + /// Layout::LaTeXArgMap latexargs_; + /// + Layout::LaTeXArgMap postcommandargs_; }; /// InsetLayout::InsetLyXType translateLyXType(std::string const & str); +InsetLayout::InsetDecoration translateDecoration(std::string const & str); } // namespace lyx