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