]> git.lyx.org Git - lyx.git/blob - src/insets/insethfill.C
move everything into namespace lyx
[lyx.git] / src / insets / insethfill.C
1 /**
2  * \file insethfill.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "insethfill.h"
14 #include "gettext.h"
15
16 #include "support/std_ostream.h"
17
18
19 namespace lyx {
20
21 using std::ostream;
22
23
24 InsetHFill::InsetHFill()
25         : InsetCommand(InsetCommandParams("hfill"), std::string())
26 {}
27
28
29 std::auto_ptr<InsetBase> InsetHFill::doClone() const
30 {
31         return std::auto_ptr<InsetBase>(new InsetHFill);
32 }
33
34
35 void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const
36 {
37         dim.wid = 3;
38         dim.asc = 3;
39         dim.des = 3;
40         dim_ = dim;
41 }
42
43
44 docstring const InsetHFill::getScreenLabel(Buffer const &) const
45 {
46         return _("Horizontal Fill");
47 }
48
49
50 int InsetHFill::latex(Buffer const &, odocstream & os,
51                       OutputParams const &) const
52 {
53         os << getCommand() << "{}";
54         return 0;
55 }
56
57
58 int InsetHFill::plaintext(Buffer const &, odocstream & os,
59                       OutputParams const &) const
60 {
61         os << '\t';
62         return 0;
63 }
64
65
66 int InsetHFill::docbook(Buffer const &, odocstream & os,
67                         OutputParams const &) const
68 {
69         os << '\n';
70         return 0;
71 }
72
73
74 void InsetHFill::write(Buffer const &, ostream & os) const
75 {
76         os << "\n\\hfill\n";
77 }
78
79
80 bool InsetHFill::isSpace() const
81 {
82         return true;
83 }
84
85
86 } // namespace lyx