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 & 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
98 /// Text that dictates how wide the right margin is on the screen
101 /// Text that dictates how much space to leave after a potential label
104 /// Text that dictates how much space to leave before a potential label
107 /** Text that dictates the width of the indentation of
125 float labelbottomsep;
137 LyXAlignment alignpossible;
140 char labeltype; // add approp. type
143 LYX_END_LABEL_TYPES endlabeltype;
146 LYX_MARGIN_TYPE margintype;
155 bool newline_allowed;
166 /** true when the fragile commands in the paragraph need to be
169 /// true when empty paragraphs should be kept.
172 bool isParagraph() const {
173 return latextype == LATEX_PARAGRAPH;
176 bool isCommand() const {
177 return latextype == LATEX_COMMAND;
180 bool isEnvironment() const {
181 return (latextype == LATEX_ENVIRONMENT
182 || latextype == LATEX_ITEM_ENVIRONMENT
183 || latextype == LATEX_LIST_ENVIRONMENT);
185 /// Type of LaTeX object
186 LYX_LATEX_TYPES latextype;
187 /// Does this object belong in the title part of the document?
190 /// Name of the layout/paragraph environment
193 /** Name of an layout that has replaced this layout.
194 This is used to rename a layout, while keeping backward
197 string obsoleted_by_;
199 /// LaTeX name for environment
202 /// Label string. "Abstract", "Reference", "Caption"...
206 string endlabelstring_;
208 /// Label string inside appendix. "Appendix", ...
209 string labelstring_appendix_;
211 /// LaTeX parameter for environment
214 /// Macro definitions needed for this layout