]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLayout.h
This should be the last of the commits refactoring the InsetLayout code.
[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 enum InsetDecoration {
30         Deco_Classic,
31         Deco_Minimalistic,
32         Deco_Conglomerate,
33         Deco_Default
34 };
35
36 ///
37 class InsetLayout {
38 public:
39         ///
40         InsetLayout();
41         ///
42         bool read(Lexer & lexrc);
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 isPassThru() const { return passthru_; };
71         ///
72         bool isNeedProtect() const { return needprotect_; };
73         ///
74         bool isFreeSpacing() const { return freespacing_; };
75         ///
76         bool isKeepEmpty() const { return keepempty_; };
77         ///
78         bool isForceLtr() const { return forceltr_; };
79 private:
80         ///
81         docstring name_;
82         ///
83         std::string lyxtype_;
84         ///
85         docstring labelstring_;
86         ///
87         InsetDecoration decoration_;
88         ///
89         std::string latextype_;
90         ///
91         std::string latexname_;
92         ///
93         std::string latexparam_;
94         ///
95         FontInfo font_;
96         ///
97         FontInfo labelfont_;
98         ///
99         ColorCode bgcolor_;
100         ///
101         std::string preamble_;
102         ///
103         std::set<std::string> requires_;
104         ///
105         bool multipar_;
106         ///
107         bool passthru_;
108         ///
109         bool needprotect_;
110         ///
111         bool freespacing_;
112         ///
113         bool keepempty_;
114         ///
115         bool forceltr_;
116 };
117
118 } // namespace lyx
119
120 #endif