]> git.lyx.org Git - lyx.git/blob - src/bufferparams.h
some support for matrix operations with maple ('M-x math-extern maple evalm')
[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 "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 setPaperStuff();
115
116         ///
117         void useClassDefaults();
118
119         ///
120         bool hasClassDefaults() const;
121
122         ///
123         VSpace const & getDefSkip() const { return defskip; }
124
125         ///
126         void setDefSkip(VSpace const & vs) { defskip = vs; }
127
128         /** Wether paragraphs are separated by using a indent like in
129           articles or by using a little skip like in letters.
130           */
131         PARSEP paragraph_separation;
132         ///
133         InsetQuotes::quote_language quotes_language;
134         ///
135         InsetQuotes::quote_times quotes_times;
136         ///
137         string fontsize; 
138         ///
139         LyXTextClassList::size_type textclass;
140
141         /* this are for the PaperLayout */
142         /// the general papersize (papersize2 or paperpackage
143         char papersize; // add apprip. signedness 
144         ///  the selected Geometry papersize
145         char papersize2; // add approp. signedness
146         /// a special paperpackage .sty-file
147         char paperpackage; // add approp. signedness
148         ///
149         PAPER_ORIENTATION orientation; // add approp. signedness
150         ///
151         bool use_geometry;
152         ///
153         string paperwidth;
154         ///
155         string paperheight;
156         ///
157         string leftmargin;
158         ///
159         string topmargin;
160         ///
161         string rightmargin;
162         ///
163         string bottommargin;
164         ///
165         string headheight;
166         ///
167         string headsep;
168         ///
169         string footskip;
170         
171         /* some LaTeX options */
172         /// The graphics driver
173         string graphicsDriver;
174         ///
175         string fonts;
176         ///
177         Spacing spacing;
178         ///
179         int secnumdepth;
180         ///
181         int tocdepth;
182         ///
183         Language const * language;
184         ///
185         string inputenc;
186         ///
187         string preamble;
188         ///
189         string options;
190         ///
191         string float_placement;
192         ///
193         unsigned int columns;
194         ///
195         LyXTextClass::PageSides sides;
196         ///
197         string pagestyle;
198         ///
199         boost::array<Bullet, 4> temp_bullets;
200         ///
201         boost::array<Bullet, 4> user_defined_bullets;
202         ///
203         void readPreamble(LyXLex &);
204         ///
205         void readLanguage(LyXLex &);
206         ///
207         void readGraphicsDriver(LyXLex &);
208         ///
209         bool use_amsmath;
210         ///
211         bool use_natbib;
212         ///
213         bool use_numerical_citations;
214         /// Time ago we agreed that this was a buffer property [ale990407]
215         string parentname;
216 private:
217         ///
218         friend class Buffer;
219         /** This is the amount of space used for paragraph_separation "skip",
220           and for detached paragraphs in "indented" documents.
221         */
222         VSpace defskip;
223 };
224
225 #endif