]> git.lyx.org Git - lyx.git/blob - src/insets/insethfill.C
Preparation for the nomencl inset: Add {} in InsetCommand rather than
[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::plaintext(Buffer const &, odocstream & os,
51                       OutputParams const &) const
52 {
53         os << '\t';
54         return 0;
55 }
56
57
58 int InsetHFill::docbook(Buffer const &, odocstream & os,
59                         OutputParams const &) const
60 {
61         os << '\n';
62         return 0;
63 }
64
65
66 void InsetHFill::write(Buffer const &, ostream & os) const
67 {
68         os << "\n\\hfill\n";
69 }
70
71
72 bool InsetHFill::isSpace() const
73 {
74         return true;
75 }
76
77
78 } // namespace lyx