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 * ====================================================== */
34 bool Read (LyXLex &, LyXTextClass const &);
36 void readAlign(LyXLex &);
38 void readAlignPossible(LyXLex &);
40 void readLabelType(LyXLex &);
42 void readEndLabelType(LyXLex &);
44 void readMargin(LyXLex &);
46 void readLatexType(LyXLex &);
48 void readSpacing(LyXLex &);
50 string const & name() const { return name_; }
52 void setName(string const & n) { name_ = n; }
54 string const & obsoleted_by() const { return obsoleted_by_; }
56 string const & latexname() const { return latexname_; }
58 string const & labelstring() const { return labelstring_; }
60 string const & endlabelstring() const { return endlabelstring_; }
62 string const & preamble() const { return preamble_; }
64 string const & latexparam() const { return latexparam_; }
66 string const & labelstring_appendix() const {
67 return labelstring_appendix_;
69 /** Default font for this layout/environment.
70 The main font for this kind of environment. If an attribute has
71 LyXFont::INHERITED_*, it means that the value is specified by
72 the defaultfont for the entire layout. If we are nested, the
73 font is inherited from the font in the environment one level
74 up until the font is resolved. The values LyXFont::IGNORE_*
75 and LyXFont::TOGGLE are illegal here.
79 /** Default font for labels.
80 Interpretation the same as for font above
84 /** Resolved version of the font for this layout/environment.
85 This is a resolved version the default font. The font is resolved
86 against the defaultfont of the entire layout.
90 /** Resolved version of the font used for labels.
91 This is a resolved version the label font. The font is resolved
92 against the defaultfont of the entire layout.
96 /// Text that dictates how wide the left margin is on the screen
99 /// Text that dictates how wide the right margin is on the screen
102 /// Text that dictates how much space to leave after a potential label
105 /// Text that dictates how much space to leave before a potential label
108 /** Text that dictates the width of the indentation of
126 float labelbottomsep;
138 LyXAlignment alignpossible;
141 char labeltype; // add approp. type
144 LYX_END_LABEL_TYPES endlabeltype;
147 LYX_MARGIN_TYPE margintype;
156 bool newline_allowed;
167 /** true when the fragile commands in the paragraph need to be
170 /// true when empty paragraphs should be kept.
173 bool isParagraph() const {
174 return latextype == LATEX_PARAGRAPH;
177 bool isCommand() const {
178 return latextype == LATEX_COMMAND;
181 bool isEnvironment() const {
182 return (latextype == LATEX_ENVIRONMENT
183 || latextype == LATEX_ITEM_ENVIRONMENT
184 || latextype == LATEX_LIST_ENVIRONMENT);
186 /// Type of LaTeX object
187 LYX_LATEX_TYPES latextype;
188 /// Does this object belong in the title part of the document?
191 /// Name of the layout/paragraph environment
194 /** Name of an layout that has replaced this layout.
195 This is used to rename a layout, while keeping backward
198 string obsoleted_by_;
200 /// LaTeX name for environment
203 /// Label string. "Abstract", "Reference", "Caption"...
207 string endlabelstring_;
209 /// Label string inside appendix. "Appendix", ...
210 string labelstring_appendix_;
212 /// LaTeX parameter for environment
215 /// Macro definitions needed for this layout