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 {
58 bool read(Lexer & lexrc, TextClass const & tclass);
60 docstring name() const { return name_; }
62 void setName(docstring const & n) { name_ = n; }
64 InsetLyXType lyxtype() const { return lyxtype_; }
66 docstring labelstring() const { return labelstring_; }
68 InsetDecoration decoration() const { return decoration_; }
70 InsetLaTeXType latextype() const { return latextype_; }
72 std::string latexname() const { return latexname_; }
74 std::string latexparam() const { return latexparam_; }
76 FontInfo font() const { return font_; }
78 FontInfo labelfont() const { return labelfont_; }
80 ColorCode bgcolor() const { return bgcolor_; }
82 docstring preamble() const { return preamble_; }
84 docstring counter() const { return counter_; }
86 std::string const & htmlinnertag() const { return htmlinnertag_; }
88 std::string const & htmlinnerattr() const { return htmlinnerattr_; }
90 std::string const & htmltag() const { return htmltag_; }
92 std::string const & htmlattr() const { return htmlattr_; }
94 std::string const & htmllabel() const { return htmllabel_; }
96 docstring htmlstyle() const { return htmlstyle_; }
98 docstring htmlpreamble() const { return htmlpreamble_; }
100 bool htmlisblock() const { return htmlisblock_; }
102 std::set<std::string> requires() const { return requires_; };
104 bool isMultiPar() const { return multipar_; };
106 bool forcePlainLayout() const { return forceplain_; }
108 bool allowParagraphCustomization() const { return custompars_; }
110 bool isPassThru() const { return passthru_; };
112 bool isNeedProtect() const { return needprotect_; };
114 bool isFreeSpacing() const { return freespacing_; };
116 bool isKeepEmpty() const { return keepempty_; };
118 bool forceLTR() const { return forceltr_; };
120 bool isInToc() const { return intoc_; };
125 * This is only used (at present) to decide where to put them on the menus.
126 * Values are 'charstyle', 'custom' (things that by default look like a
127 * footnote), 'element' (docbook), 'standard'.
129 InsetLyXType lyxtype_;
131 docstring labelstring_;
133 InsetDecoration decoration_;
135 InsetLaTeXType latextype_;
137 std::string latexname_;
139 std::string latexparam_;
150 /// The tag enclosing all the material in this inset.
151 std::string htmltag_;
152 /// Additional attributes for inclusion with the start tag.
153 std::string htmlattr_;
154 /// Tag for individual paragraphs in the inset.
155 std::string htmlinnertag_;
156 /// Attributes for that tag.
157 std::string htmlinnerattr_;
158 /// A label for this environment, possibly including a reference
159 /// to a counter. E.g., for footnote, it might be:
160 /// <span class='notenum'>\arabic{footnote}</span>
161 std::string htmllabel_;
162 /// CSS associated with this inset.
163 docstring htmlstyle_;
164 /// Additional material for the header.
165 docstring htmlpreamble_;
166 /// Whether this inset represents a "block" of material, i.e., a set
167 /// of paragraphs of its own (true), or should be run into the previous
168 /// paragraph (false). Examples:
169 /// For branches, this is false.
170 /// For footnotes, this is true.
171 /// Defaults to true.
174 std::set<std::string> requires_;
191 /// should the contents be written to TOC strings?
196 InsetLayout::InsetLyXType translateLyXType(std::string const & str);