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