]> git.lyx.org Git - lyx.git/blob - src/insets/insethfill.C
1b5d7b74d35245f7a2152c094bb22bd6c281b418
[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
15 #include "support/std_ostream.h"
16
17 using std::ostream;
18
19
20 InsetHFill::InsetHFill()
21         : InsetCommand(InsetCommandParams("hfill"))
22 {}
23
24
25 std::auto_ptr<InsetBase> InsetHFill::clone() const
26 {
27         return std::auto_ptr<InsetBase>(new InsetHFill);
28 }
29
30
31 void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const
32 {
33         dim.wid = 3;
34         dim.asc = 3;
35         dim.des = 3;
36         dim_ = dim;     
37 }
38
39
40 std::string const InsetHFill::getScreenLabel(Buffer const &) const
41 {
42         return getContents();
43 }
44
45
46 int InsetHFill::latex(Buffer const &, ostream & os,
47                       LatexRunParams const &) const
48 {
49         os << getCommand();
50         return 0;
51 }
52
53
54 int InsetHFill::ascii(Buffer const &, ostream & os, int) const
55 {
56         os << '\t';
57         return 0;
58 }
59
60
61 int InsetHFill::linuxdoc(Buffer const &, std::ostream & os) const
62 {
63         os << '\n';
64         return 0;
65 }
66
67
68 int InsetHFill::docbook(Buffer const &, std::ostream & os, bool) const
69 {
70         os << '\n';
71         return 0;
72 }
73
74
75 void InsetHFill::write(Buffer const &, ostream & os) const
76 {
77         os << "\n\\hfill \n";
78 }