]> git.lyx.org Git - lyx.git/blob - src/bufferparams.h
fix compilation; remove cruft in configure script (I may have removed too much, but...
[lyx.git] / src / bufferparams.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef BUFFERPARAMS_H
13 #define BUFFERPARAMS_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "LString.h"
20 #include "lyxlex.h"
21 #include "vspace.h"
22 #include "Spacing.h"
23 #include "Bullet.h"
24 #include "lyxtextclass.h"
25
26 #include "insets/insetquotes.h"
27
28 #include <boost/array.hpp>
29
30
31 struct Language;
32
33 /** Buffer parameters.
34    This class contains all the parameters for this a buffer uses. Some
35    work needs to be done on this class to make it nice. Now everything
36    is in public.
37 */
38 class BufferParams {
39 public:
40         ///
41         enum PAPER_SIZE {
42                 ///
43                 PAPER_DEFAULT,
44                 ///
45                 PAPER_USLETTER,
46                 ///
47                 PAPER_LEGALPAPER,
48                 ///
49                 PAPER_EXECUTIVEPAPER,
50                 ///
51                 PAPER_A3PAPER,
52                 ///
53                 PAPER_A4PAPER,
54                 ///
55                 PAPER_A5PAPER,
56                 ///
57                 PAPER_B5PAPER
58         };
59         ///
60         enum PAPER_PACKAGES {
61                 ///
62                 PACKAGE_NONE,
63                 ///
64                 PACKAGE_A4,
65                 ///
66                 PACKAGE_A4WIDE,
67                 ///
68                 PACKAGE_WIDEMARGINSA4
69         };
70         ///
71         enum VMARGIN_PAPER_TYPE {
72                 ///
73                 VM_PAPER_DEFAULT,
74                 ///
75                 VM_PAPER_CUSTOM,
76                 ///
77                 VM_PAPER_USLETTER,
78                 ///
79                 VM_PAPER_USLEGAL,
80                 ///
81                 VM_PAPER_USEXECUTIVE,
82                 ///
83                 VM_PAPER_A3,
84                 ///
85                 VM_PAPER_A4,
86                 ///
87                 VM_PAPER_A5,
88                 ///
89                 VM_PAPER_B3,
90                 ///
91                 VM_PAPER_B4,
92                 ///
93                 VM_PAPER_B5
94         };
95         ///
96         enum PARSEP {
97                 ///
98                 PARSEP_INDENT,
99                 ///
100                 PARSEP_SKIP
101         };
102         ///
103         enum PAPER_ORIENTATION {
104                 ///
105                 ORIENTATION_PORTRAIT,
106                 ///
107                 ORIENTATION_LANDSCAPE
108         };
109         ///
110         BufferParams();
111
112         ///
113         void writeFile(std::ostream &) const;
114
115         ///
116         void setPaperStuff();
117
118         ///
119         void useClassDefaults();
120
121         ///
122         bool hasClassDefaults() const;
123
124         ///
125         VSpace const & getDefSkip() const { return defskip; }
126
127         ///
128         void setDefSkip(VSpace const & vs) { defskip = vs; }
129
130         /** Wether paragraphs are separated by using a indent like in
131           articles or by using a little skip like in letters.
132           */
133         PARSEP paragraph_separation;
134         ///
135         InsetQuotes::quote_language quotes_language;
136         ///
137         InsetQuotes::quote_times quotes_times;
138         ///
139         string fontsize;
140         ///
141         lyx::textclass_type textclass;
142
143         /* this are for the PaperLayout */
144         /// the general papersize (papersize2 or paperpackage
145         char papersize; // add apprip. signedness
146         ///  the selected Geometry papersize
147         char papersize2; // add approp. signedness
148         /// a special paperpackage .sty-file
149         char paperpackage; // add approp. signedness
150         ///
151         PAPER_ORIENTATION orientation; // add approp. signedness
152         ///
153         bool use_geometry;
154         ///
155         string paperwidth;
156         ///
157         string paperheight;
158         ///
159         string leftmargin;
160         ///
161         string topmargin;
162         ///
163         string rightmargin;
164         ///
165         string bottommargin;
166         ///
167         string headheight;
168         ///
169         string headsep;
170         ///
171         string footskip;
172
173         /* some LaTeX options */
174         /// The graphics driver
175         string graphicsDriver;
176         ///
177         string fonts;
178         ///
179         Spacing spacing;
180         ///
181         int secnumdepth;
182         ///
183         int tocdepth;
184         ///
185         Language const * language;
186         ///
187         string inputenc;
188         ///
189         string preamble;
190         ///
191         string options;
192         ///
193         string float_placement;
194         ///
195         unsigned int columns;
196         ///
197         LyXTextClass::PageSides sides;
198         ///
199         string pagestyle;
200         ///
201         boost::array<Bullet, 4> temp_bullets;
202         ///
203         boost::array<Bullet, 4> user_defined_bullets;
204         ///
205         void readPreamble(LyXLex &);
206         ///
207         void readLanguage(LyXLex &);
208         ///
209         void readGraphicsDriver(LyXLex &);
210         ///
211         bool use_amsmath;
212         ///
213         bool use_natbib;
214         ///
215         bool use_numerical_citations;
216         /// Time ago we agreed that this was a buffer property [ale990407]
217         string parentname;
218 private:
219         ///
220         friend class Buffer;
221         /** This is the amount of space used for paragraph_separation "skip",
222           and for detached paragraphs in "indented" documents.
223         */
224         VSpace defskip;
225 };
226
227 #endif