]> git.lyx.org Git - lyx.git/blob - src/PDFOptions.h
some code wstyle issues.
[lyx.git] / src / PDFOptions.h
1 // -*- C++ -*-
2 /**
3  * \file src/PDFOptions.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Pavel Sanda
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef PDFOPTIONS_H
13 #define PDFOPTIONS_H
14
15 #include "support/docstream.h"
16
17 namespace lyx {
18
19 class Lexer;
20
21 /// Options for PDF generation
22 class PDFOptions {
23 public:
24         ///
25         PDFOptions() { clear(); }
26         /// check for string settings
27         bool empty() const;
28         /// output to lyx header
29         void writeFile(std::ostream &) const;
30         /// output to tex header
31         void writeLaTeX(odocstringstream &) const;
32         /// read tokens from lyx header
33         std::string readToken(Lexer &lex, std::string const & token);
34         /// keep implicit hyperref settings
35         void clear();
36
37         ///
38         bool use_hyperref;
39         ///
40         std::string title;
41         ///
42         std::string author;
43         ///
44         std::string subject;
45         ///
46         std::string keywords;
47         /**
48                 * A set of Acrobat bookmarks are written, in a manner similar to the
49                 * table of contents.
50                 * bookmarks         boolean true
51                 */
52         bool bookmarks;
53         /**
54                 * If Acrobat bookmarks are requested, include section numbers.
55                 * bookmarksnumbered    boolean false
56                 */
57         bool bookmarksnumbered;
58         /**
59                 * If Acrobat bookmarks are requested, show them with all the subtrees
60                 * expanded.
61                 * bookmarksopen     boolean false
62                 */
63         bool bookmarksopen;
64         /**
65                 * Level (\maxdimen) to which bookmarks are open
66                 * bookmarksopenlevel    parameter
67                 */
68         std::string bookmarksopenlevel;
69         /**
70                 * Allows link text to break across lines.
71                 * breaklinks        boolean false
72                 */
73         bool breaklinks;
74         /**
75                 * The style of box around links; defaults to a box with lines of 1pt
76                 * thickness, but the colorlinks option resets it to produce no border.
77                 * pdfborder              "0 0 1" / "0 0 0"
78                 * Note that the color of link borders can be specified only as 3
79                 * numbers in the range 0..1, giving an RGB color.
80                 * You cannot use colors defined in TEX.
81                 *
82                 * We represent here only the last bit, there is no semantics in the
83                 * first two. Morover the aim is not to represent the whole pdfborder,
84                 * but just to deny the ugly boxes around pdf links.
85                 */
86         bool pdfborder;
87         /**
88                 * colorlinks        boolean false
89                 */
90         bool colorlinks;
91         /**
92                 * Adds backlink text to the end of each item in the bibliography,
93                 * as a list of section numbers.
94                 * This can only work properly if there is a blank line after each
95                 * \bibitem.
96                 * backref        boolean false
97                 */
98         bool backref;
99         /**
100                 * Adds backlink text to the end of each item in the bibliography,
101                 * as a list of page numbers.
102                 * pagebackref       boolean false
103                 */
104         bool pagebackref;
105         /**
106                 * Determines how the file is opening in Acrobat;
107                 * the possibilities are None, UseThumbs (show thumbnails), UseOutlines
108                 * (show bookmarks), and FullScreen.
109                 * If no mode if explicitly chosen, but the bookmarks option is set,
110                 * UseOutlines is used.
111                 * pagemode          text    empty
112                 *
113                 * We currently implement only FullScreen, but all modes can be saved
114                 * here, lyx format & latex writer is prepared.
115                 * The only thing needed in such a case is wider Settings
116                 * dialog -> PDFOptions.pagemode .
117                 */
118         std::string pagemode;
119         ///latex string
120         static const std::string pagemode_fullscreen;
121         /**
122                 * Additional parameters for hyperref given from user.
123                 */
124         std::string quoted_options;
125         /**
126                 * Possible syntax check of users additional parameters here.
127                 */
128         std::string quoted_options_get() const;
129         
130         
131         /**
132                 * Flag indicating whether user made some input into PDF preferences.
133                 * We want to save options, when user decide to switch off PDF support
134                 * for a while.
135                 */
136         bool store_options;
137 };
138
139 } // namespace lyx
140
141 #endif // PDFOPTIONS_H