]> git.lyx.org Git - lyx.git/blob - src/insets/insetmarginal.C
Enable convertDefault.sh to run even if its executable bit is not set.
[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 using std::auto_ptr;
27
28
29 InsetMarginal::InsetMarginal(BufferParams const & bp)
30         : InsetFootlike(bp)
31 {
32         setLabel(_("margin"));
33         setInsetName("Marginal");
34 }
35
36
37 InsetMarginal::InsetMarginal(InsetMarginal const & in)
38         : InsetFootlike(in)
39 {
40         setLabel(_("margin"));
41         setInsetName("Marginal");
42 }
43
44
45 auto_ptr<InsetBase> InsetMarginal::clone() const
46 {
47         return auto_ptr<InsetBase>(new InsetMarginal(*this));
48 }
49
50
51 string const InsetMarginal::editMessage() const
52 {
53         return _("Opened Marginal Note Inset");
54 }
55
56
57 int InsetMarginal::latex(Buffer const & buf, ostream & os,
58                          LatexRunParams const & runparams) const
59 {
60         os << "%\n\\marginpar{";
61
62         int const i = inset.latex(buf, os, runparams);
63         os << "%\n}";
64
65         return i + 2;
66 }