]> git.lyx.org Git - lyx.git/blob - src/insets/insetmarginal.C
Replace LString.h with support/std_string.h,
[lyx.git] / src / insets / insetmarginal.C
1 /**
2  * \file insetmarginal.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jürgen Vigna
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "insetmarginal.h"
15
16 #include "gettext.h"
17
18 #include "support/std_ostream.h"
19
20 using std::auto_ptr;
21 using std::ostream;
22
23
24 InsetMarginal::InsetMarginal(BufferParams const & bp)
25         : InsetFootlike(bp)
26 {
27         setLabel(_("margin"));
28         setInsetName("Marginal");
29 }
30
31
32 InsetMarginal::InsetMarginal(InsetMarginal const & in)
33         : InsetFootlike(in)
34 {
35         setLabel(_("margin"));
36         setInsetName("Marginal");
37 }
38
39
40 auto_ptr<InsetBase> InsetMarginal::clone() const
41 {
42         return auto_ptr<InsetBase>(new InsetMarginal(*this));
43 }
44
45
46 string const InsetMarginal::editMessage() const
47 {
48         return _("Opened Marginal Note Inset");
49 }
50
51
52 int InsetMarginal::latex(Buffer const & buf, ostream & os,
53                          LatexRunParams const & runparams) const
54 {
55         os << "%\n\\marginpar{";
56
57         int const i = inset.latex(buf, os, runparams);
58         os << "%\n}";
59
60         return i + 2;
61 }