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