]> git.lyx.org Git - lyx.git/blob - src/bufferparams.h
1940b5f0f4d277f73a44195e75904bc4fc9bf93a
[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
27 /**
28   This class contains all the parameters for this a buffer uses. Some
29   work needs to be done on this class to make it nice. Now everything
30   is in public.
31   */
32 class BufferParams {
33 public:
34         //@Man: Constructors and Deconstructors
35         //@{
36         ///
37         BufferParams();
38         //@}
39
40         /// Dummy destructor to shut up gcc
41         virtual ~BufferParams() {}
42         
43         ///
44         void writeFile(FILE *);
45
46
47         ///
48         void useClassDefaults();
49
50         ///
51         VSpace getDefSkip() const { return defskip; }
52
53         ///
54         void setDefSkip(VSpace vs) { defskip = vs; }
55         
56         /** Wether paragraphs are separated by using a indent like in
57           articles or by using a little skip like in letters.
58           */
59         char paragraph_separation; // add approp. signedness
60         ///
61         InsetQuotes::quote_language quotes_language;
62         ///
63         InsetQuotes::quote_times quotes_times;
64         ///
65         string fontsize; 
66         ///
67         LyXTextClassList::ClassList::size_type textclass;
68
69         /* this are for the PaperLayout */
70    ///
71         char papersize; /* the general papersize (papersize2 or paperpackage */ // add approp. signedness
72         ///
73         char papersize2; /* the selected Geometry papersize */ // add approp. signedness
74         ///
75         char paperpackage; /* a special paperpackage .sty-file */ // add approp. signedness
76         ///
77         char orientation; // add approp. signedness
78         ///
79         bool use_geometry;
80         ///
81         string paperwidth;
82         ///
83         string paperheight;
84         ///
85         string leftmargin;
86         ///
87         string topmargin;
88         ///
89         string rightmargin;
90         ///
91         string bottommargin;
92         ///
93         string headheight;
94         ///
95         string headsep;
96         ///
97         string footskip;
98         
99         /* some LaTeX options */
100         /// The graphics driver
101         string graphicsDriver;
102         ///
103         string fonts;
104         ///
105         Spacing spacing;
106         ///
107         int secnumdepth;
108         ///
109         int tocdepth;
110         ///
111         string language;
112         ///
113         string inputenc;
114         ///
115         string preamble;
116         ///
117         string options;
118         ///
119         string float_placement;
120         ///
121         unsigned int columns;
122         ///
123         LyXTextClass::PageSides sides;
124         ///
125         string pagestyle;
126         ///
127         Bullet temp_bullets[4];
128         ///
129         Bullet user_defined_bullets[4];
130         ///
131         void Copy(BufferParams const &p);
132         ///
133         virtual void readPreamble(LyXLex &);
134         ///
135         virtual void readLanguage(LyXLex &);
136         ///
137         virtual void readGraphicsDriver(LyXLex &);
138         /// do we allow accents on all chars in this buffer
139         bool allowAccents;
140         ///
141         bool use_amsmath;
142         /// Time ago we agreed that this was a buffer property [ale990407]
143         string parentname;
144 protected:
145 private:
146         ///
147         friend class Buffer;
148         /** This is the amount of space used for paragraph_separation "skip",
149           and for detached paragraphs in "indented" documents. */
150         VSpace defskip;
151 };
152
153 #endif