]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetLayout.h
InsetIndex: revamp IndexEntry to handle both legacy and modern index insets; simplify...
[features.git] / src / insets / InsetLayout.h
index 88143d5faac31df9539a98e78ac5a79a8735c7c5..ed3c9a96ba830b1959fedc559a5fecb388795a4e 100644 (file)
@@ -5,7 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Martin Vermeer
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -27,34 +27,36 @@ namespace lyx {
 class Lexer;
 class TextClass;
 
+
+enum class InsetDecoration : int {
+       CLASSIC,
+       MINIMALISTIC,
+       CONGLOMERATE,
+       DEFAULT
+};
+
+enum class InsetLyXType : int {
+       NOLYXTYPE,
+       CHARSTYLE,
+       CUSTOM,
+       END,
+       STANDARD
+};
+
+enum class InsetLaTeXType : int {
+       NOLATEXTYPE,
+       COMMAND,
+       ENVIRONMENT,
+       ILT_ERROR
+};
+
+
 ///
 class InsetLayout {
 public:
        ///
        InsetLayout() { labelfont_.setColor(Color_error); }
        ///
-       enum InsetDecoration {
-               CLASSIC,
-               MINIMALISTIC,
-               CONGLOMERATE,
-               DEFAULT
-       };
-       ///
-       enum InsetLyXType {
-               NOLYXTYPE,
-               CHARSTYLE,
-               CUSTOM,
-               END,
-               STANDARD
-       };
-       ///
-       enum InsetLaTeXType {
-               NOLATEXTYPE,
-               COMMAND,
-               ENVIRONMENT,
-               ILT_ERROR
-       };
-       ///
        bool read(Lexer & lexrc, TextClass const & tclass,
                        bool validating = false);
        ///
@@ -154,6 +156,12 @@ public:
        ///
        std::string docbookattr() const { return docbookattr_; }
        ///
+       std::string docbookinnertag() const { return docbookinnertag_; }
+       ///
+       std::string docbookinnertagtype() const;
+       ///
+       std::string docbookinnerattr() const { return docbookinnerattr_; }
+       ///
        std::string const & docbookininfo() const;
        ///
        bool docbooksection() const { return docbooksection_; }
@@ -162,6 +170,8 @@ public:
        ///
        bool docbookargumentbeforemaintag() const { return docbookargumentbeforemaintag_; }
        ///
+       bool docbookargumentaftermaintag() const { return docbookargumentaftermaintag_; }
+       ///
        std::string docbookwrappertag() const { return docbookwrappertag_; }
        ///
        std::string docbookwrappertagtype() const;
@@ -180,6 +190,10 @@ public:
        ///
        std::string docbookitemattr() const { return docbookitemattr_; }
        ///
+       bool docbooknofontinside() const { return docbooknofontinside_; }
+       ///
+       bool docbookrenderasimage() const { return docbookrenderasimage_; }
+       ///
        std::set<std::string> required() const { return required_; }
        ///
        bool isMultiPar() const { return multipar_; }
@@ -246,7 +260,7 @@ private:
                * Values are 'charstyle', 'custom' (things that by default look like a
                * footnote), 'standard'.
                */
-       InsetLyXType lyxtype_ = STANDARD;
+       InsetLyXType lyxtype_ = InsetLyXType::STANDARD;
        ///
        docstring labelstring_ = from_ascii("UNDEFINED");
        ///
@@ -254,9 +268,9 @@ private:
        ///
        bool contentaslabel_ = false;
        ///
-       InsetDecoration decoration_ = DEFAULT;
+       InsetDecoration decoration_ = InsetDecoration::DEFAULT;
        ///
-       InsetLaTeXType latextype_ = NOLATEXTYPE;
+       InsetLaTeXType latextype_ = InsetLaTeXType::NOLATEXTYPE;
        ///
        std::string latexname_;
        ///
@@ -313,11 +327,19 @@ private:
        ///
        std::string docbookattr_;
        ///
+       std::string docbookinnertag_;
+       ///
+       mutable std::string docbookinnertagtype_;
+       ///
+       std::string docbookinnerattr_;
+       ///
        mutable std::string docbookininfo_;
        ///
        bool docbooknotinpara_ = false;
        ///
        bool docbookargumentbeforemaintag_ = false;
+    ///
+    bool docbookargumentaftermaintag_ = false;
        ///
        bool docbooksection_ = false;
        ///
@@ -339,6 +361,10 @@ private:
        ///
        std::string docbookitemwrapperattr_;
        ///
+       bool docbooknofontinside_ = false;
+       ///
+       bool docbookrenderasimage_ = false;
+       ///
        std::set<std::string> required_;
        ///
        bool multipar_ = true;
@@ -400,8 +426,8 @@ private:
 };
 
 ///
-InsetLayout::InsetLyXType translateLyXType(std::string const & str);
-InsetLayout::InsetDecoration translateDecoration(std::string const & str);
+InsetLyXType translateLyXType(std::string const & str);
+InsetDecoration translateDecoration(std::string const & str);
 
 } // namespace lyx