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