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 * ====================================================== */
12 #ifndef BUFFERPARAMS_H
13 #define BUFFERPARAMS_H
19 #include "lyxtextclass.h"
20 #include "LaTeXFeatures.h"
24 #include "insets/insetquotes.h"
26 #include <boost/array.hpp>
34 /** Buffer parameters.
35 This class contains all the parameters for this a buffer uses. Some
36 work needs to be done on this class to make it nice. Now everything
72 enum VMARGIN_PAPER_TYPE {
104 enum PAPER_ORIENTATION {
106 ORIENTATION_PORTRAIT,
108 ORIENTATION_LANDSCAPE
113 /// read a header token, if unrecognised, return it or an unknown class name
114 string const readToken(LyXLex & lex, string const & token);
117 void writeFile(std::ostream &) const;
120 void writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
123 void setPaperStuff();
126 void useClassDefaults();
129 bool hasClassDefaults() const;
132 VSpace const & getDefSkip() const { return defskip; }
135 void setDefSkip(VSpace const & vs) { defskip = vs; }
137 /** Wether paragraphs are separated by using a indent like in
138 articles or by using a little skip like in letters.
140 PARSEP paragraph_separation;
142 InsetQuotes::quote_language quotes_language;
144 InsetQuotes::quote_times quotes_times;
148 lyx::textclass_type textclass;
150 LyXTextClass const & getLyXTextClass() const;
152 /* this are for the PaperLayout */
153 /// the general papersize (papersize2 or paperpackage
154 char papersize; // add apprip. signedness
155 /// the selected Geometry papersize
156 char papersize2; // add approp. signedness
157 /// a special paperpackage .sty-file
158 char paperpackage; // add approp. signedness
160 PAPER_ORIENTATION orientation; // add approp. signedness
182 /* some LaTeX options */
183 /// The graphics driver
184 string graphicsDriver;
194 Language const * language;
202 string float_placement;
204 unsigned int columns;
206 LyXTextClass::PageSides sides;
210 boost::array<Bullet, 4> temp_bullets;
212 boost::array<Bullet, 4> user_defined_bullets;
214 void readPreamble(LyXLex &);
216 void readLanguage(LyXLex &);
218 void readGraphicsDriver(LyXLex &);
220 /// use AMS package, not, or auto
230 bool use_numerical_citations;
231 /// revision tracking for this buffer ?
232 bool tracking_changes;
233 /// Time ago we agreed that this was a buffer property [ale990407]
236 /// map of the file's author IDs to buffer author IDs
237 std::vector<int> author_map;
241 AuthorList authorlist;
245 /** This is the amount of space used for paragraph_separation "skip",
246 and for detached paragraphs in "indented" documents.