Add missing include, due to André LASSERT change
[lyx.git] / src / OutputParams.h
blob066366b5c3566422da653a5a53f1443a6ea71230
1 // -*- C++ -*-
2 /**
3 * \file OutputParams.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef OUTPUTPARAMS_H
13 #define OUTPUTPARAMS_H
15 #include <string>
17 #include "support/types.h"
18 #include <boost/shared_ptr.hpp>
19 #include "Changes.h"
22 namespace lyx {
25 class Encoding;
26 class ExportData;
27 class Font;
30 class OutputParams {
31 public:
32 enum FLAVOR {
33 LATEX,
34 PDFLATEX,
35 XML
38 OutputParams(Encoding const *);
39 ~OutputParams();
41 /** The latex that we export depends occasionally on what is to
42 compile the file.
44 FLAVOR flavor;
46 /** Are we to write a 'nice' LaTeX file or not.
47 This esentially seems to mean whether InsetInclude, InsetGraphics
48 and InsetExternal should add the absolute path to any external
49 files or not.
51 bool nice;
53 /** moving_arg == true means that the environment in which the inset
54 is typeset is a moving argument. The inset should take care about
55 fragile commands by preceding the latex with \\protect.
57 bool moving_arg;
59 /** intitle == true means that the environment in which the
60 inset is typeset is part of a title (before a \\maketitle).
61 Footnotes in such environments have moving arguments.
63 bool intitle;
65 /** the font at the point where the inset is
67 Font const * local_font;
69 /** Document language babel name
71 mutable std::string document_language;
73 /** Current stream encoding. Only used for LaTeX.
74 This must be set to the document encoding (via the constructor)
75 before output starts. Afterwards it must be kept up to date for
76 each single character (\sa Paragraph::latex).
77 This does also mean that you need to set it back if you use a
78 copy (e.g. in insets): \code
79 int InsetFoo::latex(..., OutputParams const & runparams_in) const
81 OutputParams runparams(runparams_in);
82 runparams.inComment = true;
83 ...
84 InsetBla::latex(..., runparams);
85 ...
86 runparams_in.encoding = runparams.encoding;
88 \endcode
90 mutable Encoding const * encoding;
92 /** free_spacing == true means that the inset is in a free-spacing
93 paragraph.
95 bool free_spacing;
97 /** This var is set by the return value from BufferParams::writeLaTeX
99 bool use_babel;
101 /** Line length to use with plaintext export.
103 size_type linelen;
105 /** The depth of the current paragraph, set for plaintext
106 * export and used by InsetTabular
108 int depth;
110 /** Export data filled in by the latex(), docbook() etc methods.
111 This is a hack: Make it possible to add stuff to constant
112 OutputParams instances.
114 boost::shared_ptr<ExportData> exportdata;
116 /** Whether we are inside a comment inset. Insets that are including
117 * external files like InsetGraphics, InsetInclude and InsetExternal
118 * may only write the usual output and must not attempt to do
119 * something with the included files (e.g. copying, converting)
120 * if this flag is true, since they may not exist.
122 bool inComment;
124 /** Whether we are inside an inset that is logically deleted.
125 * A value > 0 indicates a deleted inset.
127 int inDeletedInset;
129 /** The change information of the outermost logically deleted inset.
130 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
132 Change changeOfDeletedInset;
134 /** allow output of only part of the top-level paragraphs
135 * par_begin: beginning paragraph
137 pit_type par_begin;
139 /** allow output of only part of the top-level paragraphs
140 * par_end: par_end-1 is the ending paragraph
141 * if par_begin=par_end, output all paragraphs
143 pit_type par_end;
145 /** whether or not do actual file copying and image conversion
146 * This mode will be used to preview the source code
148 bool dryrun;
149 /// Should we output verbatim or escape LaTeX's special chars?
150 bool verbatim;
154 } // namespace lyx
156 #endif // NOT OUTPUTPARAMS_H