1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
1999-11-15 12:01:38 +00:00
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2000-02-04 09:38:32 +00:00
|
|
|
* Copyright 1995-2000 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
#ifndef BUFFERPARAMS_H
|
|
|
|
#define BUFFERPARAMS_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "LString.h"
|
|
|
|
#include "lyxlex.h"
|
|
|
|
#include "vspace.h"
|
|
|
|
#include "Spacing.h"
|
|
|
|
#include "Bullet.h"
|
|
|
|
#include "insets/insetquotes.h"
|
1999-11-04 01:40:20 +00:00
|
|
|
#include "layout.h"
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/array.hpp>
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-03-17 10:14:46 +00:00
|
|
|
|
|
|
|
struct Language;
|
|
|
|
|
2000-08-07 20:58:24 +00:00
|
|
|
/** Buffer parameters.
|
|
|
|
This class contains all the parameters for this a buffer uses. Some
|
|
|
|
work needs to be done on this class to make it nice. Now everything
|
|
|
|
is in public.
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
class BufferParams {
|
|
|
|
public:
|
1999-11-15 12:01:38 +00:00
|
|
|
///
|
|
|
|
enum PAPER_SIZE {
|
|
|
|
///
|
|
|
|
PAPER_DEFAULT,
|
|
|
|
///
|
|
|
|
PAPER_USLETTER,
|
|
|
|
///
|
|
|
|
PAPER_LEGALPAPER,
|
|
|
|
///
|
|
|
|
PAPER_EXECUTIVEPAPER,
|
|
|
|
///
|
|
|
|
PAPER_A3PAPER,
|
|
|
|
///
|
|
|
|
PAPER_A4PAPER,
|
|
|
|
///
|
|
|
|
PAPER_A5PAPER,
|
|
|
|
///
|
|
|
|
PAPER_B5PAPER
|
|
|
|
};
|
|
|
|
///
|
|
|
|
enum PAPER_PACKAGES {
|
|
|
|
///
|
|
|
|
PACKAGE_NONE,
|
|
|
|
///
|
|
|
|
PACKAGE_A4,
|
|
|
|
///
|
|
|
|
PACKAGE_A4WIDE,
|
|
|
|
///
|
|
|
|
PACKAGE_WIDEMARGINSA4
|
|
|
|
};
|
|
|
|
///
|
|
|
|
enum VMARGIN_PAPER_TYPE {
|
|
|
|
///
|
|
|
|
VM_PAPER_DEFAULT,
|
|
|
|
///
|
|
|
|
VM_PAPER_CUSTOM,
|
|
|
|
///
|
|
|
|
VM_PAPER_USLETTER,
|
|
|
|
///
|
|
|
|
VM_PAPER_USLEGAL,
|
|
|
|
///
|
|
|
|
VM_PAPER_USEXECUTIVE,
|
|
|
|
///
|
|
|
|
VM_PAPER_A3,
|
|
|
|
///
|
|
|
|
VM_PAPER_A4,
|
|
|
|
///
|
|
|
|
VM_PAPER_A5,
|
|
|
|
///
|
|
|
|
VM_PAPER_B3,
|
|
|
|
///
|
|
|
|
VM_PAPER_B4,
|
|
|
|
///
|
|
|
|
VM_PAPER_B5
|
|
|
|
};
|
|
|
|
///
|
|
|
|
enum PARSEP {
|
|
|
|
///
|
|
|
|
PARSEP_INDENT,
|
|
|
|
///
|
|
|
|
PARSEP_SKIP
|
|
|
|
};
|
|
|
|
///
|
|
|
|
enum PAPER_ORIENTATION {
|
|
|
|
///
|
|
|
|
ORIENTATION_PORTRAIT,
|
|
|
|
///
|
|
|
|
ORIENTATION_LANDSCAPE
|
|
|
|
};
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
BufferParams();
|
|
|
|
|
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
void writeFile(std::ostream &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void useClassDefaults();
|
|
|
|
|
|
|
|
///
|
2000-02-04 09:38:32 +00:00
|
|
|
VSpace const & getDefSkip() const { return defskip; }
|
|
|
|
|
|
|
|
///
|
|
|
|
void setDefSkip(VSpace const & vs) { defskip = vs; }
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/** Wether paragraphs are separated by using a indent like in
|
|
|
|
articles or by using a little skip like in letters.
|
|
|
|
*/
|
1999-11-15 12:01:38 +00:00
|
|
|
PARSEP paragraph_separation;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
InsetQuotes::quote_language quotes_language;
|
|
|
|
///
|
|
|
|
InsetQuotes::quote_times quotes_times;
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string fontsize;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-11 22:55:29 +00:00
|
|
|
LyXTextClassList::size_type textclass;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/* this are for the PaperLayout */
|
2000-08-07 20:58:24 +00:00
|
|
|
/// the general papersize (papersize2 or paperpackage
|
|
|
|
char papersize; // add apprip. signedness
|
|
|
|
/// the selected Geometry papersize
|
|
|
|
char papersize2; // add approp. signedness
|
|
|
|
/// a special paperpackage .sty-file
|
|
|
|
char paperpackage; // add approp. signedness
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
PAPER_ORIENTATION orientation; // add approp. signedness
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool use_geometry;
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string paperwidth;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string paperheight;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string leftmargin;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string topmargin;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string rightmargin;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string bottommargin;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string headheight;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string headsep;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string footskip;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/* some LaTeX options */
|
|
|
|
/// The graphics driver
|
1999-10-02 16:21:10 +00:00
|
|
|
string graphicsDriver;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string fonts;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
Spacing spacing;
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int secnumdepth;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int tocdepth;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-10-10 12:36:36 +00:00
|
|
|
Language const * language;
|
2000-03-17 10:14:46 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string inputenc;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string preamble;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string options;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string float_placement;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
unsigned int columns;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
LyXTextClass::PageSides sides;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string pagestyle;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-10-02 00:55:02 +00:00
|
|
|
array<Bullet, 4> temp_bullets;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-10-02 00:55:02 +00:00
|
|
|
array<Bullet, 4> user_defined_bullets;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
void readPreamble(LyXLex &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
void readLanguage(LyXLex &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
void readGraphicsDriver(LyXLex &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool use_amsmath;
|
|
|
|
/// Time ago we agreed that this was a buffer property [ale990407]
|
1999-10-02 16:21:10 +00:00
|
|
|
string parentname;
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
friend class Buffer;
|
|
|
|
/** This is the amount of space used for paragraph_separation "skip",
|
2000-08-07 20:58:24 +00:00
|
|
|
and for detached paragraphs in "indented" documents.
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
VSpace defskip;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|