4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
11 * Full author contact details are available in file CREDITS.
20 #include "support/std_string.h"
31 bool Read(LyXLex &, LyXTextClass const &);
33 void readAlign(LyXLex &);
35 void readAlignPossible(LyXLex &);
37 void readLabelType(LyXLex &);
39 void readEndLabelType(LyXLex &);
41 void readMargin(LyXLex &);
43 void readLatexType(LyXLex &);
45 void readSpacing(LyXLex &);
47 string const & name() const;
49 void setName(string const & n);
51 string const & obsoleted_by() const;
53 string const & depends_on() const;
55 string const & latexname() const { return latexname_; }
57 string const & labelstring() const { return labelstring_; }
59 string const & endlabelstring() const { return endlabelstring_; }
61 string const & preamble() const { return preamble_; }
63 string const & latexparam() const { return latexparam_; }
65 string const & labelstring_appendix() const {
66 return labelstring_appendix_;
68 /** Default font for this layout/environment.
69 The main font for this kind of environment. If an attribute has
70 LyXFont::INHERITED_*, it means that the value is specified by
71 the defaultfont for the entire layout. If we are nested, the
72 font is inherited from the font in the environment one level
73 up until the font is resolved. The values LyXFont::IGNORE_*
74 and LyXFont::TOGGLE are illegal here.
78 /** Default font for labels.
79 Interpretation the same as for font above
83 /** Resolved version of the font for this layout/environment.
84 This is a resolved version the default font. The font is resolved
85 against the defaultfont of the entire layout.
89 /** Resolved version of the font used for labels.
90 This is a resolved version the label font. The font is resolved
91 against the defaultfont of the entire layout.
95 /// Text that dictates how wide the left margin is on the screen
97 /// Text that dictates how wide the right margin is on the screen
99 /// Text that dictates how much space to leave after a potential label
101 /// Text that dictates how much space to leave before a potential label
103 /// Text that dictates the width of the indentation of indented pars
114 float labelbottomsep;
122 LyXAlignment alignpossible;
124 LYX_LABEL_TYPES labeltype;
126 LYX_END_LABEL_TYPES endlabeltype;
128 LYX_MARGIN_TYPE margintype;
134 bool newline_allowed;
145 /// for new environment insets
147 /// for new environment insets
149 /// for new environment insets
150 string latexparagraph;
152 /** true when the fragile commands in the paragraph need to be
155 /// true when empty paragraphs should be kept.
158 bool isParagraph() const {
159 return latextype == LATEX_PARAGRAPH;
162 bool isCommand() const {
163 return latextype == LATEX_COMMAND;
166 bool isEnvironment() const {
167 return (latextype == LATEX_ENVIRONMENT
168 || latextype == LATEX_BIB_ENVIRONMENT
169 || latextype == LATEX_ITEM_ENVIRONMENT
170 || latextype == LATEX_LIST_ENVIRONMENT);
172 /// Type of LaTeX object
173 LYX_LATEX_TYPES latextype;
174 /// Does this object belong in the title part of the document?
176 /// Does this layout allow for an optional parameter?
178 /// Which counter to step
182 /// Name of the layout/paragraph environment
185 /** Name of an layout that has replaced this layout.
186 This is used to rename a layout, while keeping backward
189 string obsoleted_by_;
191 /** Name of an layout which preamble must come before this one
192 This is used when the preamble snippet uses macros defined in
197 /// LaTeX name for environment
199 /// Label string. "Abstract", "Reference", "Caption"...
202 string endlabelstring_;
203 /// Label string inside appendix. "Appendix", ...
204 string labelstring_appendix_;
205 /// LaTeX parameter for environment
207 /// Macro definitions needed for this layout