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