2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
33 bool Read(LyXLex &, LyXTextClass const &);
35 void readAlign(LyXLex &);
37 void readAlignPossible(LyXLex &);
39 void readLabelType(LyXLex &);
41 void readEndLabelType(LyXLex &);
43 void readMargin(LyXLex &);
45 void readLatexType(LyXLex &);
47 void readSpacing(LyXLex &);
49 string const & name() const;
51 void setName(string const & n);
53 string const & obsoleted_by() const;
55 string const & depends_on() const;
57 string const & latexname() const { return latexname_; }
59 string const & labelstring() const { return labelstring_; }
61 string const & endlabelstring() const { return endlabelstring_; }
63 string const & preamble() const { return preamble_; }
65 string const & latexparam() const { return latexparam_; }
67 string const & labelstring_appendix() const {
68 return labelstring_appendix_;
70 /** Default font for this layout/environment.
71 The main font for this kind of environment. If an attribute has
72 LyXFont::INHERITED_*, it means that the value is specified by
73 the defaultfont for the entire layout. If we are nested, the
74 font is inherited from the font in the environment one level
75 up until the font is resolved. The values LyXFont::IGNORE_*
76 and LyXFont::TOGGLE are illegal here.
80 /** Default font for labels.
81 Interpretation the same as for font above
85 /** Resolved version of the font for this layout/environment.
86 This is a resolved version the default font. The font is resolved
87 against the defaultfont of the entire layout.
91 /** Resolved version of the font used for labels.
92 This is a resolved version the label font. The font is resolved
93 against the defaultfont of the entire layout.
97 /// Text that dictates how wide the left margin is on the screen
100 /// Text that dictates how wide the right margin is on the screen
103 /// Text that dictates how much space to leave after a potential label
106 /// Text that dictates how much space to leave before a potential label
109 /** Text that dictates the width of the indentation of
127 float labelbottomsep;
139 LyXAlignment alignpossible;
142 char labeltype; // add approp. type
145 LYX_END_LABEL_TYPES endlabeltype;
148 LYX_MARGIN_TYPE margintype;
157 bool newline_allowed;
168 /** true when the fragile commands in the paragraph need to be
171 /// true when empty paragraphs should be kept.
174 bool isParagraph() const {
175 return latextype == LATEX_PARAGRAPH;
178 bool isCommand() const {
179 return latextype == LATEX_COMMAND;
182 bool isEnvironment() const {
183 return (latextype == LATEX_ENVIRONMENT
184 || latextype == LATEX_ITEM_ENVIRONMENT
185 || latextype == LATEX_LIST_ENVIRONMENT);
187 /// Type of LaTeX object
188 LYX_LATEX_TYPES latextype;
189 /// Does this object belong in the title part of the document?
191 /// Does this layout allow for an optional parameter?
195 /// Name of the layout/paragraph environment
198 /** Name of an layout that has replaced this layout.
199 This is used to rename a layout, while keeping backward
202 string obsoleted_by_;
204 /** Name of an layout which preamble must come before this one
205 This is used when the preamble snippet uses macros defined in
210 /// LaTeX name for environment
213 /// Label string. "Abstract", "Reference", "Caption"...
217 string endlabelstring_;
219 /// Label string inside appendix. "Appendix", ...
220 string labelstring_appendix_;
222 /// LaTeX parameter for environment
225 /// Macro definitions needed for this layout