]> git.lyx.org Git - lyx.git/blob - src/Floating.cpp
f0a4d93ffcdbb879e223136830293b52688fc0a3
[lyx.git] / src / Floating.cpp
1 /**
2  * \file Floating.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Jean-Marc Lasgouttes
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #include <config.h>
14
15 #include "Floating.h"
16
17 using namespace std;
18
19
20 namespace lyx {
21
22
23 Floating::Floating()
24 {}
25
26
27 Floating::Floating(string const & type, string const & placement,
28                    string const & ext, string const & within,
29                    string const & style, string const & name,
30                    string const & listName, string const & htmlTag,
31                    string const & htmlClass, string const & htmlStyle,
32                    bool builtin)
33         : type_(type), placement_(placement), ext_(ext), within_(within),
34           style_(style), name_(name), listName_(listName), html_tag_(htmlTag),
35           html_class_(htmlClass), html_style_(htmlStyle), builtin_(builtin)
36 {}
37
38
39 string const & Floating::type() const
40 {
41         return type_;
42 }
43
44
45 string const & Floating::placement() const
46 {
47         return placement_;
48 }
49
50
51 string const & Floating::ext() const
52 {
53         return ext_;
54 }
55
56
57 string const & Floating::within() const
58 {
59         return within_;
60 }
61
62
63 string const & Floating::style() const
64 {
65         return style_;
66 }
67
68
69 string const & Floating::name() const
70 {
71         return name_;
72 }
73
74
75 string const & Floating::listName() const
76 {
77         return listName_;
78 }
79
80
81 string const & Floating::htmlStyle() const
82 {
83         return html_style_;
84 }
85
86
87 string const & Floating::htmlClass() const
88 {
89         if (html_class_.empty())
90                 html_class_ = "float-" + type_;
91         return html_class_;
92 }
93
94
95 string const & Floating::htmlTag() const
96 {
97         if (html_tag_.empty())
98                 html_tag_ = "div";
99         return html_tag_;
100 }
101
102
103 bool Floating::builtin() const
104 {
105         return builtin_;
106 }
107
108
109 } // namespace lyx