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