]> git.lyx.org Git - lyx.git/blob - src/insets/insetmarginal.C
Replace ParagraphList.h with ParagraphList_fwd.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 #include "paragraph.h"
18
19 #include "support/std_ostream.h"
20
21 using std::auto_ptr;
22 using std::ostream;
23
24
25 InsetMarginal::InsetMarginal(BufferParams const & bp)
26         : InsetFootlike(bp)
27 {
28         setLabel(_("margin"));
29         setInsetName("Marginal");
30 }
31
32
33 InsetMarginal::InsetMarginal(InsetMarginal const & in)
34         : InsetFootlike(in)
35 {
36         setLabel(_("margin"));
37         setInsetName("Marginal");
38 }
39
40
41 auto_ptr<InsetBase> InsetMarginal::clone() const
42 {
43         return auto_ptr<InsetBase>(new InsetMarginal(*this));
44 }
45
46
47 string const InsetMarginal::editMessage() const
48 {
49         return _("Opened Marginal Note Inset");
50 }
51
52
53 int InsetMarginal::latex(Buffer const & buf, ostream & os,
54                          LatexRunParams const & runparams) const
55 {
56         os << "%\n\\marginpar{";
57
58         int const i = inset.latex(buf, os, runparams);
59         os << "%\n}";
60
61         return i + 2;
62 }