]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLayout.h
Change the "empty layout" to the "plain layout", to try to avoid confusion.
[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 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                 * This is only used (at present) to decide where to put them on the menus.
84                 * Values are 'charstyle', 'custom' (things that by default look like a
85                 * footnote), 'element' (docbook), 'standard'.
86                 */
87         std::string lyxtype_;
88         ///
89         docstring labelstring_;
90         ///
91         InsetDecoration decoration_;
92         ///
93         std::string latextype_;
94         ///
95         std::string latexname_;
96         ///
97         std::string latexparam_;
98         ///
99         FontInfo font_;
100         ///
101         FontInfo labelfont_;
102         ///
103         ColorCode bgcolor_;
104         ///
105         std::string preamble_;
106         ///
107         std::set<std::string> requires_;
108         ///
109         bool multipar_;
110         ///
111         bool passthru_;
112         ///
113         bool needprotect_;
114         ///
115         bool freespacing_;
116         ///
117         bool keepempty_;
118         ///
119         bool forceltr_;
120 };
121
122 } // namespace lyx
123
124 #endif