4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Martin Vermeer
10 * Full author contact details are available in file CREDITS.
13 #ifndef INSET_LAYOUT_H
14 #define INSET_LAYOUT_H
16 #include "ColorCode.h"
19 #include "support/docstring.h"
35 enum InsetDecoration {
56 bool read(Lexer & lexrc, TextClass const & tclass);
58 docstring name() const { return name_; };
60 void setName(docstring const & n) { name_ = n; }
62 InsetLyXType lyxtype() const { return lyxtype_; };
64 docstring labelstring() const { return labelstring_; };
66 InsetDecoration decoration() const { return decoration_; };
68 InsetLaTeXType latextype() const { return latextype_; };
70 std::string latexname() const { return latexname_; };
72 std::string latexparam() const { return latexparam_; };
74 FontInfo font() const { return font_; };
76 FontInfo labelfont() const { return labelfont_; };
78 ColorCode bgcolor() const { return bgcolor_; };
80 docstring preamble() const { return preamble_; };
82 std::string const & htmltag() const { return htmltag_; }
84 std::string const & htmlattr() const { return htmlattr_; }
86 docstring htmlstyle() const { return htmlstyle_; }
88 docstring htmlpreamble() const { return htmlpreamble_; }
90 std::set<std::string> requires() const { return requires_; };
92 bool isMultiPar() const { return multipar_; };
94 bool forcePlainLayout() const { return forceplain_; }
96 bool allowParagraphCustomization() const { return custompars_; }
98 bool isPassThru() const { return passthru_; };
100 bool isNeedProtect() const { return needprotect_; };
102 bool isFreeSpacing() const { return freespacing_; };
104 bool isKeepEmpty() const { return keepempty_; };
106 bool isForceLtr() const { return forceltr_; };
108 bool isInToc() const { return intoc_; };
113 * This is only used (at present) to decide where to put them on the menus.
114 * Values are 'charstyle', 'custom' (things that by default look like a
115 * footnote), 'element' (docbook), 'standard'.
117 InsetLyXType lyxtype_;
119 docstring labelstring_;
121 InsetDecoration decoration_;
123 InsetLaTeXType latextype_;
125 std::string latexname_;
127 std::string latexparam_;
137 std::string htmltag_;
139 std::string htmlattr_;
141 docstring htmlstyle_;
143 docstring htmlpreamble_;
145 std::set<std::string> requires_;
162 /// should the contents be written to TOC strings?
167 InsetLayout::InsetLyXType translateLyXType(std::string const & str);