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
95 /// Text that dictates how wide the right margin is on the screen
97 /// Text that dictates how much space to leave after a potential label
99 /// Text that dictates how much space to leave before a potential label
101 /// Text that dictates the width of the indentation of indented pars
112 float labelbottomsep;
120 LyXAlignment alignpossible;
122 char labeltype; // add approp. type
124 LYX_END_LABEL_TYPES endlabeltype;
126 LYX_MARGIN_TYPE margintype;
132 bool newline_allowed;
141 /// for new environment insets
143 /// for new environment insets
145 /// for new environment insets
146 string latexparagraph;
148 /** true when the fragile commands in the paragraph need to be
151 /// true when empty paragraphs should be kept.
154 bool isParagraph() const {
155 return latextype == LATEX_PARAGRAPH;
158 bool isCommand() const {
159 return latextype == LATEX_COMMAND;
162 bool isEnvironment() const {
163 return (latextype == LATEX_ENVIRONMENT
164 || latextype == LATEX_BIB_ENVIRONMENT
165 || latextype == LATEX_ITEM_ENVIRONMENT
166 || latextype == LATEX_LIST_ENVIRONMENT);
168 /// Type of LaTeX object
169 LYX_LATEX_TYPES latextype;
170 /// Does this object belong in the title part of the document?
172 /// Does this layout allow for an optional parameter?
176 /// Name of the layout/paragraph environment
179 /** Name of an layout that has replaced this layout.
180 This is used to rename a layout, while keeping backward
183 string obsoleted_by_;
185 /** Name of an layout which preamble must come before this one
186 This is used when the preamble snippet uses macros defined in
191 /// LaTeX name for environment
193 /// Label string. "Abstract", "Reference", "Caption"...
196 string endlabelstring_;
197 /// Label string inside appendix. "Appendix", ...
198 string labelstring_appendix_;
199 /// LaTeX parameter for environment
201 /// Macro definitions needed for this layout