]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLayout.h
Replace home made temp file creation with safer (and cleaner) Qt' solution. Should...
[lyx.git] / src / insets / InsetLayout.h
1 // -*- C++ -*-
2 /**
3  * \file InsetLayout.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Martin Vermeer
8  * \author Richard Heck
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSET_LAYOUT_H
14 #define INSET_LAYOUT_H
15
16 #include "ColorCode.h"
17 #include "FontInfo.h"
18
19 #include "support/docstring.h"
20
21 #include <set>
22 #include <string>
23
24 namespace lyx {
25
26 class Lexer;
27
28 ///
29 class InsetLayout {
30 public:
31         ///
32         InsetLayout();
33         ///
34         enum InsetDecoration {
35                 Classic,
36                 Minimalistic,
37                 Conglomerate,
38                 Default
39         };
40         ///
41         bool read(Lexer & lexrc);
42         ///
43         docstring name() const { return name_; };
44         ///
45         std::string lyxtype() const { return lyxtype_; };
46         ///
47         docstring labelstring() const { return labelstring_; };
48         ///
49         InsetDecoration decoration() const { return decoration_; };
50         ///
51         std::string latextype() const { return latextype_; };
52         ///
53         std::string latexname() const { return latexname_; };
54         ///
55         std::string latexparam() const { return latexparam_; };
56         ///
57         FontInfo font() const { return font_; };
58         ///
59         FontInfo labelfont() const { return labelfont_; };
60         ///
61         ColorCode bgcolor() const { return bgcolor_; };
62         ///
63         std::string preamble() const { return preamble_; };
64         ///
65         std::set<std::string> requires() const { return requires_; };
66         ///
67         bool isMultiPar() const { return multipar_; };
68         ///
69         bool isPassThru() const { return passthru_; };
70         ///
71         bool isNeedProtect() const { return needprotect_; };
72         ///
73         bool isFreeSpacing() const { return freespacing_; };
74         ///
75         bool isKeepEmpty() const { return keepempty_; };
76         ///
77         bool isForceLtr() const { return forceltr_; };
78 private:
79         ///
80         docstring name_;
81         /**
82                 * This is only used (at present) to decide where to put them on the menus.
83                 * Values are 'charstyle', 'custom' (things that by default look like a
84                 * footnote), 'element' (docbook), 'standard'.
85                 */
86         std::string lyxtype_;
87         ///
88         docstring labelstring_;
89         ///
90         InsetDecoration decoration_;
91         ///
92         std::string latextype_;
93         ///
94         std::string latexname_;
95         ///
96         std::string latexparam_;
97         ///
98         FontInfo font_;
99         ///
100         FontInfo labelfont_;
101         ///
102         ColorCode bgcolor_;
103         ///
104         std::string preamble_;
105         ///
106         std::set<std::string> requires_;
107         ///
108         bool multipar_;
109         ///
110         bool passthru_;
111         ///
112         bool needprotect_;
113         ///
114         bool freespacing_;
115         ///
116         bool keepempty_;
117         ///
118         bool forceltr_;
119 };
120
121 } // namespace lyx
122
123 #endif