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 docstring counter() const { return counter_; }
84 std::string const & htmlinnertag() const { return htmlinnertag_; }
86 std::string const & htmlinnerattr() const { return htmlinnerattr_; }
88 std::string const & htmltag() const { return htmltag_; }
90 std::string const & htmlattr() const { return htmlattr_; }
92 std::string const & htmllabel() const { return htmllabel_; }
94 docstring htmlstyle() const { return htmlstyle_; }
96 docstring htmlpreamble() const { return htmlpreamble_; }
98 std::set<std::string> requires() const { return requires_; };
100 bool isMultiPar() const { return multipar_; };
102 bool forcePlainLayout() const { return forceplain_; }
104 bool allowParagraphCustomization() const { return custompars_; }
106 bool isPassThru() const { return passthru_; };
108 bool isNeedProtect() const { return needprotect_; };
110 bool isFreeSpacing() const { return freespacing_; };
112 bool isKeepEmpty() const { return keepempty_; };
114 bool forceLTR() const { return forceltr_; };
116 bool isInToc() const { return intoc_; };
121 * This is only used (at present) to decide where to put them on the menus.
122 * Values are 'charstyle', 'custom' (things that by default look like a
123 * footnote), 'element' (docbook), 'standard'.
125 InsetLyXType lyxtype_;
127 docstring labelstring_;
129 InsetDecoration decoration_;
131 InsetLaTeXType latextype_;
133 std::string latexname_;
135 std::string latexparam_;
147 std::string htmltag_;
149 std::string htmlattr_;
151 std::string htmlinnertag_;
153 std::string htmlinnerattr_;
155 std::string htmllabel_;
157 docstring htmlstyle_;
159 docstring htmlpreamble_;
161 std::set<std::string> requires_;
178 /// should the contents be written to TOC strings?
183 InsetLayout::InsetLyXType translateLyXType(std::string const & str);