]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLayout.h
8d7193021b25f12c82e230fbad6bba6cbe1a3ad5
[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 class TextClass;
28
29 ///
30 class InsetLayout {
31 public:
32         ///
33         InsetLayout();
34         ///
35         enum InsetDecoration {
36                 Classic,
37                 Minimalistic,
38                 Conglomerate,
39                 Default
40         };
41         ///
42         bool read(Lexer & lexrc, TextClass & tclass);
43         ///
44         docstring name() const { return name_; };
45         ///
46         std::string lyxtype() const { return lyxtype_; };
47         ///
48         docstring labelstring() const { return labelstring_; };
49         ///
50         InsetDecoration decoration() const { return decoration_; };
51         ///
52         std::string latextype() const { return latextype_; };
53         ///
54         std::string latexname() const { return latexname_; };
55         ///
56         std::string latexparam() const { return latexparam_; };
57         ///
58         FontInfo font() const { return font_; };
59         ///
60         FontInfo labelfont() const { return labelfont_; };
61         ///
62         ColorCode bgcolor() const { return bgcolor_; };
63         ///
64         std::string preamble() const { return preamble_; };
65         ///
66         std::set<std::string> requires() const { return requires_; };
67         ///
68         bool isMultiPar() const { return multipar_; };
69         ///
70         bool forcePlainLayout() const { return forceplain_; }
71         ///
72         bool allowParagraphCustomization() const { return custompars_; }
73         ///
74         bool isPassThru() const { return passthru_; };
75         ///
76         bool isNeedProtect() const { return needprotect_; };
77         ///
78         bool isFreeSpacing() const { return freespacing_; };
79         ///
80         bool isKeepEmpty() const { return keepempty_; };
81         ///
82         bool isForceLtr() const { return forceltr_; };
83 private:
84         ///
85         docstring name_;
86         /**
87                 * This is only used (at present) to decide where to put them on the menus.
88                 * Values are 'charstyle', 'custom' (things that by default look like a
89                 * footnote), 'element' (docbook), 'standard'.
90                 */
91         std::string lyxtype_;
92         ///
93         docstring labelstring_;
94         ///
95         InsetDecoration decoration_;
96         ///
97         std::string latextype_;
98         ///
99         std::string latexname_;
100         ///
101         std::string latexparam_;
102         ///
103         FontInfo font_;
104         ///
105         FontInfo labelfont_;
106         ///
107         ColorCode bgcolor_;
108         ///
109         std::string preamble_;
110         ///
111         std::set<std::string> requires_;
112         ///
113         bool multipar_;
114         /// 
115         bool custompars_;
116         ///
117         bool forceplain_;
118         ///
119         bool passthru_;
120         ///
121         bool needprotect_;
122         ///
123         bool freespacing_;
124         ///
125         bool keepempty_;
126         ///
127         bool forceltr_;
128 };
129
130 } // namespace lyx
131
132 #endif