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 * ====================================================== */
29 bool Read(LyXLex &, LyXTextClass const &);
31 void readAlign(LyXLex &);
33 void readAlignPossible(LyXLex &);
35 void readLabelType(LyXLex &);
37 void readEndLabelType(LyXLex &);
39 void readMargin(LyXLex &);
41 void readLatexType(LyXLex &);
43 void readSpacing(LyXLex &);
45 string const & name() const;
47 void setName(string const & n);
49 string const & obsoleted_by() const;
51 string const & depends_on() const;
53 string const & latexname() const { return latexname_; }
55 string const & labelstring() const { return labelstring_; }
57 string const & endlabelstring() const { return endlabelstring_; }
59 string const & preamble() const { return preamble_; }
61 string const & latexparam() const { return latexparam_; }
63 string const & labelstring_appendix() const {
64 return labelstring_appendix_;
66 /** Default font for this layout/environment.
67 The main font for this kind of environment. If an attribute has
68 LyXFont::INHERITED_*, it means that the value is specified by
69 the defaultfont for the entire layout. If we are nested, the
70 font is inherited from the font in the environment one level
71 up until the font is resolved. The values LyXFont::IGNORE_*
72 and LyXFont::TOGGLE are illegal here.
76 /** Default font for labels.
77 Interpretation the same as for font above
81 /** Resolved version of the font for this layout/environment.
82 This is a resolved version the default font. The font is resolved
83 against the defaultfont of the entire layout.
87 /** Resolved version of the font used for labels.
88 This is a resolved version the label font. The font is resolved
89 against the defaultfont of the entire layout.
93 /// Text that dictates how wide the left margin is on the screen
96 /// 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
102 /// Text that dictates how much space to leave before a potential label
105 /** Text that dictates the width of the indentation of
123 float labelbottomsep;
135 LyXAlignment alignpossible;
138 char labeltype; // add approp. type
141 LYX_END_LABEL_TYPES endlabeltype;
144 LYX_MARGIN_TYPE margintype;
153 bool newline_allowed;
164 /** true when the fragile commands in the paragraph need to be
167 /// true when empty paragraphs should be kept.
170 bool isParagraph() const {
171 return latextype == LATEX_PARAGRAPH;
174 bool isCommand() const {
175 return latextype == LATEX_COMMAND;
178 bool isEnvironment() const {
179 return (latextype == LATEX_ENVIRONMENT
180 || latextype == LATEX_BIB_ENVIRONMENT
181 || latextype == LATEX_ITEM_ENVIRONMENT
182 || latextype == LATEX_LIST_ENVIRONMENT);
184 /// Type of LaTeX object
185 LYX_LATEX_TYPES latextype;
186 /// Does this object belong in the title part of the document?
188 /// Does this layout allow for an optional parameter?
192 /// Name of the layout/paragraph environment
195 /** Name of an layout that has replaced this layout.
196 This is used to rename a layout, while keeping backward
199 string obsoleted_by_;
201 /** Name of an layout which preamble must come before this one
202 This is used when the preamble snippet uses macros defined in
207 /// LaTeX name for environment
210 /// Label string. "Abstract", "Reference", "Caption"...
214 string endlabelstring_;
216 /// Label string inside appendix. "Appendix", ...
217 string labelstring_appendix_;
219 /// LaTeX parameter for environment
222 /// Macro definitions needed for this layout